diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 23fad051740..9455f0f817d 100644 --- a/engines/scumm/object.cpp +++ b/engines/scumm/object.cpp @@ -636,10 +636,17 @@ void ScummEngine_v3old::loadRoomObjects() { else ptr = room + 29; + // Default pointer of objects without image, in C-64 verison of Maniac Mansion + int defaultPtr = READ_LE_UINT16(ptr + 2 * _numObjectsInRoom); + for (i = 0; i < _numObjectsInRoom; i++) { od = &_objs[findLocalObjectSlot()]; - od->OBIMoffset = READ_LE_UINT16(ptr); + if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC && READ_LE_UINT16(ptr) == defaultPtr) + od->OBIMoffset = 0; + else + od->OBIMoffset = READ_LE_UINT16(ptr); + od->OBCDoffset = READ_LE_UINT16(ptr + 2 * _numObjectsInRoom); setupRoomObject(od, room); @@ -1090,6 +1097,10 @@ byte *ScummEngine::getOBCDFromObject(int obj) { const byte *ScummEngine::getOBIMFromObjectData(const ObjectData &od) { const byte *ptr; + // For objects without image in C-64 version of Maniac Mansion + if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC && od.OBIMoffset == 0) + return NULL; + if (od.fl_object_index) { ptr = getResourceAddress(rtFlObject, od.fl_object_index); ptr = findResource(MKID_BE('OBIM'), ptr);