aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorNicola Mettifogo2010-05-22 12:37:07 +0000
committerNicola Mettifogo2010-05-22 12:37:07 +0000
commitd56352cbd515e35f5f85ee607d2f8148ae2e1e59 (patch)
tree03c5121194e84973e6b302082a15a93c410c1c74 /engines/parallaction
parenta8ea833941208382e659914fb5bf99d5cb4f01a1 (diff)
downloadscummvm-rg350-d56352cbd515e35f5f85ee607d2f8148ae2e1e59.tar.gz
scummvm-rg350-d56352cbd515e35f5f85ee607d2f8148ae2e1e59.tar.bz2
scummvm-rg350-d56352cbd515e35f5f85ee607d2f8148ae2e1e59.zip
Use the kZoneYourself flag to check zones for self-use in BRA. See patch 3003626.
svn-id: r49138
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/parallaction.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 9b5bd0d8aa..80e2ac2d31 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -687,15 +687,26 @@ bool Parallaction::checkZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
debugC(5, kDebugExec, "checkZoneBox for %s (type = %x, x = %i, y = %i)", z->_name, type, x, y);
if (!z->hitRect(x, y)) {
-
// check for special zones (items defined in common.loc)
if (checkSpecialZoneBox(z, type, x, y))
return true;
- if (z->getX() != -1)
- return false;
- if (!_char._ani->hitFrameRect(x, y))
+ // check if self-use zone (nothing to do with kFlagsSelfuse)
+ int gameType = getGameType();
+ if (gameType == GType_Nippon) {
+ if (z->getX() != -1) { // no explicit self-use flag in NS
+ return false;
+ }
+ }
+ if (gameType == GType_BRA) {
+ if (!(z->_flags & kFlagsYourself)) {
+ return false;
+ }
+ }
+ if (!_char._ani->hitFrameRect(x, y)) {
return false;
+ }
+ // we get here only if (x,y) hits the character and the zone is marked as self-use
}
// normal Zone