mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
Fix object glitches in C64 maniac
svn-id: r21249
This commit is contained in:
parent
d0f834ee40
commit
833e343059
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user