[Scummvm-cvs-logs] SF.net SVN: scummvm: [24049] scummvm/trunk/engines/agos

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Oct 1 10:36:40 CEST 2006


Revision: 24049
          http://svn.sourceforge.net/scummvm/?rev=24049&view=rev
Author:   eriktorbjorn
Date:     2006-10-01 01:36:31 -0700 (Sun, 01 Oct 2006)

Log Message:
-----------
Some Elvira opcodes/stubs

Modified Paths:
--------------
    scummvm/trunk/engines/agos/agos.h
    scummvm/trunk/engines/agos/items.cpp

Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h	2006-10-01 07:22:01 UTC (rev 24048)
+++ scummvm/trunk/engines/agos/agos.h	2006-10-01 08:36:31 UTC (rev 24049)
@@ -995,8 +995,16 @@
 	uint16 getExitOf(Item *item, uint16 d);
 
 	// Opcodes, Elvira 1 only
+	void oe1_present();
+	void oe1_notPresent();
+	void oe1_worn();
+	void oe1_notWorn();
+	void oe1_notCarried();
 	void oe1_setFF();
 	void oe1_zoneDisk();
+	void oe1_isNotAt();
+	void oe1_sibling();
+	void oe1_notSibling();
 	void oe1_opcode176();
 	void oe1_opcode178();
 

Modified: scummvm/trunk/engines/agos/items.cpp
===================================================================
--- scummvm/trunk/engines/agos/items.cpp	2006-10-01 07:22:01 UTC (rev 24048)
+++ scummvm/trunk/engines/agos/items.cpp	2006-10-01 08:36:31 UTC (rev 24049)
@@ -169,11 +169,16 @@
 void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) {
 	op[0] = &AGOSEngine::o_at;
 	op[1] = &AGOSEngine::o_notAt;
-
+	op[2] = &AGOSEngine::oe1_present;
+	op[3] = &AGOSEngine::oe1_notPresent;
+	op[4] = &AGOSEngine::oe1_worn;
+	op[5] = &AGOSEngine::oe1_notWorn;
 	op[6] = &AGOSEngine::o_carried;
 	op[7] = &AGOSEngine::o_notCarried;
 	op[8] = &AGOSEngine::o_isAt;
-
+	op[9] = &AGOSEngine::oe1_isNotAt;
+	op[10] = &AGOSEngine::oe1_sibling;
+	op[11] = &AGOSEngine::oe1_notSibling;
 	op[12] = &AGOSEngine::o_zero;
 	op[13] = &AGOSEngine::o_notZero;
 	op[14] = &AGOSEngine::o_eq;
@@ -1650,6 +1655,48 @@
 // Elvira 1 Opcodes
 // -----------------------------------------------------------------------
 
+void AGOSEngine::oe1_present() {
+	// 2: present (here or carried)
+	Item *item = getNextItemPtr();
+	setScriptCondition(item->parent == getItem1ID() || item->parent == me()->parent);
+}
+
+void AGOSEngine::oe1_notPresent() {
+	// 3: not present (neither here nor carried)
+	Item *item = getNextItemPtr();
+	setScriptCondition(item->parent != getItem1ID() && item->parent != me()->parent);
+}
+
+void AGOSEngine::oe1_worn() {
+	// 4: worn
+	getNextItemPtr();
+}
+
+void AGOSEngine::oe1_notWorn() {
+	// 5: not worn
+	getNextItemPtr();
+}
+
+void AGOSEngine::oe1_isNotAt() {
+	// 9: parent is not
+	Item *item = getNextItemPtr();
+	setScriptCondition(item->parent != getNextItemID());
+}
+
+void AGOSEngine::oe1_sibling() {
+	// 10: sibling
+	Item *item1 = getNextItemPtr();
+	Item *item2 = getNextItemPtr();
+	setScriptCondition(item1->parent == item2->parent);
+}
+
+void AGOSEngine::oe1_notSibling() {
+	// 11: not sibling
+	Item *item1 = getNextItemPtr();
+	Item *item2 = getNextItemPtr();
+	setScriptCondition(item1->parent != item2->parent);
+}
+
 void AGOSEngine::oe1_setFF() {
 	writeNextVarContents(0xFF);
 }


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