diff options
author | Torbjörn Andersson | 2006-10-01 08:36:31 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-10-01 08:36:31 +0000 |
commit | f59bc6f4a17d70c2fd704305cf7ead0d983110c6 (patch) | |
tree | 85549a9e3d5aebcddd86d18e3845674194e88459 | |
parent | 2eb61bd1e31d967b46a60a784937743794f42f2d (diff) | |
download | scummvm-rg350-f59bc6f4a17d70c2fd704305cf7ead0d983110c6.tar.gz scummvm-rg350-f59bc6f4a17d70c2fd704305cf7ead0d983110c6.tar.bz2 scummvm-rg350-f59bc6f4a17d70c2fd704305cf7ead0d983110c6.zip |
Some Elvira opcodes/stubs
svn-id: r24049
-rw-r--r-- | engines/agos/agos.h | 8 | ||||
-rw-r--r-- | engines/agos/items.cpp | 51 |
2 files changed, 57 insertions, 2 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 109a8e1cac..8689a428d3 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -995,8 +995,16 @@ public: 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(); diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 6c4e7340aa..446cf6385f 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -169,11 +169,16 @@ void AGOSEngine::setupAGOSOpcodes(OpcodeProc *op) { 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 @@ void AGOSEngine::o_unfreezeZones() { // 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); } |