diff options
author | Filippos Karapetis | 2009-10-18 10:21:53 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-18 10:21:53 +0000 |
commit | 6dc95abcfa87cf2aa86b054c8b020153ae3641af (patch) | |
tree | e62ac096e39cf6864c89ed86e942abefd364d72b /engines/sci | |
parent | 4b1f310f2ddf25a907bf45a36739c4ddeea7421c (diff) | |
download | scummvm-rg350-6dc95abcfa87cf2aa86b054c8b020153ae3641af.tar.gz scummvm-rg350-6dc95abcfa87cf2aa86b054c8b020153ae3641af.tar.bz2 scummvm-rg350-6dc95abcfa87cf2aa86b054c8b020153ae3641af.zip |
Limited the speed throttler in kAnimate to work on SCI0-SCI1. SCI1.1 games seem to work fine without it, and disabling it removes the very long delay at the Sierra logo in QFG3
svn-id: r45211
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 433856d447..41202f4bc8 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -941,23 +941,27 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) { // FIXME: qfg3 gets broken by this, BUT even changing neededSleep to 2 still makes it somewhat broken (palette animation // isnt working) - // Do some speed throttling to calm down games that rely on counting cycles - uint32 curTime = g_system->getMillis(); - uint32 duration = curTime - s->_lastAnimateTime; - uint32 neededSleep = 40; - - // We are doing this, so that games like sq3 dont think we are running too slow and will remove details (like - // animated sierra logo at the beginning). Hopefully this wont cause regressions with pullups in lsl3 (FIXME?) - if (s->_lastAnimateCounter < 10) { - s->_lastAnimateCounter++; - neededSleep = 8; - } + // This speed throttler seems to cause issues in SCI1.1 games (e.g. the Sierra logo in QFG3, it stays there for ages). + // No observable side effects have been noted in SCI1.1 when this is disabled, so it has been limited to SCI0-SCI1 + if (getSciVersion() < SCI_VERSION_1_1) { + // Do some speed throttling to calm down games that rely on counting cycles + uint32 curTime = g_system->getMillis(); + uint32 duration = curTime - s->_lastAnimateTime; + uint32 neededSleep = 40; + + // We are doing this, so that games like sq3 dont think we are running too slow and will remove details (like + // animated sierra logo at the beginning). Hopefully this wont cause regressions with pullups in lsl3 (FIXME?) + if (s->_lastAnimateCounter < 10) { + s->_lastAnimateCounter++; + neededSleep = 8; + } - if (duration < neededSleep) { - gfxop_sleep(s->gfx_state, neededSleep - duration); - s->_lastAnimateTime = g_system->getMillis(); - } else { - s->_lastAnimateTime = curTime; + if (duration < neededSleep) { + gfxop_sleep(s->gfx_state, neededSleep - duration); + s->_lastAnimateTime = g_system->getMillis(); + } else { + s->_lastAnimateTime = curTime; + } } return s->r_acc; |