aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/preagi.cpp
diff options
context:
space:
mode:
authordhewg2011-03-05 10:32:56 +0100
committerdhewg2011-03-05 11:00:37 +0100
commit69a026192e30c544379cf938efa6b545a62e3a08 (patch)
tree9a8904977d188cc45c3b2c819945e7a94f54302d /engines/agi/preagi.cpp
parent83b00526d0da2265eef8d59767cafd16190ec092 (diff)
downloadscummvm-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/preagi.cpp')
-rw-r--r--engines/agi/preagi.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index fe864d7659..1aa6ef5cc4 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -122,9 +122,6 @@ void PreAgiEngine::initialize() {
_mixer->playStream(Audio::Mixer::kSFXSoundType, &_speakerHandle,
_speakerStream, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
-
- //_timer->installTimerProc(agiTimerFunctionLow, 10 * 1000, NULL);
-
debugC(2, kDebugLevelMain, "Detect game");
// clear all resources and events