From 354d7f6366d11628030bcfde9186fc6e1c819f9a Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Sun, 8 Nov 2009 03:16:22 +0000 Subject: Debugged smooth walking except for 1 bug. 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 --- engines/draci/draci.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/draci/draci.h') diff --git a/engines/draci/draci.h b/engines/draci/draci.h index 1707fc29ad..68e56bb2d7 100644 --- a/engines/draci/draci.h +++ b/engines/draci/draci.h @@ -26,6 +26,8 @@ #ifndef DRACI_H #define DRACI_H +#include + #include "common/system.h" #include "engines/engine.h" #include "engines/advancedDetector.h" @@ -109,6 +111,9 @@ enum { kDraciWalkingDebugLevel = 1 << 6 }; +// Macro to simulate lround() for non-C99 compilers +static inline long scummvm_lround(double val) { return (long)floor(val + 0.5); } + } // End of namespace Draci #endif // DRACI_H -- cgit v1.2.3