aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-04 16:16:58 +0000
committerFilippos Karapetis2010-01-04 16:16:58 +0000
commit5560f93c2a9fe2b686072c717d978adb353498fe (patch)
tree3e7ce4e85aea469238a87dafcb87709e8ac09f8c /engines/sci
parentf245917d6f08be640574df2ce128ef7bd248b0b6 (diff)
downloadscummvm-rg350-5560f93c2a9fe2b686072c717d978adb353498fe.tar.gz
scummvm-rg350-5560f93c2a9fe2b686072c717d978adb353498fe.tar.bz2
scummvm-rg350-5560f93c2a9fe2b686072c717d978adb353498fe.zip
SCI/new sound code: update sound cues when kGetEvent() is called, instead of kAnimate(), fixes music fading in LSL3
svn-id: r46973
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kevent.cpp11
-rw-r--r--engines/sci/engine/kgraphics.cpp9
2 files changed, 11 insertions, 9 deletions
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index e8f37ae535..43d5db55c3 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -141,6 +141,17 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
con->onFrame();
}
+#ifndef USE_OLD_MUSIC_FUNCTIONS
+ 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
+
return s->r_acc;
}
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 8e0b517547..9835aa6687 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -962,15 +962,6 @@ reg_t kAnimate(EngineState *s, int argc, reg_t *argv) {
#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 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);