diff options
author | dhewg | 2011-03-05 10:32:56 +0100 |
---|---|---|
committer | dhewg | 2011-03-05 11:00:37 +0100 |
commit | 69a026192e30c544379cf938efa6b545a62e3a08 (patch) | |
tree | 9a8904977d188cc45c3b2c819945e7a94f54302d /engines/agi/agi.h | |
parent | 83b00526d0da2265eef8d59767cafd16190ec092 (diff) | |
download | scummvm-rg350-69a026192e30c544379cf938efa6b545a62e3a08.tar.gz scummvm-rg350-69a026192e30c544379cf938efa6b545a62e3a08.tar.bz2 scummvm-rg350-69a026192e30c544379cf938efa6b545a62e3a08.zip |
AGI: Kill the timer based counter
Using the timer mechanism for just a simple counter is not just
overkill, its also inaccurate. When using a call frequency of x,
and waiting for y callbacks, the passed time will not be x*y.
The problem amplifies on slower platforms and/or fair thread
schedulers.
Use absolute times instead. Most notably, the walking speed of
the avatar is now smooth on android, but probably on all other
handhelds we support too.
Diffstat (limited to 'engines/agi/agi.h')
-rw-r--r-- | engines/agi/agi.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 89b116daec..df19f55b52 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -810,9 +810,7 @@ public: Common::Error saveGameState(int slot, const char *desc); private: - - uint32 _tickTimer; - uint32 _lastTickTimer; + uint32 _lastTick; int _keyQueue[KEY_QUEUE_SIZE]; int _keyQueueStart; @@ -883,7 +881,6 @@ public: virtual bool isKeypress(); virtual void clearKeyQueue(); - static void agiTimerFunctionLow(void *refCon); void initPriTable(); void newInputMode(InputMode mode); |