diff options
author | Nipun Garg | 2019-06-25 11:00:50 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:00 +0200 |
commit | 4344b2f8c8fd34994f28e86d7707f7803a811c61 (patch) | |
tree | fb8c8e14d0c86d7e71ab1480d8afb06b0f0c74a9 /engines | |
parent | f45904ca3017b82ecdf8c740f24072afcc47d5d4 (diff) | |
download | scummvm-rg350-4344b2f8c8fd34994f28e86d7707f7803a811c61.tar.gz scummvm-rg350-4344b2f8c8fd34994f28e86d7707f7803a811c61.tar.bz2 scummvm-rg350-4344b2f8c8fd34994f28e86d7707f7803a811c61.zip |
HDB: Add getInvItem()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-inventory.cpp | 6 | ||||
-rw-r--r-- | engines/hdb/ai.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/hdb/ai-inventory.cpp b/engines/hdb/ai-inventory.cpp index 25376bf513..09fee3b5b8 100644 --- a/engines/hdb/ai-inventory.cpp +++ b/engines/hdb/ai-inventory.cpp @@ -98,4 +98,10 @@ void AI::clearInventory() { } _numInventory = keepslot; } + +AIEntity *AI::getInvItem(int which) { + if (which >= _numInventory) + return NULL; + return _inventory[which].ent; +} } // End of Namespace diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 815a1ef3a9..4f18a57190 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -835,6 +835,8 @@ public: _numGems = amt; } + AIEntity *getInvItem(int which); + // Player Variables bool _playerDead; bool _playerInvisible; // While on RailRider for example |