diff options
author | Max Horn | 2010-06-21 21:33:45 +0000 |
---|---|---|
committer | Max Horn | 2010-06-21 21:33:45 +0000 |
commit | c7a9865a73eae69e73fb8a67bffbbe2286074a8c (patch) | |
tree | 344b517767198addf70c7f64f72a0b310afa601f /engines/agi | |
parent | e7da62763ecb26a35b2a4624226a8ee2bf79a853 (diff) | |
download | scummvm-rg350-c7a9865a73eae69e73fb8a67bffbbe2286074a8c.tar.gz scummvm-rg350-c7a9865a73eae69e73fb8a67bffbbe2286074a8c.tar.bz2 scummvm-rg350-c7a9865a73eae69e73fb8a67bffbbe2286074a8c.zip |
AGI: Change a static var to member var AgiEngine::_lastTickTimer
svn-id: r50126
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/agi.cpp | 10 | ||||
-rw-r--r-- | engines/agi/agi.h | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 333b674379..6a359944e1 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -272,20 +272,19 @@ void AgiEngine::processEvents() { } void AgiEngine::pollTimer() { - static uint32 m = 0; uint32 dm; - if (_tickTimer < m) - m = 0; + if (_tickTimer < _lastTickTimer) + _lastTickTimer = 0; - while ((dm = _tickTimer - m) < 5) { + while ((dm = _tickTimer - _lastTickTimer) < 5) { processEvents(); if (_console->isAttached()) _console->onFrame(); _system->delayMillis(10); _system->updateScreen(); } - m = _tickTimer; + _lastTickTimer = _tickTimer; } void AgiEngine::agiTimerFunctionLow(void *refCon) { @@ -543,6 +542,7 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas _allowSynthetic = false; _tickTimer = 0; + _lastTickTimer = 0; _intobj = NULL; diff --git a/engines/agi/agi.h b/engines/agi/agi.h index a67775cec6..301ffa1b6c 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -816,6 +816,7 @@ public: private: uint32 _tickTimer; + uint32 _lastTickTimer; int _keyQueue[KEY_QUEUE_SIZE]; int _keyQueueStart; |