diff options
author | Paul Gilbert | 2014-12-14 18:27:29 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-14 18:27:29 -0500 |
commit | 37aefd08f245c0a5de0c11929e06705271952f65 (patch) | |
tree | fbe86aad485ee74024097518863e6f582448e042 /engines/access | |
parent | 450deabd4536eb71671286e52e4b01a03a4e581a (diff) | |
download | scummvm-rg350-37aefd08f245c0a5de0c11929e06705271952f65.tar.gz scummvm-rg350-37aefd08f245c0a5de0c11929e06705271952f65.tar.bz2 scummvm-rg350-37aefd08f245c0a5de0c11929e06705271952f65.zip |
ACCESS: Add enum for inventory items referred in hardcoded logic
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/amazon/amazon_logic.cpp | 9 | ||||
-rw-r--r-- | engines/access/amazon/amazon_resources.h | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index 42f9a243ce..ecc43f5b1e 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -26,6 +26,7 @@ #include "access/screen.h" #include "access/amazon/amazon_game.h" #include "access/amazon/amazon_logic.h" +#include "access/amazon/amazon_resources.h" namespace Access { @@ -1975,7 +1976,7 @@ void Ant::plotPit(int indx, const int *&buf) { _vm->_images.addToList(ie); _vm->_player->_rawPlayer = _pitPos; - if (_vm->_inventory->_inv[76]._value == ITEM_IN_INVENTORY) { + if (_vm->_inventory->_inv[INV_TORCH]._value == ITEM_IN_INVENTORY) { // Player has torch idx = _torchCel; buf = Amazon::TORCH; @@ -1986,7 +1987,7 @@ void Ant::plotPit(int indx, const int *&buf) { _torchCel = idx; plotTorchSpear(idx, buf); } - else if (!_stabFl && (_vm->_inventory->_inv[78]._value == ITEM_IN_INVENTORY)) { + else if (!_stabFl && (_vm->_inventory->_inv[INV_KNIFE_SPEAR]._value == ITEM_IN_INVENTORY)) { // Player has spear idx = 0; buf = Amazon::SPEAR; @@ -2037,7 +2038,7 @@ int Ant::antHandleLeft(int indx, const int *&buf) { int Ant::antHandleStab(int indx, const int *&buf) { int retval = indx; - if (_vm->_inventory->_inv[78]._value == ITEM_IN_INVENTORY) { + if (_vm->_inventory->_inv[INV_KNIFE_SPEAR]._value == ITEM_IN_INVENTORY) { if (_stabFl) { buf = Amazon::PITSTAB; retval = _stabCel; @@ -2114,7 +2115,7 @@ void Ant::doAnt() { buf = Amazon::ANTEAT; } else { buf = Amazon::ANTWALK; - if (_vm->_inventory->_inv[76]._value == ITEM_IN_INVENTORY) + if (_vm->_inventory->_inv[INV_TORCH]._value == ITEM_IN_INVENTORY) // Player has burning torch, which scares the Ant _antDirection = ANT_LEFT; } diff --git a/engines/access/amazon/amazon_resources.h b/engines/access/amazon/amazon_resources.h index 36ae2af092..c4d2cc994d 100644 --- a/engines/access/amazon/amazon_resources.h +++ b/engines/access/amazon/amazon_resources.h @@ -29,6 +29,10 @@ namespace Access { namespace Amazon { +enum InventoryEnum { + INV_BAITED_POLE = 67, INV_TORCH = 76, INV_KNIFE_SPEAR = 78 +}; + struct RiverStruct { int _id; int _width; |