[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.459,2.460 script_v90he.cpp,2.237,2.238

kirben kirben at users.sourceforge.net
Mon Apr 25 23:49:50 CEST 2005


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

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

Add stubs for the two smacker related opcodes in HE games.
Makes it easier to test new titles.


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.459
retrieving revision 2.460
diff -u -d -r2.459 -r2.460
--- intern.h	23 Apr 2005 16:52:03 -0000	2.459
+++ intern.h	26 Apr 2005 06:47:42 -0000	2.460
@@ -1130,6 +1130,8 @@
 	void o90_getActorData();
 	void o90_startScriptUnk();
 	void o90_jumpToScriptUnk();
+	void o90_smackerOps();
+	void o90_getSmackerData();
 	void o90_wizImageOps();
 	void o90_getDistanceBetweenPoints();
 	void o90_getSpriteInfo();

Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.237
retrieving revision 2.238
diff -u -d -r2.237 -r2.238
--- script_v90he.cpp	21 Apr 2005 19:27:17 -0000	2.237
+++ script_v90he.cpp	26 Apr 2005 06:47:42 -0000	2.238
@@ -98,8 +98,8 @@
 		OPCODE(o90_startScriptUnk),
 		/* 2C */
 		OPCODE(o90_jumpToScriptUnk),
-		OPCODE(o6_invalid),
-		OPCODE(o6_invalid),
+		OPCODE(o90_smackerOps),
+		OPCODE(o90_getSmackerData),
 		OPCODE(o90_floodState),
 		/* 30 */
 		OPCODE(o90_mod),
@@ -510,6 +510,69 @@
 	runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args, cycle);
 }
 
+void ScummEngine_v90he::o90_smackerOps() {
+	byte smackerFilename[260];
+
+	int subOp = fetchScriptByte();
+	subOp -= 49;
+
+	switch (subOp) {
+	case 0:
+		copyScriptString(smackerFilename, sizeof(smackerFilename));
+		break;
+	case 5:
+		pop();
+		break;
+	case 8:
+		memset(smackerFilename, 0, sizeof(smackerFilename));
+		pop();
+		break;
+	case 14:
+		pop();
+		break;
+	case 116:
+		break;
+	case 206:
+		break;
+	default:
+		error("o90_smackerOps: unhandled case %d", subOp);
+	}
+
+	debug(0,"o90_smackerOps stub (%d)", subOp);
+}
+
+void ScummEngine_v90he::o90_getSmackerData() {
+	int subOp = fetchScriptByte();
+	subOp -= 32;
+
+	switch (subOp) {
+	case 0:
+		pop();
+		break;
+	case 1:
+		pop();
+		break;
+	case 4:
+		pop();
+		break;
+	case 20:
+		pop();
+		break;
+	case 31:
+		pop();
+		break;
+	case 107:
+		pop();
+		pop();
+		break;
+	default:
+		error("o90_getSmackerData: unhandled case %d", subOp);
+	}
+
+	push(0);
+	debug(0,"o90_getSmackerData stub (%d)", subOp);
+}
+
 void ScummEngine_v90he::o90_wizImageOps() {
 	int a, b;
 	int subOp = fetchScriptByte();





More information about the Scummvm-git-logs mailing list