aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/walking.h
AgeCommit message (Collapse)Author
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-04-14ALL: colour -> colorMax Horn
2009-11-22Fix SIGSEGV by an absolutely brutally horrible hackRobert Špalek
I have thoroughly documented why this hack is needed and added ideas how to fix it properly. svn-id: r46068
2009-11-11Cleaned up searching the closest point.Robert Špalek
The old comments were completely misleading although the algorithm was good. svn-id: r45824
2009-11-08Do not immediately clear the path when it has just 1 vertex.Robert Špalek
This fixes the previous bugfix, which causes that I could not re-run the same program (e.g., by repeatedly clicking on the hollow tree) if the hero did not move at least one pixel. svn-id: r45747
2009-11-08Renumbered path segments.Robert Špalek
Increasing _segment by 1 makes the code much simpler. svn-id: r45744
2009-11-08Walking animations are fully smooth nowRobert Špalek
svn-id: r45743
2009-11-08Debugged smooth walking except for 1 bug.Robert Špalek
Adjusting to the edge is done such that it respects slight sideways movements of the dragon. Fixed rounding issues in the whole game. Improved debug messages. Made sure that the dragon does not turn like crazy around when clicking on the same pixel: the final point is always the clicked one although the middle points made by shifted to make the animations smooth, and preserve the dragons direction if he has not walked. There is a bug with running turning animations as they seem to disappear for 1 frame and have incorrect Z coordinate. Will investigate it next. svn-id: r45742
2009-11-07Debugged updating the position of the hero during walking.Robert Špalek
I project the hero immediately to the end of each edge for the time being though. svn-id: r45722
2009-11-07Add helper functions to retrieve dragon position from the animation.Robert Špalek
To implement proper walking, I have to respect the relative shifts defined by the sprites as opposed to apply some constant velocity. svn-id: r45714
2009-11-07The hero turns the right direction after walkingRobert Špalek
svn-id: r45713
2009-11-05Implemented proper walking.Robert Špalek
First shot, not debugged yet, but seems to work (even though a bit hairy)! svn-id: r45688
2009-11-05Added helper functions for dragon animationsRobert Špalek
svn-id: r45677
2009-11-04Implemented and debugged the walking framework.Robert Špalek
The hero does not walk yet (it still teleports to the target immediately), but that is just because the actual walking algorithm is left trivial first. However, the main game loop, callbacks, and waiting all already work with the general framework. svn-id: r45648
2009-11-03Created walking-callback infrastructure and converted the code to use itRobert Špalek
svn-id: r45644
2009-11-03Implement properly stayOn instead of using walkOnRobert Špalek
svn-id: r45641
2009-11-03Let setPath() store path with pixel precision, and update the map sprite ↵Robert Špalek
when reloaded svn-id: r45640
2009-11-03Run the path obliqueing process repeatedly until it converges.Robert Špalek
svn-id: r45623
2009-11-03Greatly improved the quality of obliqueing the shortest path.Robert Špalek
The current algorithm is much better than the original player'ss one and it find really nice curved paths. Also, started preparing interface for actually walking along this path. svn-id: r45622
2009-11-01Cleaned up the walking code.Robert Špalek
PathVertex replaced by Common::Point. Do not update the path sprites if not in the debugging mode. svn-id: r45598
2009-11-01Debugged computation and displaying of optimal walking pathsRobert Špalek
svn-id: r45597
2009-11-01Add methods to draw computed walking paths.Robert Špalek
svn-id: r45596
2009-11-01Implemented some utility functions for path-finding.Robert Špalek
In particular, breadth-first search algorithm for getting the shortest path in the walkable area and an algorithm making the path oblique when possible. svn-id: r45591
2009-10-30Move drawing of walking map to walking.cppRobert Špalek
svn-id: r45525
2009-10-30Fixed svn:keywordsRobert Špalek
svn-id: r45523
2009-10-30Remove most of default parameter values.Robert Špalek
Also, add comments to the last commit. svn-id: r45511
2009-10-30Move WalkingMap into new module.Robert Špalek
Also, fix a bug when loading the default walking map (wasn't implemented) and setting font size. The reason I move this code into a new module is because I will augment it with other walking-related algorithms soon. svn-id: r45510