[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.66,2.67 script_v2.cpp,2.27,2.28

Pawel Kolodziejski aquadran at users.sourceforge.net
Sun Apr 27 03:06:03 CEST 2003


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

Modified Files:
	intern.h script_v2.cpp 
Log Message:
more share code, and fixes

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.66
retrieving revision 2.67
diff -u -d -r2.66 -r2.67
--- intern.h	27 Apr 2003 09:39:51 -0000	2.66
+++ intern.h	27 Apr 2003 10:05:36 -0000	2.67
@@ -250,31 +250,23 @@
 	void o2_walkActorToObject();
 	void o2_putActorAtObject();
 	void o2_animateActor();
-	void o2_print();
 	void o2_actorFromPos();
-	void o2_getVerbEntrypoint();
 	void o2_saveLoadGame();
 	void o2_getActorX();
 	void o2_getActorY();
 	void o2_loadRoomWithEgo();
-	void o2_setVarRange();
 	void o2_setOwnerOf();
 	void o2_delayVariable();
-	void o2_putActorInRoom();
 	void o2_matrixOps();
 	void o2_setCameraAt();
 	void o2_roomOps();
-	void o2_getDist();
 	void o2_findObject();
 	void o2_cutscene();
 	void o2_chainScript();
 	void o2_pickupObject();
-	void o2_actorFollowCamera();
 	void o2_setObjectName();
 	void o2_cursorCommand();
-	void o2_stopScript();
 	void o2_getClosestObjActor();
-	void o2_loadRoom();
 	void o2_getActorWalkBox();
 	void o2_endCutscene();
 	void o2_drawSentence();

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.27
retrieving revision 2.28
diff -u -d -r2.27 -r2.28
--- script_v2.cpp	27 Apr 2003 09:39:52 -0000	2.27
+++ script_v2.cpp	27 Apr 2003 10:05:36 -0000	2.28
@@ -58,7 +58,7 @@
 		OPCODE(o2_panCameraTo),
 		OPCODE(o2_actorSet),
 		/* 14 */
-		OPCODE(o2_print),
+		OPCODE(o5_print),
 		OPCODE(o2_actorFromPos),
 		OPCODE(o5_getRandomNr),
 		OPCODE(o2_setState04),
@@ -80,7 +80,7 @@
 		/* 24 */
 		OPCODE(o2_loadRoomWithEgo),
 		OPCODE(o2_drawObject),
-		OPCODE(o2_setVarRange),
+		OPCODE(o5_setVarRange),
 		OPCODE(o2_ifNotState04),
 		/* 28 */
 		OPCODE(o2_equalZero),
@@ -89,7 +89,7 @@
 		OPCODE(o2_delayVariable),
 		/* 2C */
 		OPCODE(o2_assignVarByte),
-		OPCODE(o2_putActorInRoom),
+		OPCODE(o5_putActorInRoom),
 		OPCODE(o5_delay),
 		OPCODE(o2_ifNotState04),
 		/* 30 */
@@ -98,7 +98,7 @@
 		OPCODE(o2_setCameraAt),
 		OPCODE(o2_roomOps),
 		/* 34 */
-		OPCODE(o2_getDist),
+		OPCODE(o5_getDist),
 		OPCODE(o2_findObject),
 		OPCODE(o2_walkActorToObject),
 		OPCODE(o2_setState01),
@@ -135,7 +135,7 @@
 		/* 50 */
 		OPCODE(o2_pickupObject),
 		OPCODE(o2_animateActor),
-		OPCODE(o2_actorFollowCamera),
+		OPCODE(o5_actorFollowCamera),
 		OPCODE(o2_actorSet),
 		/* 54 */
 		OPCODE(o2_setObjectName),
@@ -155,7 +155,7 @@
 		/* 60 */
 		OPCODE(o2_cursorCommand),
 		OPCODE(o2_putActor),
-		OPCODE(o2_stopScript),
+		OPCODE(o5_stopScript),
 		OPCODE(o5_getActorFacing),
 		/* 64 */
 		OPCODE(o2_loadRoomWithEgo),
@@ -169,16 +169,16 @@
 		OPCODE(o5_dummy),
 		/* 6C */
 		OPCODE(o2_getObjY),
-		OPCODE(o2_putActorInRoom),
+		OPCODE(o5_putActorInRoom),
 		OPCODE(o5_dummy),
 		OPCODE(o2_ifState04),
 		/* 70 */
 		OPCODE(o5_lights),
 		OPCODE(o5_getActorCostume),
-		OPCODE(o2_loadRoom),
+		OPCODE(o5_loadRoom),
 		OPCODE(o2_roomOps),
 		/* 74 */
-		OPCODE(o2_getDist),
+		OPCODE(o5_getDist),
 		OPCODE(o2_findObject),
 		OPCODE(o2_walkActorToObject),
 		OPCODE(o2_clearState01),
@@ -218,7 +218,7 @@
 		OPCODE(o2_panCameraTo),
 		OPCODE(o2_actorSet),
 		/* 94 */
-		OPCODE(o2_print),
+		OPCODE(o5_print),
 		OPCODE(o2_actorFromPos),
 		OPCODE(o5_getRandomNr),
 		OPCODE(o2_setState02),
@@ -240,7 +240,7 @@
 		/* A4 */
 		OPCODE(o2_loadRoomWithEgo),
 		OPCODE(o2_drawObject),
-		OPCODE(o2_setVarRange),
+		OPCODE(o5_setVarRange),
 		OPCODE(o2_setState04),
 		/* A8 */
 		OPCODE(o2_notEqualZero),
@@ -249,7 +249,7 @@
 		OPCODE(o5_dummy),
 		/* AC */
 		OPCODE(o2_drawSentence),
-		OPCODE(o2_putActorInRoom),
+		OPCODE(o5_putActorInRoom),
 		OPCODE(o2_waitForSentence),
 		OPCODE(o2_ifNotState04),
 		/* B0 */
@@ -258,7 +258,7 @@
 		OPCODE(o2_setCameraAt),
 		OPCODE(o2_roomOps),
 		/* B4 */
-		OPCODE(o2_getDist),
+		OPCODE(o5_getDist),
 		OPCODE(o2_findObject),
 		OPCODE(o2_walkActorToObject),
 		OPCODE(o2_setState02),
@@ -295,7 +295,7 @@
 		/* D0 */
 		OPCODE(o2_pickupObject),
 		OPCODE(o2_animateActor),
-		OPCODE(o2_actorFollowCamera),
+		OPCODE(o5_actorFollowCamera),
 		OPCODE(o2_actorSet),
 		/* D4 */
 		OPCODE(o2_setObjectName),
@@ -315,7 +315,7 @@
 		/* E0 */
 		OPCODE(o2_cursorCommand),
 		OPCODE(o2_putActor),
-		OPCODE(o2_stopScript),
+		OPCODE(o5_stopScript),
 		OPCODE(o5_getActorFacing),
 		/* E4 */
 		OPCODE(o2_loadRoomWithEgo),
@@ -329,16 +329,16 @@
 		OPCODE(o5_dummy),
 		/* EC */
 		OPCODE(o2_getObjY),
-		OPCODE(o2_putActorInRoom),
+		OPCODE(o5_putActorInRoom),
 		OPCODE(o5_dummy),
 		OPCODE(o2_ifState04),
 		/* F0 */
 		OPCODE(o5_lights),
 		OPCODE(o5_getActorCostume),
-		OPCODE(o2_loadRoom),
+		OPCODE(o5_loadRoom),
 		OPCODE(o2_roomOps),
 		/* F4 */
-		OPCODE(o2_getDist),
+		OPCODE(o5_getDist),
 		OPCODE(o2_findObject),
 		OPCODE(o2_walkActorToObject),
 		OPCODE(o2_clearState01),
@@ -941,11 +941,6 @@
 	a->animateActor(anim);
 }
 
-void Scumm_v2::o2_print() {
-	_actorToPrintStrFor = getVarOrDirectByte(0x80);
-	decodeParseString();
-}
-
 void Scumm_v2::o2_actorFromPos() {
 	int x, y;
 	getResultPos();
@@ -954,15 +949,6 @@
 	_vars[_resultVarNumber] = getActorFromPos(x, y);
 }
 
-void Scumm_v2::o2_getVerbEntrypoint() {
-	int a, b;
-	getResultPos();
-	a = getVarOrDirectWord(0x80);
-	b = getVarOrDirectWord(0x40);
-
-	_vars[_resultVarNumber] = getVerbEntrypoint(a, b);
-}
-
 void Scumm_v2::o2_saveLoadGame() {
 	getResultPos();
 	byte a = getVarOrDirectByte(0x80);
@@ -1016,21 +1002,6 @@
 	runScript(5, 0, 0, 0);
 }
 
-void Scumm_v2::o2_setVarRange() {
-	int a, b;
-
-	getResultPos();
-	a = fetchScriptByte();
-	do {
-		if (_opcode & 0x80)
-			b = fetchScriptWord();
-		else
-			b = fetchScriptByte();
-
-		_vars[_resultVarNumber++] = b;
-	} while (--a);
-}
-
 void Scumm_v2::o2_setOwnerOf() {
 	int obj, owner;
 
@@ -1047,21 +1018,6 @@
 	o5_breakHere();
 }
 
-void Scumm_v2::o2_putActorInRoom() {
-	int room;
-	Actor *a;
-
-	a = derefActorSafe(getVarOrDirectByte(0x80), "o2_putActorInRoom");
-	room = getVarOrDirectByte(0x40);
-
-	if (a == NULL)
-		return;
-
-	a->room = room;
-	if (!room)
-		a->putActor(0, 0, 0);
-}
-
 void Scumm_v2::o2_matrixOps() {
 	int a, b;
 
@@ -1099,17 +1055,10 @@
 	}
 }
 
-void Scumm_v2::o2_getDist() {
-	getResultPos();
-	int o1 = getVarOrDirectWord(0x80);
-	int o2 = getVarOrDirectWord(0x40);
-	_vars[_resultVarNumber] = getObjActToObjActDist(o1, o2);
-}
-
 void Scumm_v2::o2_findObject() {
 	getResultPos();
-	int x = getVarOrDirectWord(0x80);
-	int y = getVarOrDirectWord(0x40);
+	int x = getVarOrDirectByte(0x80);
+	int y = getVarOrDirectByte(0x40);
 	_vars[_resultVarNumber] = findObject(x, y);
 }
 
@@ -1154,10 +1103,6 @@
 	runHook(1);
 }
 
-void Scumm_v2::o2_actorFollowCamera() {
-	actorFollowCamera(getVarOrDirectByte(0x80));
-}
-
 void Scumm_v2::o2_setObjectName() {
 	int obj = getVarOrDirectWord(0x80);
 	int size;
@@ -1199,16 +1144,6 @@
 	// TODO
 }
 
-void Scumm_v2::o2_stopScript() {
-	int script;
-
-	script = getVarOrDirectByte(0x80);
-	if (!script)
-		stopObjectCode();
-	else
-		stopScriptNr(script);
-}
-
 void Scumm_v2::o2_getClosestObjActor() {
 	int obj;
 	int act;
@@ -1229,16 +1164,6 @@
 	} while (--obj >= _vars[VAR_V5_OBJECT_LO]);
 
 	_vars[_resultVarNumber] = closest_dist;
-}
-
-void Scumm_v2::o2_loadRoom() {
-	int room;
-
-	room = getVarOrDirectByte(0x80);
-
-	if (room != _currentRoom)
-		startScene(room, 0, 0);
-	_fullRedraw = 1;
 }
 
 void Scumm_v2::o2_getActorWalkBox() {





More information about the Scummvm-git-logs mailing list