From 74ae4ecc48ae51b2f19c8120918dc53de73bab9c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 1 Jan 2010 15:35:27 +0000 Subject: Added a comment for the reason updateSci0Cues() is called within kAnimate() svn-id: r46833 --- engines/sci/engine/kgraphics.cpp | 10 ++++++++-- 1 file 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); -- cgit v1.2.3