From 5560f93c2a9fe2b686072c717d978adb353498fe Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 4 Jan 2010 16:16:58 +0000 Subject: SCI/new sound code: update sound cues when kGetEvent() is called, instead of kAnimate(), fixes music fading in LSL3 svn-id: r46973 --- engines/sci/engine/kevent.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'engines/sci/engine/kevent.cpp') 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; } -- cgit v1.2.3