[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.191,2.192 script_v72he.cpp,2.11,2.12

Travis Howell kirben at users.sourceforge.net
Tue Aug 24 09:03:13 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19493/scumm

Modified Files:
	intern.h script_v72he.cpp 
Log Message:

HE 7.2 uses different size in this opcode alone


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.191
retrieving revision 2.192
diff -u -d -r2.191 -r2.192
--- intern.h	24 Aug 2004 15:25:32 -0000	2.191
+++ intern.h	24 Aug 2004 16:02:26 -0000	2.192
@@ -654,6 +654,7 @@
 	virtual const char *getOpcodeDesc(byte i);
 
 	/* Version 7 script opcodes */
+	void o72_pushDWordVar();
 	void o72_getString();
 	void o72_compareStackList();
 	void o72_objectX();

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -d -r2.11 -r2.12
--- script_v72he.cpp	24 Aug 2004 15:25:32 -0000	2.11
+++ script_v72he.cpp	24 Aug 2004 16:02:26 -0000	2.12
@@ -48,7 +48,7 @@
 		/* 00 */
 		OPCODE(o6_pushByte),
 		OPCODE(o6_pushWord),
-		OPCODE(o6_pushByteVar),
+		OPCODE(o72_pushDWordVar),
 		OPCODE(o6_pushWordVar),
 		/* 04 */
 		OPCODE(o72_getString),
@@ -379,6 +379,17 @@
 	return _opcodesV72he[i].desc;
 }
 
+void ScummEngine_v72he::o72_pushDWordVar() {
+	int a;
+	if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) {
+		uint32 oldoffs = _scriptPointer - _scriptOrgPointer;
+		getScriptBaseAddress();
+		_scriptPointer = _scriptOrgPointer + oldoffs;
+	}
+	a = READ_LE_UINT32(_scriptPointer);
+	_scriptPointer += 4;
+	push(a);
+}
 
 void ScummEngine_v72he::o72_getString() {
 	int len;





More information about the Scummvm-git-logs mailing list