diff options
-rw-r--r-- | engines/adl/adl.cpp | 8 | ||||
-rw-r--r-- | engines/adl/adl.h | 8 | ||||
-rw-r--r-- | engines/adl/adl_v2.cpp | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index b3ac12d8e6..9bd22f89c3 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -448,14 +448,14 @@ void AdlEngine::takeItem(byte noun) { } if (item->state == IDI_ITEM_DROPPED) { - item->room = IDI_NONE; + item->room = IDI_ANY; return; } Common::Array<byte>::const_iterator pic; for (pic = item->roomPictures.begin(); pic != item->roomPictures.end(); ++pic) { if (matchesCurrentPic(*pic)) { - item->room = IDI_NONE; + item->room = IDI_ANY; item->state = IDI_ITEM_DROPPED; return; } @@ -469,7 +469,7 @@ void AdlEngine::dropItem(byte noun) { Common::Array<Item>::iterator item; for (item = _state.items.begin(); item != _state.items.end(); ++item) { - if (item->noun != noun || item->room != IDI_NONE) + if (item->noun != noun || item->room != IDI_ANY) continue; item->room = _state.room; @@ -905,7 +905,7 @@ int AdlEngine::o1_listInv(ScriptEnv &e) { Common::Array<Item>::const_iterator item; for (item = _state.items.begin(); item != _state.items.end(); ++item) - if (item->room == IDI_NONE) + if (item->room == IDI_ANY) printMessage(item->description); return 0; diff --git a/engines/adl/adl.h b/engines/adl/adl.h index 57036b9bb3..ea6a51c68a 100644 --- a/engines/adl/adl.h +++ b/engines/adl/adl.h @@ -54,7 +54,7 @@ struct ScriptEnv; #define IDO_ACT_SAVE 0x0f #define IDO_ACT_LOAD 0x10 -#define IDI_NONE 0xfe +#define IDI_ANY 0xfe #define IDI_WORD_SIZE 8 @@ -104,9 +104,9 @@ public: void skip(uint i) { _ip += i; } bool isMatch() const { - return (_cmd.room == IDI_NONE || _cmd.room == _room) && - (_cmd.verb == IDI_NONE || _cmd.verb == _verb) && - (_cmd.noun == IDI_NONE || _cmd.noun == _noun); + return (_cmd.room == IDI_ANY || _cmd.room == _room) && + (_cmd.verb == IDI_ANY || _cmd.verb == _verb) && + (_cmd.noun == IDI_ANY || _cmd.noun == _noun); } byte getCondCount() const { return _cmd.numCond; } diff --git a/engines/adl/adl_v2.cpp b/engines/adl/adl_v2.cpp index 61077d5aae..3383a6307a 100644 --- a/engines/adl/adl_v2.cpp +++ b/engines/adl/adl_v2.cpp @@ -101,7 +101,7 @@ void AdlEngine_v2::setupOpcodeTables() { } bool AdlEngine_v2::matchesCurrentPic(byte pic) const { - return pic == getCurRoom().curPicture || pic == IDI_NONE; + return pic == getCurRoom().curPicture || pic == IDI_ANY; } int AdlEngine_v2::o2_isFirstTime(ScriptEnv &e) { @@ -155,7 +155,7 @@ int AdlEngine_v2::o2_isCarryingSomething(ScriptEnv &e) { Common::Array<Item>::const_iterator item; for (item = _state.items.begin(); item != _state.items.end(); ++item) - if (item->room == IDI_NONE) + if (item->room == IDI_ANY) return 0; return -1; } @@ -169,7 +169,7 @@ int AdlEngine_v2::o2_moveItem(ScriptEnv &e) { Item &item = getItem(e.arg(1)); // Set items that move from inventory to a room to state "dropped" - if (item.room == IDI_NONE && room != IDI_VOID_ROOM) + if (item.room == IDI_ANY && room != IDI_VOID_ROOM) item.state = IDI_ITEM_DROPPED; item.room = room; @@ -192,7 +192,7 @@ int AdlEngine_v2::o2_moveAllItems(ScriptEnv &e) { for (item = _state.items.begin(); item != _state.items.end(); ++item) if (item->room == room1) { item->room = room2; - if (room1 == IDI_NONE) + if (room1 == IDI_ANY) item->state = IDI_ITEM_DROPPED; } |