aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-01 15:35:27 +0000
committerFilippos Karapetis2010-01-01 15:35:27 +0000
commit74ae4ecc48ae51b2f19c8120918dc53de73bab9c (patch)
tree05905e5d0c5195e885173924dcb1030e45c216b3 /engines/sci
parent5ebadb10d483864bd70350f41d264c35d5f1a37e (diff)
downloadscummvm-rg350-74ae4ecc48ae51b2f19c8120918dc53de73bab9c.tar.gz
scummvm-rg350-74ae4ecc48ae51b2f19c8120918dc53de73bab9c.tar.bz2
scummvm-rg350-74ae4ecc48ae51b2f19c8120918dc53de73bab9c.zip
Added a comment for the reason updateSci0Cues() is called within kAnimate()
svn-id: r46833
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kgraphics.cpp10
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);