diff options
author | Travis Howell | 2006-03-13 03:52:26 +0000 |
---|---|---|
committer | Travis Howell | 2006-03-13 03:52:26 +0000 |
commit | 833e3430598f6de8d854b39a663fc75152275d8c (patch) | |
tree | f421934bbc5d6c40c90d3e5c697eeb4181ec4d0f | |
parent | d0f834ee40013edda77da730b96b4880d17d2ecd (diff) | |
download | scummvm-rg350-833e3430598f6de8d854b39a663fc75152275d8c.tar.gz scummvm-rg350-833e3430598f6de8d854b39a663fc75152275d8c.tar.bz2 scummvm-rg350-833e3430598f6de8d854b39a663fc75152275d8c.zip |
Fix object glitches in C64 maniac
svn-id: r21249
-rw-r--r-- | engines/scumm/object.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp index 23fad05174..9455f0f817 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); |