diff options
-rw-r--r-- | engines/access/inventory.cpp | 4 | ||||
-rw-r--r-- | engines/access/inventory.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index f465432096..45738462df 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -29,7 +29,7 @@ namespace Access { void InventoryEntry::load(const Common::String &name, const int *data) { - _value = 0; + _value = ITEM_NOT_FOUND; _name = name; _otherItem1 = *data++; _newItem1 = *data++; @@ -279,7 +279,7 @@ void InventoryManager::getList() { _tempLOff.clear(); for (uint i = 0; i < _inv.size(); ++i) { - if (_inv[i]._value == 1) { + if (_inv[i]._value == ITEM_IN_INVENTORY) { _items.push_back(i); _tempLOff.push_back(_inv[i]._name); } diff --git a/engines/access/inventory.h b/engines/access/inventory.h index f2b1f5e182..820b15b40f 100644 --- a/engines/access/inventory.h +++ b/engines/access/inventory.h @@ -32,6 +32,10 @@ namespace Access { +enum ItemState { + ITEM_NOT_FOUND = 0, ITEM_IN_INVENTORY = 1, ITEM_USED = 2 +}; + class InventoryEntry { public: Common::String _name; |