diff options
author | Martin Kiewitz | 2010-01-17 18:41:28 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-17 18:41:28 +0000 |
commit | 3e44180e479c549403ff7144b460b453571f750f (patch) | |
tree | 9966fde1f085eb5a2410648fa6f2c41802e01b5d /engines/sci/engine/kmisc.cpp | |
parent | cb1419ece9afa9f11d8ac5279f8fb8ea34fa960d (diff) | |
download | scummvm-rg350-3e44180e479c549403ff7144b460b453571f750f.tar.gz scummvm-rg350-3e44180e479c549403ff7144b460b453571f750f.tar.bz2 scummvm-rg350-3e44180e479c549403ff7144b460b453571f750f.zip |
SCI: speed throttler changed, now gets triggered by kAnimate, removed initial no-delay, i'm still getting animation now in iceman and sq3, slow palette animation in longbow fixed
svn-id: r47343
Diffstat (limited to 'engines/sci/engine/kmisc.cpp')
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 4327957ebb..7f1572d671 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -58,20 +58,23 @@ reg_t kGameIsRestarting(EngineState *s, int argc, reg_t *argv) { // Some games seem to get the duration of main loop initially and then switch of animations for the whole game // based on that (qfg2, iceman). We are now running full speed initially to avoid that. - if (s->_lastAnimateCounter < 50) { - s->_lastAnimateCounter++; - return s->r_acc; - } + if (s->_throttleTrigger) { + //if (s->_throttleCounter < 50) { + // s->_throttleCounter++; + // return s->r_acc; + //} - uint32 curTime = g_system->getMillis(); - uint32 duration = curTime - s->_lastAnimateTime; - uint32 neededSleep = 30; - - if (duration < neededSleep) { - kernel_sleep(s->_event, neededSleep - duration); - s->_lastAnimateTime = g_system->getMillis(); - } else { - s->_lastAnimateTime = curTime; + uint32 curTime = g_system->getMillis(); + uint32 duration = curTime - s->_throttleLastTime; + uint32 neededSleep = 30; + + if (duration < neededSleep) { + kernel_sleep(s->_event, neededSleep - duration); + s->_throttleLastTime = g_system->getMillis(); + } else { + s->_throttleLastTime = curTime; + } + s->_throttleTrigger = false; } return s->r_acc; |