aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/dialogs.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-08-06 20:03:56 +1000
committerPaul Gilbert2012-08-06 20:03:56 +1000
commit2dee92a908b84ae870bfdbfd00318549485b7984 (patch)
tree58e315841855fb19fed257bb5b8086a8fde70e29 /engines/tinsel/dialogs.cpp
parent5c522575c7aff4706f3fefe0d7f89272aecd2b66 (diff)
downloadscummvm-rg350-2dee92a908b84ae870bfdbfd00318549485b7984.tar.gz
scummvm-rg350-2dee92a908b84ae870bfdbfd00318549485b7984.tar.bz2
scummvm-rg350-2dee92a908b84ae870bfdbfd00318549485b7984.zip
TINSEL: Fixed portability issue with earlier savegames
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) {