[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.93,2.94 script_v2.cpp,2.111,2.112

Max Horn fingolfin at users.sourceforge.net
Thu May 22 15:43:15 CEST 2003


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

Modified Files:
	intern.h script_v2.cpp 
Log Message:
fixed Zak cashcard

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.93
retrieving revision 2.94
diff -u -d -r2.93 -r2.94
--- intern.h	22 May 2003 14:10:16 -0000	2.93
+++ intern.h	22 May 2003 22:42:44 -0000	2.94
@@ -217,6 +217,7 @@
 	/* Version 2 script opcodes */
 	void o2_actorFromPos();
 	void o2_actorSet();
+	void o2_add();
 	void o2_addIndirect();
 	void o2_animateActor();
 	void o2_assignVarByte();
@@ -271,6 +272,7 @@
 	void o2_setState04();
 	void o2_setState08();
 	void o2_startScript();
+	void o2_subtract();
 	void o2_subIndirect();
 	void o2_verbOps();
 	void o2_waitForActor();

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.111
retrieving revision 2.112
diff -u -d -r2.111 -r2.112
--- script_v2.cpp	22 May 2003 15:27:44 -0000	2.111
+++ script_v2.cpp	22 May 2003 22:42:44 -0000	2.112
@@ -105,7 +105,7 @@
 		/* 38 */
 		OPCODE(o5_lessOrEqual),
 		OPCODE(o2_doSentence),
-		OPCODE(o5_subtract),
+		OPCODE(o2_subtract),
 		OPCODE(o2_waitForActor),
 		/* 3C */
 		OPCODE(o5_stopSound),
@@ -145,7 +145,7 @@
 		/* 58 */
 		OPCODE(o2_beginOverride),
 		OPCODE(o2_doSentence),
-		OPCODE(o5_add),
+		OPCODE(o2_add),
 		OPCODE(o2_setBitVar),
 		/* 5C */
 		OPCODE(o2_dummy),
@@ -265,7 +265,7 @@
 		/* B8 */
 		OPCODE(o5_lessOrEqual),
 		OPCODE(o2_doSentence),
-		OPCODE(o5_subtract),
+		OPCODE(o2_subtract),
 		OPCODE(o2_waitForActor),
 		/* BC */
 		OPCODE(o5_stopSound),
@@ -305,7 +305,7 @@
 		/* D8 */
 		OPCODE(o5_printEgo),
 		OPCODE(o2_doSentence),
-		OPCODE(o5_add),
+		OPCODE(o2_add),
 		OPCODE(o2_setBitVar),
 		/* DC */
 		OPCODE(o2_dummy),
@@ -623,6 +623,20 @@
 void Scumm_v2::o2_subIndirect() {
 	int a;
 	getResultPosIndirect();
+	a = getVarOrDirectWord(0x80);
+	_scummVars[_resultVarNumber] -= a;
+}
+
+void Scumm_v2::o2_add() {
+	int a;
+	getResultPos();
+	a = getVarOrDirectWord(0x80);
+	_scummVars[_resultVarNumber] += a;
+}
+
+void Scumm_v2::o2_subtract() {
+	int a;
+	getResultPos();
 	a = getVarOrDirectWord(0x80);
 	_scummVars[_resultVarNumber] -= a;
 }





More information about the Scummvm-git-logs mailing list