[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.516,2.517 script_c64.cpp,2.13,2.14

Eugene Sandulenko sev at users.sourceforge.net
Mon Sep 5 07:45:25 CEST 2005


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

Modified Files:
	intern.h script_c64.cpp 
Log Message:
Partially fixed utter mess with C64 opcodes.


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.516
retrieving revision 2.517
diff -u -d -r2.516 -r2.517
--- intern.h	2 Sep 2005 11:24:16 -0000	2.516
+++ intern.h	5 Sep 2005 14:44:43 -0000	2.517
@@ -441,6 +441,7 @@
 	void o_setState08();
 	void o_unfreezeScript();
 	void o_decrement();
+	void o_badOpcode();
 };
 
 class ScummEngine_v6 : public ScummEngine {

Index: script_c64.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_c64.cpp,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -d -r2.13 -r2.14
--- script_c64.cpp	14 Aug 2005 01:06:47 -0000	2.13
+++ script_c64.cpp	5 Sep 2005 14:44:43 -0000	2.14
@@ -54,7 +54,7 @@
 		OPCODE(o_loadSound),
 		OPCODE(o5_walkActorToActor),
 		OPCODE(o_putActorAtObject),
-		OPCODE(o2_ifNotState08),
+		OPCODE(o2_clearState02),
 		/* 10 */
 		OPCODE(o5_breakHere),
 		OPCODE(o_animateActor),
@@ -74,7 +74,7 @@
 		OPCODE(o5_startSound),
 		OPCODE(o2_ifClassOfIs),
 		OPCODE(o2_walkActorTo),
-		OPCODE(o2_ifState02),
+		OPCODE(o2_ifState04),
 		/* 20 */
 		OPCODE(o5_stopMusic),
 		OPCODE(o2_putActor),
@@ -94,7 +94,7 @@
 		OPCODE(o2_assignVarByte),
 		OPCODE(o5_putActorInRoom),
 		OPCODE(o2_delay),
-		OPCODE(o2_ifNotState04),
+		OPCODE(o2_ifState08),
 		/* 30 */
 		OPCODE(o_loadActor),
 		OPCODE(o2_getBitVar),
@@ -104,7 +104,7 @@
 		OPCODE(o_getDist),
 		OPCODE(o2_findObject),
 		OPCODE(o_walkActorToObject),
-		OPCODE(o2_setState01),
+		OPCODE(o2_clearState04),
 		/* 38 */
 		OPCODE(o_isLessEqual),
 		OPCODE(o2_doSentence),
@@ -134,7 +134,7 @@
 		OPCODE(o_loadScript),
 		OPCODE(o_unknown4D),
 		OPCODE(o_putActorAtObject),
-		OPCODE(o2_ifState08),
+		OPCODE(o2_clearState02),
 		/* 50 */
 		OPCODE(o2_pickupObject),
 		OPCODE(o_animateActor),
@@ -154,17 +154,17 @@
 		OPCODE(o5_startSound),
 		OPCODE(o2_ifClassOfIs),
 		OPCODE(o2_walkActorTo),
-		OPCODE(o2_ifNotState02),
+		OPCODE(o2_ifState04),
 		/* 60 */
 		OPCODE(o_cursorCommand),
 		OPCODE(o2_putActor),
 		OPCODE(o_stopScript),
-		OPCODE(o5_getActorFacing),
+		OPCODE(o_stopScript),
 		/* 64 */
 		OPCODE(o2_loadRoomWithEgo),
 		OPCODE(o2_drawObject),
 		OPCODE(o5_getClosestObjActor),
-		OPCODE(o2_clearState04),
+		OPCODE(o5_getActorFacing),
 		/* 68 */
 		OPCODE(o5_isScriptRunning),
 		OPCODE(o2_setOwnerOf),
@@ -184,7 +184,7 @@
 		OPCODE(o_getDist),
 		OPCODE(o5_printEgo),
 		OPCODE(o_walkActorToObject),
-		OPCODE(o2_clearState01),
+		OPCODE(o2_clearState04),
 		/* 78 */
 		OPCODE(o_isGreater),
 		OPCODE(o2_doSentence),
@@ -194,7 +194,7 @@
 		OPCODE(o5_isSoundRunning),
 		OPCODE(o2_setActorElevation),
 		OPCODE(o2_walkActorTo),
-		OPCODE(o2_ifState01),
+		OPCODE(o2_ifNotState02),
 		/* 80 */
 		OPCODE(o5_breakHere),
 		OPCODE(o2_putActor),
@@ -203,7 +203,7 @@
 		/* 84 */
 		OPCODE(o_isGreaterEqual),
 		OPCODE(o2_drawObject),
-		OPCODE(o2_getActorElevation),
+		OPCODE(o_badOpcode),
 		OPCODE(o5_getActorRoom),
 		/* 88 */
 		OPCODE(o_isNotEqual),
@@ -214,7 +214,7 @@
 		OPCODE(o2_resourceRoutines),
 		OPCODE(o5_walkActorToActor),
 		OPCODE(o_putActorAtObject),
-		OPCODE(o2_ifNotState08),
+		OPCODE(o2_setState02),
 		/* 90 */
 		OPCODE(o_pickupObject),
 		OPCODE(o_animateActor),
@@ -274,7 +274,7 @@
 		OPCODE(o5_stopSound),
 		OPCODE(o2_setActorElevation),
 		OPCODE(o2_walkActorTo),
-		OPCODE(o2_ifNotState01),
+		OPCODE(o2_ifNotState02),
 		/* C0 */
 		OPCODE(o2_endCutscene),
 		OPCODE(o2_putActor),
@@ -294,7 +294,7 @@
 		OPCODE(o_loadScript),
 		OPCODE(o5_walkActorToActor),
 		OPCODE(o_putActorAtObject),
-		OPCODE(o2_ifState08),
+		OPCODE(o2_setState02),
 		/* D0 */
 		OPCODE(o2_pickupObject),
 		OPCODE(o_animateActor),
@@ -319,12 +319,12 @@
 		OPCODE(o2_cursorCommand),
 		OPCODE(o2_putActor),
 		OPCODE(o_stopScript),
-		OPCODE(o5_getActorFacing),
+		OPCODE(o_stopScript),
 		/* E4 */
 		OPCODE(o2_loadRoomWithEgo),
 		OPCODE(o2_drawObject),
 		OPCODE(o5_getClosestObjActor),
-		OPCODE(o2_clearState04),
+		OPCODE(o5_getActorFacing),
 		/* E8 */
 		OPCODE(o5_isScriptRunning),
 		OPCODE(o2_setOwnerOf),
@@ -420,7 +420,7 @@
 void ScummEngine_c64::o_stopScript() {
 	int script;
 
-	if (_opcode == 0x05) {
+	if (_opcode == 0x05 || _opcode == 0x63 || _opcode == 0xe3) {
 		script = 0;
 	} else {
 		script = getVarOrDirectByte(PARAM_1);
@@ -681,6 +681,10 @@
 	}
 }
 
+void ScummEngine_c64::o_badOpcode() {
+	warning("Bad opcode 0x86 encountered");
+}
+
 #undef PARAM_1
 #undef PARAM_2
 #undef PARAM_3





More information about the Scummvm-git-logs mailing list