[Scummvm-cvs-logs] CVS: scummvm/scumm script_v5.cpp,1.228,1.229
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Wed Feb 25 23:48:03 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22948
Modified Files:
script_v5.cpp
Log Message:
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.
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -d -r1.228 -r1.229
--- script_v5.cpp 22 Feb 2004 16:08:13 -0000 1.228
+++ script_v5.cpp 26 Feb 2004 07:31:48 -0000 1.229
@@ -2232,8 +2232,22 @@
}
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() {
More information about the Scummvm-git-logs
mailing list