From d56352cbd515e35f5f85ee607d2f8148ae2e1e59 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 22 May 2010 12:37:07 +0000 Subject: Use the kZoneYourself flag to check zones for self-use in BRA. See patch 3003626. svn-id: r49138 --- engines/parallaction/parallaction.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'engines/parallaction/parallaction.cpp') 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 -- cgit v1.2.3