aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/draci.h
diff options
context:
space:
mode:
authorRobert Špalek2009-11-08 03:16:22 +0000
committerRobert Špalek2009-11-08 03:16:22 +0000
commit354d7f6366d11628030bcfde9186fc6e1c819f9a (patch)
treec20613c1cb70306887b64f91b7d63480d70bfdc6 /engines/draci/draci.h
parent286e71fdcf8b41599891a073a42d20f9dae5294f (diff)
downloadscummvm-rg350-354d7f6366d11628030bcfde9186fc6e1c819f9a.tar.gz
scummvm-rg350-354d7f6366d11628030bcfde9186fc6e1c819f9a.tar.bz2
scummvm-rg350-354d7f6366d11628030bcfde9186fc6e1c819f9a.zip
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
Diffstat (limited to 'engines/draci/draci.h')
-rw-r--r--engines/draci/draci.h5
1 files changed, 5 insertions, 0 deletions
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 <math.h>
+
#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