diff options
author | Strangerke | 2014-03-18 18:49:36 +0100 |
---|---|---|
committer | Strangerke | 2014-03-18 18:49:36 +0100 |
commit | 306ea295eef03b23882fc4bfa5343b72cb8c4067 (patch) | |
tree | f57273401df03f6c08187e8a83c8d327d04151eb /engines | |
parent | 26c90afdef0d5ecf11935f2b02add292df562de5 (diff) | |
download | scummvm-rg350-306ea295eef03b23882fc4bfa5343b72cb8c4067.tar.gz scummvm-rg350-306ea295eef03b23882fc4bfa5343b72cb8c4067.tar.bz2 scummvm-rg350-306ea295eef03b23882fc4bfa5343b72cb8c4067.zip |
MADS: Add isInInventory()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/inventory.cpp | 3 | ||||
-rw-r--r-- | engines/mads/inventory.h | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/mads/inventory.cpp b/engines/mads/inventory.cpp index 89eaaadb1b..f1a2537d42 100644 --- a/engines/mads/inventory.cpp +++ b/engines/mads/inventory.cpp @@ -88,5 +88,8 @@ bool InventoryObjects::isInRoom(int objectId) const { return (*this)[objectId]._roomNumber == _vm->_game->_scene._currentSceneId; } +bool InventoryObjects::isInInventory(int objectId) const { + return (*this)[objectId]._roomNumber == PLAYER_INVENTORY; +} } // End of namespace MADS diff --git a/engines/mads/inventory.h b/engines/mads/inventory.h index 1eef0f7f82..1ff38abb60 100644 --- a/engines/mads/inventory.h +++ b/engines/mads/inventory.h @@ -87,6 +87,11 @@ public: * Returns true if a given object is in the player's current scene */ bool isInRoom(int objectId) const; + + /** + * Returns true if a given object is in the player's inventory + */ + bool isInInventory(int objectId) const; }; } // End of namespace MADS |