aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/globals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4/globals.cpp')
-rw-r--r--engines/m4/globals.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp
index f4aab8ae8f..7a0b776eb8 100644
--- a/engines/m4/globals.cpp
+++ b/engines/m4/globals.cpp
@@ -380,6 +380,15 @@ void MadsGlobals::loadMadsObjects() {
_vm->res()->toss("objects.dat");
}
+int MadsGlobals::getObjectIndex(uint16 descId) {
+ for (uint i = 0; i < _madsObjects.size(); ++i) {
+ if (_madsObjects[i].get()->_descId == descId)
+ return i;
+ }
+
+ return -1;
+}
+
int MadsGlobals::messageIndexOf(uint32 messageId) {
for (uint i = 0; i < _madsMessages.size(); ++i)
{