diff options
Diffstat (limited to 'engines/m4/globals.cpp')
-rw-r--r-- | engines/m4/globals.cpp | 9 |
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) { |