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/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/draci/animation.cpp') 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; } -- cgit v1.2.3