aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-07 21:29:21 -0500
committerPaul Gilbert2014-12-12 22:24:21 -0500
commit63bacba2d906f650e702ba544c5a49528452b5b2 (patch)
tree76afea7fe5b8fe264c7144a2e83aeec1e5cf8359 /engines
parent712261f02a84700ed014b2e2e16a0f13e2c6f93c (diff)
downloadscummvm-rg350-63bacba2d906f650e702ba544c5a49528452b5b2.tar.gz
scummvm-rg350-63bacba2d906f650e702ba544c5a49528452b5b2.tar.bz2
scummvm-rg350-63bacba2d906f650e702ba544c5a49528452b5b2.zip
ACCESS: Add enum for inventory item states
Diffstat (limited to 'engines')
-rw-r--r--engines/access/inventory.cpp4
-rw-r--r--engines/access/inventory.h4
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;