scummvm/engines/dm/objectman.cpp

21 lines
425 B
C++
Raw Normal View History

2016-06-18 22:34:15 +00:00
#include "objectman.h"
2016-06-18 22:48:28 +00:00
#include "dungeonman.h"
2016-06-18 22:34:15 +00:00
namespace DM {
ObjectMan::ObjectMan(DMEngine *vm): _vm(vm) {}
2016-06-18 22:48:28 +00:00
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;
}
2016-06-18 22:34:15 +00:00
}