aboutsummaryrefslogtreecommitdiff
path: root/engines/draci
AgeCommit message (Collapse)Author
2009-11-08Fixed aligning items in the inventoryRobert Špalek
svn-id: r45764
2009-11-08Removed old hack for cyclic animations.Robert Špalek
This makes the hero's walk even smoother. svn-id: r45763
2009-11-08Items put into inventory are placed correctly.Robert Špalek
Also, named correctly GPL2 parameter types. This fixes all FIXMEs svn-id: r45762
2009-11-08Fix running clearing IsReloaded().Robert Špalek
Currently, if gate programs used loop(), they exitted immediately due to not having cleared this flag. svn-id: r45753
2009-11-08Silence gcc warning by putting parentheses around an && expression nested in ↵Johannes Schickel
an || expression. svn-id: r45752
2009-11-08Fix enabling mouse cursor when entering a room.Robert Špalek
It used to have a wrong palette. svn-id: r45749
2009-11-08Implement QuickHero walking.Robert Špalek
Pressing Q during the game enables/disables faster walking; all animation phases are flipped after one refresh instead of after given delay. svn-id: r45748
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-08Fixed mistake with two inner loop caused by not clearing the path.Robert Špalek
Also, optimize play() and stop() svn-id: r45746
2009-11-08Tuned Z-coordinate of the dragon.Robert Špalek
Adding +1 made the dragon sometimes flip before an object when it should have been behind. svn-id: r45745
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-07Gradual walking implemented.Robert Špalek
It is not fully smooth yet due to rounding errors. However, it otherwise does what it is supposed to including perspective correction. svn-id: r45727
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-07Implemented relative animations.Robert Špalek
In these animations, each sprite can specify a relative shift with respect to the previous sprite. Moving animations (such as walking of the dragon) are easily described in this framework. I have sort of hacked their support and it seems to work. The current walking code does not interact with the new code yet, but it will be easy to do. svn-id: r45712
2009-11-07Done research on ignored animation flags and commented the codeRobert Špalek
svn-id: r45711
2009-11-06Add safe-guard against collision of animation IDs.Robert Špalek
When debugging another issue, I preloaded all animations, and horrible things happened that I debugged for a few hours. svn-id: r45695
2009-11-05Fixed several gross walking bugs.Robert Špalek
- SIGSEGV by not stopping walking when changing rooms - reset of the mouse cursor and object title during gate scripts - updating the previous animation phase, also when starting new animation - swapped up and down animations svn-id: r45690
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-04Brought back one old line, just to be sure.Robert Špalek
svn-id: r45675
2009-11-04Properly animate the last phase of the walk before running callbacksRobert Špalek
svn-id: r45649
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-03Removed an old FIXMERobert Špalek
svn-id: r45642
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-02Changed foo(void) to foo() in almost all non-backend source filesMax Horn
svn-id: r45616
2009-11-02Little clean-up after the refactoring.Robert Špalek
svn-id: r45609
2009-11-02Split loop() into several cleaned helper methodsRobert Špalek
svn-id: r45608
2009-11-02Refactored running loop().Robert Špalek
- shouldExitLoop() is a bool again and introduced new flag isReloaded() instead of adding special hacky value 2 - loop() accepts 2 parameters: loop substatus and shouldExit flag, because each caller previously had to set and restore these manually. loop() now also tests whether the substatuses are properly nested. reordered the loop-exitting code. - renamed loop substatuses to logical names - enterNewRoom() returns bool whether loop() should continue so that start() doesn't have to test and clear shouldEndProgram(). it doesn't need force_reload as a parameter anymore. - dialog selections use new inner substatus instead of outer substatus, for consistency svn-id: r45607
2009-11-01Commented the rest of the loop() logicRobert Špalek
svn-id: r45606
2009-11-01Fix SIGSEGV when quitting the game during playing soundsRobert Špalek
svn-id: r45605
2009-11-01Commented on loop() before refactoring.Robert Špalek
svn-id: r45604
2009-11-01Small bugfix in path-findingRobert Špalek
svn-id: r45602
2009-11-01One more clean-up of the path-finding codeRobert Špalek
svn-id: r45599
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-01Fix mistakenly ordered flushing revealed by the last commitRobert Špalek
svn-id: r45595
2009-11-01Get rid of doubling memory allocation and a lot of copying.Robert Špalek
The Sprite class points to the original buffer (which is cached in the memory thanks to BArchive machinery) instead of allocating its own buffer and copying the source there. svn-id: r45594
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-30Moved all one-line getters/setters to the header filesRobert Špalek
svn-id: r45524
2009-10-30Fixed svn:keywordsRobert Špalek
svn-id: r45523