diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index d61d1bf..f4b2254 100644
a
|
b
|
bool Input::translateGameInput() {
|
326 | 326 | |
327 | 327 | if ((_mouseButtons == kMouseLeftUp) && ((_activeItem._id != 0) || (ACTIONTYPE(z) == kZoneCommand))) { |
328 | 328 | |
329 | | if (z->_flags & kFlagsNoWalk) { |
330 | | // character doesn't need to walk to take specified action |
| 329 | bool noWalk = z->_flags & kFlagsNoWalk; // check the explicit no-walk flag |
| 330 | if (_gameType == GType_BRA) { |
| 331 | // action performed on object marked for self-use do not need walk in BRA |
| 332 | noWalk |= z->_flags & kFlagsYourself; |
| 333 | } |
| 334 | |
| 335 | if (noWalk) { |
331 | 336 | takeAction(z); |
332 | 337 | } else { |
333 | 338 | // action delayed: if Zone defined a moveto position the character is programmed to move there, |
diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h
index 50a7892..36231cf 100644
a
|
b
|
enum ZoneFlags {
|
88 | 88 | kFlagsNoWalk = 0x800, // Zone: character doesn't need to walk towards object to interact |
89 | 89 | |
90 | 90 | // BRA specific |
91 | | kFlagsYourself = 0x1000, |
| 91 | kFlagsYourself = 0x1000, // BRA: marks zones used by the character on him/herself |
92 | 92 | kFlagsScaled = 0x2000, |
93 | | kFlagsSelfuse = 0x4000, |
| 93 | kFlagsSelfuse = 0x4000, // BRA: marks zones to be preserved across location changes (see Parallaction::freeZones) |
94 | 94 | kFlagsIsAnimation = 0x1000000, // BRA: used in walk code (trap check), to tell is a Zone is an Animation |
95 | 95 | kFlagsAnimLinked = 0x2000000 |
96 | 96 | }; |
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 9b5bd0d..80e2ac2 100644
a
|
b
|
bool Parallaction::checkZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
|
687 | 687 | debugC(5, kDebugExec, "checkZoneBox for %s (type = %x, x = %i, y = %i)", z->_name, type, x, y); |
688 | 688 | |
689 | 689 | if (!z->hitRect(x, y)) { |
690 | | |
691 | 690 | // check for special zones (items defined in common.loc) |
692 | 691 | if (checkSpecialZoneBox(z, type, x, y)) |
693 | 692 | return true; |
694 | 693 | |
695 | | if (z->getX() != -1) |
696 | | return false; |
697 | | if (!_char._ani->hitFrameRect(x, y)) |
| 694 | // check if self-use zone (nothing to do with kFlagsSelfuse) |
| 695 | int gameType = getGameType(); |
| 696 | if (gameType == GType_Nippon) { |
| 697 | if (z->getX() != -1) { // no explicit self-use flag in NS |
| 698 | return false; |
| 699 | } |
| 700 | } |
| 701 | if (gameType == GType_BRA) { |
| 702 | if (!(z->_flags & kFlagsYourself)) { |
| 703 | return false; |
| 704 | } |
| 705 | } |
| 706 | if (!_char._ani->hitFrameRect(x, y)) { |
698 | 707 | return false; |
| 708 | } |
| 709 | // we get here only if (x,y) hits the character and the zone is marked as self-use |
699 | 710 | } |
700 | 711 | |
701 | 712 | // normal Zone |