[Scummvm-cvs-logs] SF.net SVN: scummvm: [27072] scummvm/trunk/engines/saga/objectmap.h

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jun 4 00:00:20 CEST 2007


Revision: 27072
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27072&view=rev
Author:   thebluegr
Date:     2007-06-03 15:00:18 -0700 (Sun, 03 Jun 2007)

Log Message:
-----------
SAGA: When trying to access a wrong hitzone, adjust it to a valid one and continue with a warning instead of exiting with an error . We don't normally get invalid hitzones in ITE, but we do in IHNM, so this is used for now to bypass the places where IHNM crashes. It's now possible to climb the steps to the second floor of the zeppelin with Gorrister

Modified Paths:
--------------
    scummvm/trunk/engines/saga/objectmap.h

Modified: scummvm/trunk/engines/saga/objectmap.h
===================================================================
--- scummvm/trunk/engines/saga/objectmap.h	2007-06-03 19:29:13 UTC (rev 27071)
+++ scummvm/trunk/engines/saga/objectmap.h	2007-06-03 22:00:18 UTC (rev 27072)
@@ -110,7 +110,12 @@
 	int hitTest(const Point& testPoint);
 	HitZone *getHitZone(int16 index) {
 		if ((index < 0) || (index >= _hitZoneListCount)) {
-			error("ObjectMap::getHitZone wrong index 0x%X", index);
+			// HACK: If we get a wrong hitzone, return the last hitzone in the list
+			// Normally, we don't get wrong hitzones in ITE, however IHNM still seems
+			// to have problems with some, therefore just throw a warning for now and
+			// continue with a valid hitzone
+			warning("ObjectMap::getHitZone wrong index 0x%X, adjusting it to 0x%X", index, _hitZoneListCount - 1);
+			index = _hitZoneListCount - 1;
 		}
 		return _hitZoneList[index];
 	}


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