aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/gob/util.cpp12
-rw-r--r--engines/gob/util.h1
2 files changed, 2 insertions, 11 deletions
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;