diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kgraphics.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 83b9eb0f75..8e0b517547 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -959,12 +959,18 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) { reg_t castListReference = (argc > 0) ? argv[0] : NULL_REG; bool cycle = (argc > 1) ? ((argv[1].toUint16()) ? true : false) : false; - // Take care of incoming events (kAnimate is called semi-regularly) #ifdef USE_OLD_MUSIC_FUNCTIONS + // Take care of incoming events (kAnimate is called semi-regularly) process_sound_events(s); #else - if (s->detectDoSoundType() <= SCI_VERSION_0_LATE) + if (s->detectDoSoundType() <= SCI_VERSION_0_LATE) { + // If we're running a SCI0 game, update the sound cues, to compensate + // for the fact that SCI0 does not poll to update the sound cues itself, + // like SCI01 and later do with cmdUpdateSoundCues. kAnimate is called + // quite often, so emulate the SCI01 behavior of cmdUpdateSoundCues with + // this call s->_soundCmd->updateSci0Cues(); + } #endif s->_gui->animate(castListReference, cycle, argc, argv); |