From 48a8e69546ad5725a0bd6c42e2582fae8594eb2a Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 14 Jun 2009 12:19:42 +0000 Subject: Fixed an animation speed regression that got introduced when I added a lag compensation for Woodruff svn-id: r41508 --- engines/gob/mult_v2.cpp | 2 ++ engines/gob/util.cpp | 6 ++++++ engines/gob/util.h | 1 + 3 files changed, 9 insertions(+) (limited to 'engines') diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 379ed90c23..1ee12af899 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -395,6 +395,8 @@ void Mult_v2::multSub(uint16 multIndex) { if (multIndex > 7) error("Multindex out of range"); + _vm->_util->notifyNewAnim(); + debugC(4, kDebugGameFlow, "Sub mult %d", multIndex); _multData = _multDatas[multIndex]; diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index e1148dacb9..b0e7691c07 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -331,6 +331,12 @@ void Util::setFrameRate(int16 rate) { _frameRate = rate; _frameWaitTime = 1000 / rate; _startFrameTime = getTimeKey(); + _frameWaitLag = 0; +} + +void Util::notifyNewAnim() { + _startFrameTime = getTimeKey(); + _frameWaitLag = 0; } void Util::waitEndFrame() { diff --git a/engines/gob/util.h b/engines/gob/util.h index 3d7520fe69..0a76ee40ab 100644 --- a/engines/gob/util.h +++ b/engines/gob/util.h @@ -76,6 +76,7 @@ public: void clearPalette(void); int16 getFrameRate(); void setFrameRate(int16 rate); + void notifyNewAnim(); void waitEndFrame(); void setScrollOffset(int16 x = -1, int16 y = -1); -- cgit v1.2.3