[Scummvm-cvs-logs] SF.net SVN: scummvm:[40013] scummvm/trunk/engines/scumm

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Apr 19 03:01:29 CEST 2009


Revision: 40013
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40013&view=rev
Author:   fingolfin
Date:     2009-04-19 01:01:28 +0000 (Sun, 19 Apr 2009)

Log Message:
-----------
SCUMM: o5_ifNotState and o5_ifState are actually not part of v5, only in v3 & v4 -> renamed and moved them accordingly

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/script_v4.cpp
    scummvm/trunk/engines/scumm/script_v5.cpp
    scummvm/trunk/engines/scumm/scumm_v4.h
    scummvm/trunk/engines/scumm/scumm_v5.h

Modified: scummvm/trunk/engines/scumm/script_v4.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v4.cpp	2009-04-19 01:01:09 UTC (rev 40012)
+++ scummvm/trunk/engines/scumm/script_v4.cpp	2009-04-19 01:01:28 UTC (rev 40013)
@@ -45,8 +45,37 @@
 
 	OPCODE(0x5c, o4_oldRoomEffect);
 	OPCODE(0xdc, o4_oldRoomEffect);
+
+	OPCODE(0x0f, o4_ifState);
+	OPCODE(0x2f, o4_ifNotState);
+	OPCODE(0x4f, o4_ifState);
+	OPCODE(0x6f, o4_ifNotState);
+	OPCODE(0x8f, o4_ifState);
+	OPCODE(0xaf, o4_ifNotState);
+	OPCODE(0xcf, o4_ifState);
+	OPCODE(0xef, o4_ifNotState);
 }
 
+void ScummEngine_v4::o4_ifState() {
+	int a = getVarOrDirectWord(PARAM_1);
+	int b = getVarOrDirectByte(PARAM_2);
+
+	if (getState(a) != b)
+		o5_jumpRelative();
+	else
+		ignoreScriptWord();
+}
+
+void ScummEngine_v4::o4_ifNotState() {
+	int a = getVarOrDirectWord(PARAM_1);
+	int b = getVarOrDirectByte(PARAM_2);
+
+	if (getState(a) == b)
+		o5_jumpRelative();
+	else
+		ignoreScriptWord();
+}
+
 void ScummEngine_v4::o4_pickupObject() {
 	int obj = getVarOrDirectWord(PARAM_1);
 

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2009-04-19 01:01:09 UTC (rev 40012)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2009-04-19 01:01:28 UTC (rev 40013)
@@ -98,7 +98,7 @@
 	OPCODE(0x2c, o5_cursorCommand);
 	OPCODE(0x2d, o5_putActorInRoom);
 	OPCODE(0x2e, o5_delay);
-	OPCODE(0x2f, o5_ifNotState);
+//	OPCODE(0x2f, o5_ifNotState);
 	/* 30 */
 	OPCODE(0x30, o5_matrixOps);
 	OPCODE(0x31, o5_getInventoryCount);
@@ -138,7 +138,7 @@
 	OPCODE(0x4c, o5_soundKludge);
 	OPCODE(0x4d, o5_walkActorToActor);
 	OPCODE(0x4e, o5_putActorAtObject);
-	OPCODE(0x4f, o5_ifState);
+//	OPCODE(0x4f, o5_ifState);
 	/* 50 */
 //	OPCODE(0x50, o5_pickupObjectOld);
 	OPCODE(0x51, o5_animateActor);
@@ -178,7 +178,7 @@
 	OPCODE(0x6c, o5_getActorWidth);
 	OPCODE(0x6d, o5_putActorInRoom);
 	OPCODE(0x6e, o5_stopObjectScript);
-	OPCODE(0x6f, o5_ifNotState);
+//	OPCODE(0x6f, o5_ifNotState);
 	/* 70 */
 	OPCODE(0x70, o5_lights);
 	OPCODE(0x71, o5_getActorCostume);
@@ -258,7 +258,7 @@
 	OPCODE(0xac, o5_expression);
 	OPCODE(0xad, o5_putActorInRoom);
 	OPCODE(0xae, o5_wait);
-	OPCODE(0xaf, o5_ifNotState);
+//	OPCODE(0xaf, o5_ifNotState);
 	/* B0 */
 	OPCODE(0xb0, o5_matrixOps);
 	OPCODE(0xb1, o5_getInventoryCount);
@@ -298,7 +298,7 @@
 	OPCODE(0xcc, o5_pseudoRoom);
 	OPCODE(0xcd, o5_walkActorToActor);
 	OPCODE(0xce, o5_putActorAtObject);
-	OPCODE(0xcf, o5_ifState);
+//	OPCODE(0xcf, o5_ifState);
 	/* D0 */
 //	OPCODE(0xd0, o5_pickupObjectOld);
 	OPCODE(0xd1, o5_animateActor);
@@ -338,7 +338,7 @@
 	OPCODE(0xec, o5_getActorWidth);
 	OPCODE(0xed, o5_putActorInRoom);
 	OPCODE(0xee, o5_stopObjectScript);
-	OPCODE(0xef, o5_ifNotState);
+//	OPCODE(0xef, o5_ifNotState);
 	/* F0 */
 	OPCODE(0xf0, o5_lights);
 	OPCODE(0xf1, o5_getActorCostume);
@@ -1407,34 +1407,10 @@
 }
 
 void ScummEngine_v5::o5_getObjectState() {
-	if (_game.features & GF_SMALL_HEADER) {
-		o5_ifState();
-	} else {
-		getResultPos();
-		setResult(getState(getVarOrDirectWord(PARAM_1)));
-	}
+	getResultPos();
+	setResult(getState(getVarOrDirectWord(PARAM_1)));
 }
 
-void ScummEngine_v5::o5_ifState() {
-	int a = getVarOrDirectWord(PARAM_1);
-	int b = getVarOrDirectByte(PARAM_2);
-
-	if (getState(a) != b)
-		o5_jumpRelative();
-	else
-		ignoreScriptWord();
-}
-
-void ScummEngine_v5::o5_ifNotState() {
-	int a = getVarOrDirectWord(PARAM_1);
-	int b = getVarOrDirectByte(PARAM_2);
-
-	if (getState(a) == b)
-		o5_jumpRelative();
-	else
-		ignoreScriptWord();
-}
-
 void ScummEngine_v5::o5_getRandomNr() {
 	getResultPos();
 	setResult(_rnd.getRandomNumber(getVarOrDirectByte(PARAM_1)));

Modified: scummvm/trunk/engines/scumm/scumm_v4.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v4.h	2009-04-19 01:01:09 UTC (rev 40012)
+++ scummvm/trunk/engines/scumm/scumm_v4.h	2009-04-19 01:01:28 UTC (rev 40013)
@@ -52,6 +52,8 @@
 	virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
 
 	/* Version 4 script opcodes */
+	void o4_ifState();
+	void o4_ifNotState();
 	void o4_oldRoomEffect();
 	void o4_pickupObject();
 };

Modified: scummvm/trunk/engines/scumm/scumm_v5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v5.h	2009-04-19 01:01:09 UTC (rev 40012)
+++ scummvm/trunk/engines/scumm/scumm_v5.h	2009-04-19 01:01:28 UTC (rev 40013)
@@ -136,8 +136,6 @@
 	void o5_getStringWidth();
 	void o5_getVerbEntrypoint();
 	void o5_ifClassOfIs();
-	void o5_ifNotState();
-	void o5_ifState();
 	void o5_increment();
 	void o5_isActorInBox();
 	void o5_isEqual();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list