diff options
author | Nicola Mettifogo | 2010-05-22 12:37:07 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2010-05-22 12:37:07 +0000 |
commit | d56352cbd515e35f5f85ee607d2f8148ae2e1e59 (patch) | |
tree | 03c5121194e84973e6b302082a15a93c410c1c74 | |
parent | a8ea833941208382e659914fb5bf99d5cb4f01a1 (diff) | |
download | scummvm-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
-rw-r--r-- | engines/parallaction/parallaction.cpp | 19 |
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 |