aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/animation.cpp
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/animation.cpp
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/animation.cpp')
-rw-r--r--engines/draci/animation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp
index ffdfa6c1e2..9b7694377f 100644
--- a/engines/draci/animation.cpp
+++ b/engines/draci/animation.cpp
@@ -59,8 +59,8 @@ void Animation::setRelative(int relx, int rely) {
Displacement Animation::getCurrentFrameDisplacement() const {
Displacement dis = _displacement;
- dis.relX += (int) (dis.extraScaleX * _shift.x);
- dis.relY += (int) (dis.extraScaleY * _shift.y);
+ dis.relX += scummvm_lround(dis.extraScaleX * _shift.x);
+ dis.relY += scummvm_lround(dis.extraScaleY * _shift.y);
return dis;
}