[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.59,2.60 script_v2.cpp,2.17,2.18

Pawel Kolodziejski aquadran at users.sourceforge.net
Mon Apr 21 08:47:12 CEST 2003


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

Modified Files:
	intern.h script_v2.cpp 
Log Message:
added two next v2 opcodes

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.59
retrieving revision 2.60
diff -u -d -r2.59 -r2.60
--- intern.h	21 Apr 2003 15:25:27 -0000	2.59
+++ intern.h	21 Apr 2003 15:42:55 -0000	2.60
@@ -241,7 +241,8 @@
 	void o2_verbOps();
 	void o2_doSentence();
 	void o2_ifClassOfIs();
-
+	void o2_walkActorTo();
+	void o2_putActor();
 	void o2_isEqual();
 	void o2_isGreater();
 	void o2_isGreaterEqual();

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.17
retrieving revision 2.18
diff -u -d -r2.17 -r2.18
--- script_v2.cpp	21 Apr 2003 15:28:18 -0000	2.17
+++ script_v2.cpp	21 Apr 2003 15:42:55 -0000	2.18
@@ -34,7 +34,7 @@
 	static const OpcodeEntryV2 opcodes[256] = {
 		/* 00 */
 		OPCODE(o5_stopObjectCode),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_startMusic),
 		OPCODE(o5_getActorRoom),
 		/* 04 */
@@ -74,7 +74,7 @@
 		OPCODE(o2_ifState02),
 		/* 20 */
 		OPCODE(o5_stopMusic),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_getAnimCounter),
 		OPCODE(o5_getActorY),
 		/* 24 */
@@ -110,11 +110,11 @@
 		/* 3C */
 		OPCODE(o5_stopSound),
 		OPCODE(o5_getActorElevation),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o2_ifNotState01),
 		/* 40 */
 		OPCODE(o5_cutscene),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_startScript),
 		OPCODE(o5_getActorX),
 		/* 44 */
@@ -150,7 +150,7 @@
 		/* 5C */
 		OPCODE(o5_oldRoomEffect),
 		OPCODE(o2_ifClassOfIs),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o2_ifNotState02),
 		/* 60 */
 		OPCODE(o5_cursorCommand),
@@ -190,11 +190,11 @@
 		/* 7C */
 		OPCODE(o5_isSoundRunning),
 		OPCODE(o5_getActorElevation),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o5_drawBox),
 		/* 80 */
 		OPCODE(o5_breakHere),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_startMusic),
 		OPCODE(o5_getActorRoom),
 		/* 84 */
@@ -230,11 +230,11 @@
 		/* 9C */
 		OPCODE(o5_startSound),
 		OPCODE(o2_ifClassOfIs),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o2_ifState02),
 		/* A0 */
 		OPCODE(o5_stopObjectCode),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_getAnimCounter),
 		OPCODE(o5_getActorY),
 		/* A4 */
@@ -270,11 +270,11 @@
 		/* BC */
 		OPCODE(o5_stopSound),
 		OPCODE(o5_getActorElevation),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o2_ifNotState01),
 		/* C0 */
 		OPCODE(o5_endCutscene),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_startScript),
 		OPCODE(o5_getActorX),
 		/* C4 */
@@ -310,11 +310,11 @@
 		/* DC */
 		OPCODE(o5_oldRoomEffect),
 		OPCODE(o2_ifClassOfIs),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o2_ifNotState02),
 		/* E0 */
 		OPCODE(o5_cursorCommand),
-		OPCODE(o5_putActor),
+		OPCODE(o2_putActor),
 		OPCODE(o5_stopScript),
 		OPCODE(o5_getActorFacing),
 		/* E4 */
@@ -350,7 +350,7 @@
 		/* FC */
 		OPCODE(o5_isSoundRunning),
 		OPCODE(o5_getActorElevation),
-		OPCODE(o5_walkActorTo),
+		OPCODE(o2_walkActorTo),
 		OPCODE(o2_ifState01)
 	};
 
@@ -881,4 +881,26 @@
 	if ((cls & clsop) != clsop) {
 		o5_jumpRelative();
 	}
+}
+
+void Scumm_v2::o2_walkActorTo() {
+	int x, y;
+	Actor *a;
+	a = derefActorSafe(getVarOrDirectByte(0x80), "o2_walkActorTo");
+	x = getVarOrDirectByte(0x40);
+	y = getVarOrDirectByte(0x20);
+	a->startWalkActor(x, y, -1);
+}
+
+void Scumm_v2::o2_putActor() {
+	int x, y;
+	Actor *a;
+
+	a = derefActorSafe(getVarOrDirectByte(0x80), "o2_putActor");
+	if (!a)
+		return;
+	x = getVarOrDirectByte(0x40);
+	y = getVarOrDirectByte(0x20);
+
+	a->putActor(x, y, a->room);
 }





More information about the Scummvm-git-logs mailing list