aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-02-26 07:31:48 +0000
committerTorbjörn Andersson2004-02-26 07:31:48 +0000
commit5c7c6ca2a3e930faba8b0f26841093de3a1e97f4 (patch)
tree500892efb601976c28d7491d28c034c8235e54ac /scumm
parent258d0ea724d4aea2f5f1fa613aed71b5bb3844f1 (diff)
downloadscummvm-rg350-5c7c6ca2a3e930faba8b0f26841093de3a1e97f4.tar.gz
scummvm-rg350-5c7c6ca2a3e930faba8b0f26841093de3a1e97f4.tar.bz2
scummvm-rg350-5c7c6ca2a3e930faba8b0f26841093de3a1e97f4.zip
Work around music glitch in Monkey Island 2:
In the scene where Largo is speaking to Mad Marty, the Woodtick music often resumes way before Largo's theme has finished. With this workaround, it waits until Largo's theme has definitely finished before starting the Woodtick music again. I wouldn't have done it this way if I hadn't been almost positive that it's a script bug, rather than an iMUSE bug. svn-id: r13061
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v5.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 925593738c..cb57dd9478 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -2232,8 +2232,22 @@ void ScummEngine_v5::o5_startMusic() {
}
void ScummEngine_v5::o5_startSound() {
+ const byte *oldaddr = _scriptPointer - 1;
+ int sound = getVarOrDirectByte(PARAM_1);
+
+ // WORKAROUND: In the scene where Largo is talking to Mad Marty, the
+ // Woodtick music often resumes before Largo's theme has finished. As
+ // far as I can tell, this is a script bug.
+
+ if (_gameId == GID_MONKEY2 && sound == 110 && _sound->isSoundRunning(151)) {
+ warning("Delaying Woodtick music until Largo's theme has finished");
+ _scriptPointer = oldaddr;
+ o5_breakHere();
+ return;
+ }
+
VAR(VAR_MUSIC_TIMER) = 0;
- _sound->addSoundToQueue(getVarOrDirectByte(PARAM_1));
+ _sound->addSoundToQueue(sound);
}
void ScummEngine_v5::o5_stopMusic() {