aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/music.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2013-09-22 15:40:51 +0200
committerMartin Kiewitz2013-09-22 15:40:51 +0200
commitf1b0a7740855f9c16c537f161772483a9f850e96 (patch)
treeed9d2c91b5bbf95d4354ebb79840e83b813ccbf0 /engines/sci/sound/music.cpp
parentf5115dd91e48be817c2a5139b118db38597b64dd (diff)
downloadscummvm-rg350-f1b0a7740855f9c16c537f161772483a9f850e96.tar.gz
scummvm-rg350-f1b0a7740855f9c16c537f161772483a9f850e96.tar.bz2
scummvm-rg350-f1b0a7740855f9c16c537f161772483a9f850e96.zip
SCI: fix music start code fixes eq2 bug #3037267
we start at offset 10 for sound SCI1 games. This is hardcoded in the interpreter. Also removing not handling signals on tick 0. This fixes Eco Quest 2 / Gonzales dancing in room 530. Thanks to wjp for the help.
Diffstat (limited to 'engines/sci/sound/music.cpp')
-rw-r--r--engines/sci/sound/music.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 8c6d0d6431..fe017868b5 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -518,7 +518,25 @@ void SciMusic::soundPlay(MusicEntry *pSnd) {
pSnd->hold = -1;
if (pSnd->status == kSoundStopped)
- pSnd->pMidiParser->jumpToTick(0);
+ if (_soundVersion <= SCI_VERSION_0_LATE) {
+ // SCI0 sound subsystem seems to start at offset 0
+ // Not starting at offset 0 for SCI0 games will result
+ // in glitches (e.g. the intro of LB1 Amiga gets stuck - bug
+ // #3297883). Refer to MusicEntry::setSignal() in sound/music.cpp.
+ pSnd->pMidiParser->jumpToOffset(0);
+ } else {
+ // SCI1 sound subsystem starts at offset 10 (and also sets loop offset to 0)
+ // At least in kq5/french&mac the first scene in the intro has
+ // a song that sets signal to 4 immediately on tick 0. Signal
+ // isn't set at that point by sierra sci and it would cause the
+ // castle daventry text to get immediately removed.
+ // Also Eco Quest 2 Gonzales Dances music (room 530) requires a signal
+ // to get set exactly at tick 0. We previously didn't handle signals
+ // on tick 0 for SCI1. Which then resulted in broken dance animations.
+ // See bug #3037267
+ // FIXME: maybe also change looping logic to use offset instead of ticks
+ pSnd->pMidiParser->jumpToOffset(10);
+ }
else {
// Fast forward to the last position and perform associated events when loading
pSnd->pMidiParser->jumpToTick(pSnd->ticker, true, true, true);