aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tinsel/dialogs.cpp')
-rw-r--r--engines/tinsel/dialogs.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index dde34841cf..56ee2ea752 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -1263,6 +1263,20 @@ static INV_OBJECT *GetInvObject(int id) {
}
/**
+ * Returns true if the given id represents a valid inventory object
+ */
+bool GetIsInvObject(int id) {
+ INV_OBJECT *pObject = g_invObjects;
+
+ for (int i = 0; i < g_numObjects; i++, pObject++) {
+ if (pObject->id == id)
+ return true;
+ }
+
+ return false;
+}
+
+/**
* Convert item ID number to index.
*/
static int GetObjectIndex(int id) {