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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Apr 19 03:00:11 CEST 2009


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

Log Message:
-----------
SCUMM: MovedScummEngine_v5:: o5_pickupObjectOld to ScummEngine_v4::o4_pickupObject

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 00:59:50 UTC (rev 40008)
+++ scummvm/trunk/engines/scumm/script_v4.cpp	2009-04-19 01:00:11 UTC (rev 40009)
@@ -32,6 +32,32 @@
 
 void ScummEngine_v4::setupOpcodes() {
 	ScummEngine_v5::setupOpcodes();
+
+	OPCODE(0x50, o4_pickupObject);
+	OPCODE(0xd0, o4_pickupObject);
 }
 
+void ScummEngine_v4::o4_pickupObject() {
+	int obj = getVarOrDirectWord(PARAM_1);
+
+	if (obj < 1) {
+		error("pickupObjectOld received invalid index %d (script %d)", obj, vm.slot[_currentScript].number);
+	}
+
+	if (getObjectIndex(obj) == -1)
+		return;
+
+	if (whereIsObject(obj) == WIO_INVENTORY)	// Don't take an object twice
+		return;
+
+	// debug(0, "adding %d from %d to inventoryOld", obj, _currentRoom);
+	addObjectToInventory(obj, _roomResource);
+	markObjectRectAsDirty(obj);
+	putOwner(obj, VAR(VAR_EGO));
+	putClass(obj, kObjectClassUntouchable, 1);
+	putState(obj, 1);
+	clearDrawObjectQueue();
+	runInventoryScript(1);
+}
+
 } // End of namespace Scumm

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2009-04-19 00:59:50 UTC (rev 40008)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2009-04-19 01:00:11 UTC (rev 40009)
@@ -141,7 +141,7 @@
 	OPCODE(0x4e, o5_putActorAtObject);
 	OPCODE(0x4f, o5_ifState);
 	/* 50 */
-	OPCODE(0x50, o5_pickupObjectOld);
+//	OPCODE(0x50, o5_pickupObjectOld);
 	OPCODE(0x51, o5_animateActor);
 	OPCODE(0x52, o5_actorFollowCamera);
 	OPCODE(0x53, o5_actorOps);
@@ -301,7 +301,7 @@
 	OPCODE(0xce, o5_putActorAtObject);
 	OPCODE(0xcf, o5_ifState);
 	/* D0 */
-	OPCODE(0xd0, o5_pickupObjectOld);
+//	OPCODE(0xd0, o5_pickupObjectOld);
 	OPCODE(0xd1, o5_animateActor);
 	OPCODE(0xd2, o5_actorFollowCamera);
 	OPCODE(0xd3, o5_actorOps);
@@ -3053,27 +3053,4 @@
 	}
 }
 
-void ScummEngine_v5::o5_pickupObjectOld() {
-	int obj = getVarOrDirectWord(PARAM_1);
-
-	if (obj < 1) {
-		error("pickupObjectOld received invalid index %d (script %d)", obj, vm.slot[_currentScript].number);
-	}
-
-	if (getObjectIndex(obj) == -1)
-		return;
-
-	if (whereIsObject(obj) == WIO_INVENTORY)	/* Don't take an */
-		return;											/* object twice */
-
-	// debug(0, "adding %d from %d to inventoryOld", obj, _currentRoom);
-	addObjectToInventory(obj, _roomResource);
-	markObjectRectAsDirty(obj);
-	putOwner(obj, VAR(VAR_EGO));
-	putClass(obj, kObjectClassUntouchable, 1);
-	putState(obj, 1);
-	clearDrawObjectQueue();
-	runInventoryScript(1);
-}
-
 } // End of namespace Scumm

Modified: scummvm/trunk/engines/scumm/scumm_v4.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v4.h	2009-04-19 00:59:50 UTC (rev 40008)
+++ scummvm/trunk/engines/scumm/scumm_v4.h	2009-04-19 01:00:11 UTC (rev 40009)
@@ -50,6 +50,9 @@
 	virtual void readGlobalObjects();
 
 	virtual void resetRoomObject(ObjectData *od, const byte *room, const byte *searchptr = NULL);
+
+	/* Version 4 script opcodes */
+	void o4_pickupObject();
 };
 
 

Modified: scummvm/trunk/engines/scumm/scumm_v5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm_v5.h	2009-04-19 00:59:50 UTC (rev 40008)
+++ scummvm/trunk/engines/scumm/scumm_v5.h	2009-04-19 01:00:11 UTC (rev 40009)
@@ -161,7 +161,6 @@
 	void o5_beginOverride();
 	void o5_panCameraTo();
 	void o5_pickupObject();
-	void o5_pickupObjectOld();
 	void o5_print();
 	void o5_printEgo();
 	void o5_pseudoRoom();


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