From 87124b1d388ff1294a7f13c0cecc4bee01cf7427 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 2 Aug 2009 10:40:48 +0000 Subject: Removing _frameWaitLag. It broke normal animation speed in pre-v4 games and didn't even do what it was supposed to in v4+ games anyway. (bug #2830985) svn-id: r42996 --- engines/gob/util.cpp | 12 ++---------- engines/gob/util.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'engines/gob') diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 356eb3c643..1a8668b1c2 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -45,7 +45,6 @@ Util::Util(GobEngine *vm) : _vm(vm) { _frameRate = 12; _frameWaitTime = 0; _startFrameTime = 0; - _frameWaitLag = 0; } uint32 Util::getTimeKey(void) { @@ -331,12 +330,10 @@ void Util::setFrameRate(int16 rate) { _frameRate = rate; _frameWaitTime = 1000 / rate; _startFrameTime = getTimeKey(); - _frameWaitLag = 0; } void Util::notifyNewAnim() { _startFrameTime = getTimeKey(); - _frameWaitLag = 0; } void Util::waitEndFrame() { @@ -350,17 +347,12 @@ void Util::waitEndFrame() { return; } - int32 waitTime = _frameWaitTime - _frameWaitLag; - int32 toWait = waitTime - time; + int32 toWait = _frameWaitTime - time; if (toWait > 0) delay(toWait); - int32 now = getTimeKey(); - - _frameWaitLag = (now - _startFrameTime) - waitTime; - - _startFrameTime = now; + _startFrameTime = getTimeKey(); } void Util::setScrollOffset(int16 x, int16 y) { diff --git a/engines/gob/util.h b/engines/gob/util.h index 82e2df94de..ef972eb68c 100644 --- a/engines/gob/util.h +++ b/engines/gob/util.h @@ -145,7 +145,6 @@ protected: int16 _frameRate; int16 _frameWaitTime; uint32 _startFrameTime; - int32 _frameWaitLag; GobEngine *_vm; -- cgit v1.2.3