[Scummvm-cvs-logs] SF.net SVN: scummvm: [21249] scummvm/trunk/engines/scumm/object.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Mar 12 19:53:02 CET 2006
Revision: 21249
Author: kirben
Date: 2006-03-12 19:52:26 -0800 (Sun, 12 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21249&view=rev
Log Message:
-----------
Fix object glitches in C64 maniac
Modified Paths:
--------------
scummvm/trunk/engines/scumm/object.cpp
Modified: scummvm/trunk/engines/scumm/object.cpp
===================================================================
--- scummvm/trunk/engines/scumm/object.cpp 2006-03-13 02:22:22 UTC (rev 21248)
+++ scummvm/trunk/engines/scumm/object.cpp 2006-03-13 03:52:26 UTC (rev 21249)
@@ -636,10 +636,17 @@
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 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list