diff options
-rw-r--r-- | engines/dm/objectman.cpp | 13 | ||||
-rw-r--r-- | engines/dm/objectman.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/engines/dm/objectman.cpp b/engines/dm/objectman.cpp index 4ab760d53a..e65b061225 100644 --- a/engines/dm/objectman.cpp +++ b/engines/dm/objectman.cpp @@ -1,8 +1,21 @@ #include "objectman.h" +#include "dungeonman.h" namespace DM { ObjectMan::ObjectMan(DMEngine *vm): _vm(vm) {} +IconIndice ObjectMan::getObjectType(Thing thing) { + if (thing == Thing::_thingNone) + return kIconIndiceNone; + + int16 objectInfoIndex = _vm->_dungeonMan->getObjectInfoIndex(thing); + if (objectInfoIndex != -1) { + objectInfoIndex = gObjectInfo[objectInfoIndex]._type; + } + return (IconIndice)objectInfoIndex; +} + + }
\ No newline at end of file diff --git a/engines/dm/objectman.h b/engines/dm/objectman.h index 347703c86f..6421d7c04f 100644 --- a/engines/dm/objectman.h +++ b/engines/dm/objectman.h @@ -1,4 +1,5 @@ #include "dm.h" +#include "champion.h" namespace DM { @@ -7,6 +8,7 @@ class ObjectMan { DMEngine *_vm; public: ObjectMan(DMEngine *vm); + IconIndice getObjectType(Thing thing); // @ F0032_OBJECT_GetType }; |