aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/objectmap.h
diff options
context:
space:
mode:
authorFilippos Karapetis2007-06-06 16:37:10 +0000
committerFilippos Karapetis2007-06-06 16:37:10 +0000
commita265844351bc145d2254c23e69d629a049bdafc3 (patch)
tree0988b8eb167066699c91debd9de790ffe2b224b1 /engines/saga/objectmap.h
parent44d98de023f65d5d51407b8d27eba47c79795f1b (diff)
downloadscummvm-rg350-a265844351bc145d2254c23e69d629a049bdafc3.tar.gz
scummvm-rg350-a265844351bc145d2254c23e69d629a049bdafc3.tar.bz2
scummvm-rg350-a265844351bc145d2254c23e69d629a049bdafc3.zip
Added sanity checks for hitzones in SAGA, after discussing with h00ligan and sev. Removed a hack for IHNM which is not needed anymore and removed a redundant check for zero object types
svn-id: r27140
Diffstat (limited to 'engines/saga/objectmap.h')
-rw-r--r--engines/saga/objectmap.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/engines/saga/objectmap.h b/engines/saga/objectmap.h
index 39c9f045e5..c3b50c7497 100644
--- a/engines/saga/objectmap.h
+++ b/engines/saga/objectmap.h
@@ -110,12 +110,7 @@ public:
int hitTest(const Point& testPoint);
HitZone *getHitZone(int16 index) {
if ((index < 0) || (index >= _hitZoneListCount)) {
- // 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 NULL;
}
return _hitZoneList[index];
}