aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2010-05-22 03:49:22 +0000
committerNicola Mettifogo2010-05-22 03:49:22 +0000
commitbc479f8aef9b26d0690dfb8f311e41374d886d0c (patch)
tree6d5e4ac885c6e61165fbd3ff84824f7f350df529 /engines/parallaction/parallaction.cpp
parent47d6e9eab7f657ac36b01c143a0bd5edba1d2361 (diff)
downloadscummvm-rg350-bc479f8aef9b26d0690dfb8f311e41374d886d0c.tar.gz
scummvm-rg350-bc479f8aef9b26d0690dfb8f311e41374d886d0c.tar.bz2
scummvm-rg350-bc479f8aef9b26d0690dfb8f311e41374d886d0c.zip
Make sure hitZone always gets absolute game coordinates. Based on the patch 3004658 by fuzzie.
svn-id: r49135
Diffstat (limited to 'engines/parallaction/parallaction.cpp')
-rw-r--r--engines/parallaction/parallaction.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index cb208a17ff..9b5bd0d8aa 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -651,7 +651,6 @@ bool Parallaction::pickupItem(ZonePtr z) {
return (slot != -1);
}
-// FIXME: input coordinates must be offseted to handle scrolling!
bool Parallaction::checkSpecialZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
// not a special zone
if ((z->getX() != -2) && (z->getX() != -3)) {
@@ -681,7 +680,6 @@ bool Parallaction::checkSpecialZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
return false;
}
-// FIXME: input coordinates must be offseted to handle scrolling!
bool Parallaction::checkZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
if (z->_flags & kFlagsRemove)
return false;
@@ -711,7 +709,6 @@ bool Parallaction::checkZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
return false;
}
-// FIXME: input coordinates must be offseted to handle scrolling!
bool Parallaction::checkLinkedAnimBox(ZonePtr z, uint32 type, uint x, uint y) {
if (z->_flags & kFlagsRemove)
return false;
@@ -739,6 +736,11 @@ bool Parallaction::checkLinkedAnimBox(ZonePtr z, uint32 type, uint x, uint y) {
return false;
}
+/* NOTE: hitZone needs to be passed absolute game coordinates to work.
+
+ When type is kZoneMerge, then x and y are the identifiers of the objects to merge,
+ and the above requirement does not apply.
+*/
ZonePtr Parallaction::hitZone(uint32 type, uint16 x, uint16 y) {
uint16 _di = y;
uint16 _si = x;