[Scummvm-cvs-logs] CVS: scummvm/sword2 interpreter.cpp,1.54,1.55
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Tue Jun 28 03:26:21 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm thumbnail.cpp,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.144,1.145 actor.h,1.79,1.80 isomap.cpp,1.50,1.51 isomap.h,1.21,1.22 saveload.cpp,1.17,1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12778
Modified Files:
interpreter.cpp
Log Message:
Worked around script bug which could cause Nico to be in the wrong state at
the Docks scene in London. See bug #1214168 for details. (The bug was not
serious, but could cause some very obvious glitches.)
Index: interpreter.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/interpreter.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- interpreter.cpp 12 May 2005 13:12:02 -0000 1.54
+++ interpreter.cpp 28 Jun 2005 10:25:25 -0000 1.55
@@ -271,7 +271,40 @@
// So if his click hander (action script number 2) finishes, and
// variable 913 is 1, we set it back to 0 manually.
- bool checkPyramidBug = scriptNumber == 2 && strcmp((char *)header->name, "titipoco_81") == 0;
+ bool checkPyramidBug = false;
+
+ // WORKAROUND for bug #1214168: The not-at-all dreaded mop bug.
+ //
+ // At the London Docks, global variable 1003 keeps track of Nico:
+ //
+ // 0: Hiding behind the first crate.
+ // 1: Hiding behind the second crate.
+ // 2: Standing in plain view on the deck.
+ // 3: Hiding on the roof.
+ //
+ // The bug happens when trying to pick up the mop while hiding on the
+ // roof. Nico climbs down, the mop is picked up, but the variable
+ // remains set to 3. Visually, everything looks ok. But as far as the
+ // scripts are concerned, she's still hiding up on the roof. This is
+ // not fatal, but leads to a number of glitches until the state is
+ // corrected. E.g. trying to climb back up the ladder will cause Nico
+ // to climb down again.
+ //
+ // Global variable 1017 keeps track of the mop. Setting it to 2 means
+ // that the mop has been picked up. We should be able to use that as
+ // the signal that Nico's state needs to be updated as well. There are
+ // a number of other possible workarounds, but this is the closest
+ // point I've found to where Nico's state should have been updated, had
+ // the script been correct.
+
+ bool checkMopBug = false;
+
+ if (scriptNumber == 2) {
+ if (strcmp((char *)header->name, "titipoco_81") == 0)
+ checkPyramidBug = true;
+ else if (strcmp((char *)header->name, "mop_73") == 0)
+ checkMopBug = true;
+ }
code += noScripts * sizeof(int32);
@@ -416,6 +449,14 @@
// Pop a global variable
Read16ip(parameter);
value = pop();
+
+ // WORKAROUND: Mop bug. See explanation above.
+
+ if (checkMopBug && parameter == 1017 && _scriptVars[1003] != 2) {
+ warning("Working around Mop script bug: Setting Nico state");
+ _scriptVars[1003] = 2;
+ }
+
_scriptVars[parameter] = value;
debug(9, "CP_POP_GLOBAL_VAR32: scriptsVars[%d] = %d", parameter, value);
break;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm thumbnail.cpp,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.144,1.145 actor.h,1.79,1.80 isomap.cpp,1.50,1.51 isomap.h,1.21,1.22 saveload.cpp,1.17,1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list