[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.230.2.5,2.230.2.6 script_v5.cpp,1.226.2.4,1.226.2.5 intern.h,2.138.2.5,2.138.2.6
Max Horn
fingolfin at users.sourceforge.net
Fri Aug 13 02:08:09 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm player_v2.cpp,2.46,2.46.2.1 resource.cpp,1.188.2.2,1.188.2.3 player_v1.cpp,1.20,1.20.2.1 player_mod.h,2.13,2.13.2.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.193.2.8,1.193.2.9 script.cpp,1.149.2.4,1.149.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16691
Modified Files:
Tag: branch-0-6-0
script_v2.cpp script_v5.cpp intern.h
Log Message:
Added MI2 workaround from trunk; moved Zak hack to script_v2.cpp (matching trunk)
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.230.2.5
retrieving revision 2.230.2.6
diff -u -d -r2.230.2.5 -r2.230.2.6
--- script_v2.cpp 18 Jul 2004 22:15:51 -0000 2.230.2.5
+++ script_v2.cpp 13 Aug 2004 09:07:10 -0000 2.230.2.6
@@ -318,7 +318,7 @@
/* E0 */
OPCODE(o2_cursorCommand),
OPCODE(o2_putActor),
- OPCODE(o5_stopScript),
+ OPCODE(o2_stopScript),
OPCODE(o5_getActorFacing),
/* E4 */
OPCODE(o2_loadRoomWithEgo),
@@ -451,8 +451,7 @@
// cutscene. Script 116 sets var[175] to 1, which disables New Kid in
// script 164. Unfortunatly, when New Kid is reenabled (var[175] = 0) in
// script 89, script 164 isn't reran to redraw it. Why? Dunno. Hack? Yes.
- if ((var == 175) && (_gameId == GID_MANIAC) &&
- (vm.slot[_currentScript].number == 89))
+ if ((var == 175) && (_gameId == GID_MANIAC) && (vm.slot[_currentScript].number == 89))
runScript(164, 0, 0, 0);
}
@@ -1123,6 +1122,28 @@
runScript(script, 0, 0, 0);
}
+void ScummEngine_v2::o2_stopScript() {
+ int script;
+
+ script = getVarOrDirectByte(PARAM_1);
+
+ if ((_gameId == GID_ZAK) && (_roomResource == 7) && (vm.slot[_currentScript].number == 10001)) {
+ // FIXME: Nasty hack for bug #771499
+ // Don't let the exit script for room 7 stop the buy script (24),
+ // switching to the number selection keypad (script 15)
+ if ((script == 24) && isScriptRunning(15))
+ return;
+ }
+
+ if (script == 0)
+ script = vm.slot[_currentScript].number;
+
+ if (_currentScript != 0 && vm.slot[_currentScript].number == script)
+ stopObjectCode();
+ else
+ stopScript(script);
+}
+
void ScummEngine_v2::o2_panCameraTo() {
panCameraTo(getVarOrDirectByte(PARAM_1) * 8, 0);
}
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.226.2.4
retrieving revision 1.226.2.5
diff -u -d -r1.226.2.4 -r1.226.2.5
--- script_v5.cpp 25 Jul 2004 00:17:08 -0000 1.226.2.4
+++ script_v5.cpp 13 Aug 2004 09:07:10 -0000 1.226.2.5
@@ -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() {
@@ -2308,14 +2322,6 @@
script = getVarOrDirectByte(PARAM_1);
- if ((_gameId == GID_ZAK) && (_roomResource == 7) && (vm.slot[_currentScript].number == 10001)) {
- // FIXME: Nasty hack for bug #771499
- // Don't let the exit script for room 7 stop the buy script (24),
- // switching to the number selection keypad (script 15)
- if ((script == 24) && isScriptRunning(15))
- return;
- }
-
if (!script)
stopObjectCode();
else
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.138.2.5
retrieving revision 2.138.2.6
diff -u -d -r2.138.2.5 -r2.138.2.6
--- intern.h 15 Jul 2004 05:43:55 -0000 2.138.2.5
+++ intern.h 13 Aug 2004 09:07:10 -0000 2.138.2.6
@@ -289,6 +289,7 @@
void o2_setState04();
void o2_setState08();
void o2_startScript();
+ void o2_stopScript();
void o2_subtract();
void o2_subIndirect();
void o2_switchCostumeSet();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm player_v2.cpp,2.46,2.46.2.1 resource.cpp,1.188.2.2,1.188.2.3 player_v1.cpp,1.20,1.20.2.1 player_mod.h,2.13,2.13.2.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm string.cpp,1.193.2.8,1.193.2.9 script.cpp,1.149.2.4,1.149.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list