aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/inventory.cpp3
-rw-r--r--engines/mads/inventory.h5
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