[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.38,1.39 intern.h,2.7,2.8 script_v6.cpp,1.14,1.15 script_v8.cpp,2.8,2.9 vars.cpp,1.7,1.8

Max Horn fingolfin at users.sourceforge.net
Mon Dec 23 07:47:07 CET 2002


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

Modified Files:
	actor.cpp intern.h script_v6.cpp script_v8.cpp vars.cpp 
Log Message:
more V8 mods; cleanup

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- actor.cpp	23 Dec 2002 14:16:43 -0000	1.38
+++ actor.cpp	23 Dec 2002 15:46:53 -0000	1.39
@@ -1214,7 +1214,8 @@
 	 * Note: walk scripts aren't required to make the game
 	 * work as usual
 	 */
-#if 0
+#if 1
+	printf("ignoreTurns = %d\n", ignoreTurns);
 	if (walk_script != 0) {
 		int16 args[16];
 		args[0] = number;

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -d -r2.7 -r2.8
--- intern.h	23 Dec 2002 12:50:38 -0000	2.7
+++ intern.h	23 Dec 2002 15:46:53 -0000	2.8
@@ -209,7 +209,7 @@
 
 	int popRoomAndObj(int *room);
 
-	void decodeParseString2(int a, int b);
+	void decodeParseString(int a, int b);
 	int getStackList(int16 *args, uint maxnum);
 
 	/* Version 6 script opcodes */
@@ -313,7 +313,7 @@
 	void o6_createBoxMatrix();
 	void o6_resourceRoutines();
 	void o6_roomOps();
-	void o6_actorSet();
+	void o6_actorOps();
 	void o6_verbOps();
 	void o6_getActorFromXY();
 	void o6_findObject();
@@ -396,6 +396,8 @@
 	virtual void executeOpcode(int i);
 	virtual const char *getOpcodeDesc(int i);
 
+	virtual void setupScummVars();
+
 	virtual uint fetchScriptWord();
 	virtual int fetchScriptWordSigned();
 
@@ -405,12 +407,24 @@
 
 	void o8_mod();
 	void o8_wait();
+
+	void o8_dim();
+	void o8_dim2();
+	void o8_arrayAssign();
+	void o8_printLine();
+	void o8_printCursor();
+	void o8_printDebug();
+	void o8_printSystem();
+
 	void o8_cursorCommand();
 	void o8_resourceRoutines();
 	void o8_roomOps();
-	void o8_actorSet();
-	void o8_cameraStuff();
+	void o8_actorOps();
+	void o8_cameraOps();
 	void o8_verbOps();
+	
+	void o8_system();
+	void o8_kludge();
 };
 
 

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- script_v6.cpp	23 Dec 2002 14:16:43 -0000	1.14
+++ script_v6.cpp	23 Dec 2002 15:46:53 -0000	1.15
@@ -168,8 +168,8 @@
 		OPCODE(o6_drawBlastObject),
 		/* 64 */
 		OPCODE(o6_setBlastObjectWindow),
-		OPCODE(o6_stopObjectCode),
-		OPCODE(o6_stopObjectCode),
+		OPCODE(o6_stopObjectCode),	// FIXME - are 0x65 and 0x66 really the same?
+		OPCODE(o6_stopObjectCode),	// FIXME - are 0x65 and 0x66 really the same?
 		OPCODE(o6_endCutscene),
 		/* 68 */
 		OPCODE(o6_cutscene),
@@ -238,7 +238,7 @@
 		OPCODE(o6_resourceRoutines),
 		/* 9C */
 		OPCODE(o6_roomOps),
-		OPCODE(o6_actorSet),
+		OPCODE(o6_actorOps),
 		OPCODE(o6_verbOps),
 		OPCODE(o6_getActorFromXY),
 		/* A0 */
@@ -377,19 +377,6 @@
 	return _opcodesV6[i].desc;
 }
 
-void Scumm_v6::o6_setBlastObjectWindow()
-{																// Set BOMP processing window
-	int a, b, c, d;
-
-	d = pop();
-	c = pop();
-	b = pop();
-	a = pop();
-
-	warning("o6_bompWindow(%d, %d, %d, %d)", a, b, c, d);
-	// sub_274EF(a, b, c, d);
-}
-
 int Scumm_v6::popRoomAndObj(int *room)
 {
 	int obj;
@@ -1023,15 +1010,7 @@
 
 void Scumm_v6::o6_loadRoom()
 {
-	int room;
-	/* Begin: Autosave 
-	   _saveLoadSlot = 0;
-	   sprintf(_saveLoadName, "Autosave", _saveLoadSlot);
-	   _saveLoadFlag = 1;
-	   _saveLoadCompatible = false;
-	   End: Autosave */
-
-	room = pop();
+	int room = pop();
 	startScene(room, 0, 0);
 	_fullRedraw = 1;
 }
@@ -1617,7 +1596,7 @@
 	}
 }
 
-void Scumm_v6::o6_actorSet()
+void Scumm_v6::o6_actorOps()
 {
 	Actor *a;
 	int i, j, k;
@@ -1630,7 +1609,7 @@
 		return;
 	}
 
-	a = derefActorSafe(_curActor, "o6_actorSet");
+	a = derefActorSafe(_curActor, "o6_actorOps");
 	if (!a)
 		return;
 
@@ -1778,7 +1757,7 @@
 		a->talk_script = pop();
 		break;
 	default:
-		error("o6_actorset: default case %d", b);
+		error("o6_actorOps: default case %d", b);
 	}
 }
 
@@ -2222,33 +2201,33 @@
 void Scumm_v6::o6_print_0()
 {
 	_actorToPrintStrFor = 0xFF;
-	decodeParseString2(0, 0);
+	decodeParseString(0, 0);
 }
 
 void Scumm_v6::o6_print_1()
 {
-	decodeParseString2(1, 0);
+	decodeParseString(1, 0);
 }
 
 void Scumm_v6::o6_print_2()
 {
-	decodeParseString2(2, 0);
+	decodeParseString(2, 0);
 }
 
 void Scumm_v6::o6_print_3()
 {
-	decodeParseString2(3, 0);
+	decodeParseString(3, 0);
 }
 
 void Scumm_v6::o6_printActor()
 {
-	decodeParseString2(0, 1);
+	decodeParseString(0, 1);
 }
 
 void Scumm_v6::o6_printEgo()
 {
 	push(_vars[VAR_EGO]);
-	decodeParseString2(0, 1);
+	decodeParseString(0, 1);
 }
 
 void Scumm_v6::o6_talkActor()
@@ -2444,6 +2423,21 @@
 	enqueueObject(a, b, c, d, e, 0xFF, 0xFF, 1, 0);
 }
 
+// Set BOMP processing window
+void Scumm_v6::o6_setBlastObjectWindow()
+{
+	// TODO - implement this
+	int a, b, c, d;
+
+	d = pop();
+	c = pop();
+	b = pop();
+	a = pop();
+
+	warning("o6_bompWindow(%d, %d, %d, %d)", a, b, c, d);
+	// sub_274EF(a, b, c, d);
+}
+
 void Scumm_v6::o6_miscOps()
 {
 	int16 args[30];
@@ -2891,7 +2885,7 @@
 	warning("o6_unknownCD: stub(%d, %d, %d, %d)", a, b, c, d);
 }
 
-void Scumm_v6::decodeParseString2(int m, int n)
+void Scumm_v6::decodeParseString(int m, int n)
 {
 	byte b;
 
@@ -2922,7 +2916,7 @@
 		_string[m].no_talk_anim = false;
 		break;
 	case 73:
-		error("decodeParseString2: case 73");
+		error("decodeParseString: case 73");
 		break;
 	case 74:
 		_string[m].no_talk_anim = true;

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -d -r2.8 -r2.9
--- script_v8.cpp	23 Dec 2002 14:16:43 -0000	2.8
+++ script_v8.cpp	23 Dec 2002 15:46:53 -0000	2.9
@@ -176,23 +176,23 @@
 		OPCODE(o6_wordVarInc),
 		OPCODE(o6_wordVarDec),
 		/* 70 */
-		OPCODE(o6_dim),
+		OPCODE(o8_dim),
 		OPCODE(o6_wordArrayWrite),
 		OPCODE(o6_wordArrayInc),
 		OPCODE(o6_wordArrayDec),
 		/* 74 */
-		OPCODE(o6_dim2),
+		OPCODE(o8_dim2),
 		OPCODE(o6_wordArrayIndexedWrite),
-		OPCODE(o8_unknown),
+		OPCODE(o8_arrayAssign),
 		OPCODE(o8_unknown),
 		/* 78 */
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_startScript),
+		OPCODE(o6_startScriptQuick),
+		OPCODE(o6_stopObjectCode),
 		/* 7C */
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_jumpToScript),	// FIXME - is this right? "O_CHAIN_SCRIPT"
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
 		/* 80 */
@@ -207,7 +207,7 @@
 		OPCODE(o8_unknown),
 		/* 88 */
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_setClass),
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
 		/* 8C */
@@ -219,11 +219,11 @@
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o8_printLine),
 		/* 94 */
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o8_printCursor),
+		OPCODE(o8_printDebug),
+		OPCODE(o8_printSystem),
 		OPCODE(o8_unknown),
 		/* 98 */
 		OPCODE(o8_unknown),
@@ -232,18 +232,18 @@
 		OPCODE(o8_unknown),
 		/* 9C */
 		OPCODE(o8_cursorCommand),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_loadRoom),
+		OPCODE(o6_loadRoomWithEgo),	// FIXME - this is a pure guess
+		OPCODE(o6_walkActorToObj),
 		/* A0 */
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_walkActorTo),
+		OPCODE(o6_putActorInRoom),
+		OPCODE(o6_putActorAtObject),
+		OPCODE(o6_faceActor),
 		/* A4 */
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_animateActor),
+		OPCODE(o6_doSentence),
+		OPCODE(o6_pickupObject),
 		OPCODE(o8_unknown),
 		/* A8 */
 		OPCODE(o8_unknown),
@@ -251,15 +251,15 @@
 		OPCODE(o8_resourceRoutines),
 		OPCODE(o8_roomOps),
 		/* AC */
-		OPCODE(o8_actorSet),
-		OPCODE(o8_cameraStuff),
+		OPCODE(o8_actorOps),
+		OPCODE(o8_cameraOps),
 		OPCODE(o8_verbOps),
 		OPCODE(o8_unknown),
 		/* B0 */
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o8_system),
 		/* B4 */
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
@@ -268,7 +268,7 @@
 		/* B8 */
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o8_kludge),
 		OPCODE(o8_unknown),
 		/* BC */
 		OPCODE(o8_unknown),
@@ -292,18 +292,18 @@
 		OPCODE(o8_unknown),
 		/* CC */
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_isAnyOf),
 		OPCODE(o6_getRandomNumber),
 		OPCODE(o6_getRandomNumberRange),
 		/* D0 */
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_isScriptRunning),
 		/* D4 */
 		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
-		OPCODE(o8_unknown),
+		OPCODE(o6_isSoundRunning),
+		OPCODE(o6_abs),
 		OPCODE(o8_unknown),
 		/* D8 */
 		OPCODE(o8_unknown),
@@ -422,6 +422,34 @@
 	}
 }
 
+void Scumm_v8::o8_dim()
+{
+}
+
+void Scumm_v8::o8_dim2()
+{
+}
+
+void Scumm_v8::o8_arrayAssign()
+{
+}
+
+void Scumm_v8::o8_printLine()
+{
+}
+
+void Scumm_v8::o8_printCursor()
+{
+}
+
+void Scumm_v8::o8_printDebug()
+{
+}
+
+void Scumm_v8::o8_printSystem()
+{
+}
+
 void Scumm_v8::o8_cursorCommand()
 {
 	// TODO
@@ -498,13 +526,13 @@
 	}
 }
 
-void Scumm_v8::o8_actorSet()
+void Scumm_v8::o8_actorOps()
 {
 	// TODO
 	byte subOp = fetchScriptByte();
 	Actor *a;
 
-	a = derefActorSafe(_curActor, "o8_actorSet");
+	a = derefActorSafe(_curActor, "o8_actorOps");
 	if (!a)
 		return;
 
@@ -548,11 +576,11 @@
 	case 0x88:		// SO_ACTOR_FREQUENCY Set frequency of actor speech
 	case 0x89:		// SO_ACTOR_PAN
 	default:
-		error("o8_actorset: default case %d", subOp);
+		error("o8_actorOps: default case %d", subOp);
 	}
 }
 
-void Scumm_v8::o8_cameraStuff()
+void Scumm_v8::o8_cameraOps()
 {
 	// TODO
 	byte subOp = fetchScriptByte();
@@ -560,7 +588,7 @@
 	case 0x32:		// SO_CAMERA_PAUSE
 	case 0x33:		// SO_CAMERA_RESUME
 	default:
-		error("o8_cameraStuff: default case %d", subOp);
+		error("o8_cameraOps: default case %d", subOp);
 	}
 }
 
@@ -590,6 +618,15 @@
 	default:
 		error("o8_verbops: default case %d", subOp);
 	}
+}
+
+
+void Scumm_v8::o8_system()
+{
+}
+
+void Scumm_v8::o8_kludge()
+{
 }
 
 /*

Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- vars.cpp	22 Dec 2002 21:58:16 -0000	1.7
+++ vars.cpp	23 Dec 2002 15:46:53 -0000	1.8
@@ -142,14 +142,10 @@
 	VAR_NEW_ROOM = 35;
 	VAR_WALKTO_OBJ = 36;
 
-
 	VAR_CAMERA_DEST_X = 38;
-
 	VAR_CAMERA_DEST_Y = 39;
-
 	VAR_CAMERA_FOLLOWED_ACTOR = 40;
 
-
 	VAR_SCROLL_SCRIPT = 50;
 	VAR_ENTRY_SCRIPT = 51;
 	VAR_ENTRY_SCRIPT2 = 52;
@@ -206,4 +202,31 @@
 
 	VAR_V6_EMSSPACE = 32;
 	VAR_STRING2DRAW = 130;
+}
+
+void Scumm_v8::setupScummVars()
+{
+	VAR_MOUSE_X = 3;
+	VAR_MOUSE_Y = 4;
+	VAR_VIRT_MOUSE_X = 5;
+	VAR_VIRT_MOUSE_Y = 6;
+
+	VAR_CAMERA_POS_X = 9;
+	VAR_CAMERA_POS_Y = 10;
+	VAR_CAMERA_DEST_X = 11;
+	VAR_CAMERA_DEST_Y = 12;
+
+	VAR_ROOM = 31;
+
+	VAR_ENTRY_SCRIPT = 51;
+	VAR_ENTRY_SCRIPT2 = 52;
+	VAR_EXIT_SCRIPT = 53;
+	VAR_EXIT_SCRIPT2 = 54;
+	VAR_SENTENCE_SCRIPT = 56;
+	VAR_HOOK_SCRIPT = 57;
+	VAR_CUTSCENE_START_SCRIPT = 58;
+	VAR_CUTSCENE_END_SCRIPT = 59;
+
+	VAR_PAUSE_KEY = 64;				// ???
+	VAR_SAVELOADDIALOG_KEY = 65;	// ???
 }





More information about the Scummvm-git-logs mailing list