[Scummvm-cvs-logs] CVS: scummvm/scumm script_v5.cpp,1.109,1.110

Max Horn fingolfin at users.sourceforge.net
Sun Jun 1 18:46:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv11731

Modified Files:
	script_v5.cpp 
Log Message:
fix for indy3 VGA script bug (bug #743314)

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- script_v5.cpp	1 Jun 2003 18:20:38 -0000	1.109
+++ script_v5.cpp	2 Jun 2003 01:45:03 -0000	1.110
@@ -579,20 +579,31 @@
 
 void Scumm_v5::o5_chainScript() {
 	int vars[16];
-	int data;
+	int script;
 	int cur;
 
-	data = getVarOrDirectByte(0x80);
+	script = getVarOrDirectByte(0x80);
 
 	getWordVararg(vars);
 
 	cur = _currentScript;
 
+	// FIXME: Work around a bug in script 33 in Indy3 VGA. That script is
+	// used for the fist fights in the Zeppeling. It uses Local[5], even
+	// though that is never set to any value. But script 33 is called
+	// via chainScript by script 32, and in there Local[5] is defined to
+	// the actor ID of the opposing soldier. So, we copy that value
+	// over to the Local[5] variable of script 33.
+	// See also bug #743314.
+	if (_gameId == GID_INDY3_256 && vm.slot[cur].number == 32 && script == 33) {
+		vars[5] = vm.localvar[cur][5];
+	}
+
 	vm.slot[cur].number = 0;
 	vm.slot[cur].status = 0;
 	_currentScript = 0xFF;
 
-	runScript(data, vm.slot[cur].freezeResistant, vm.slot[cur].recursive, vars);
+	runScript(script, vm.slot[cur].freezeResistant, vm.slot[cur].recursive, vars);
 }
 
 void Scumm_v5::o5_cursorCommand() {





More information about the Scummvm-git-logs mailing list