Skip to content

Commit

Permalink
ACCESS: Fix check for scene area that can be clicked in
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent bb93268 commit f6a1faa
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions engines/access/amazon/amazon_room.cpp
Expand Up @@ -162,10 +162,12 @@ void AmazonRoom::roomMenu() {
void AmazonRoom::mainAreaClick() {
Common::Point &mousePos = _vm->_events->_mousePos;
Common::Point pt = _vm->_events->calcRawMouse();
Screen &screen = *_vm->_screen;
Player &player = *_vm->_player;

if (_selectCommand == -1) {
if (_vm->_player->_roomNumber == 42 || _vm->_player->_roomNumber == 44 ||
_vm->_player->_roomNumber == 31 || _vm->_player->_roomNumber == 29) {
if (player._roomNumber == 42 || player._roomNumber == 44 ||
player._roomNumber == 31 || player._roomNumber == 29) {
switch (checkBoxes1(pt)) {
case 0:
// Make Jason the active player
Expand All @@ -182,15 +184,15 @@ void AmazonRoom::mainAreaClick() {

// WORKAROUND: In Amazon room 9, you can't leave the screen to the south due
// to not being able to click a Y position that's high enough
if (_vm->_screen->_scrollRow == 0 && pt.y > 178)
if (screen._scrollRow == 0 && pt.y > 178)
pt.y = 200;

_vm->_player->_moveTo = pt;
_vm->_player->_playerMove = true;
} else if (mousePos.x >= _vm->_screen->_windowXAdd &&
mousePos.x <= _vm->_screen->_vWindowBytesWide &&
mousePos.y >= _vm->_screen->_windowYAdd &&
mousePos.y <= _vm->_screen->_vWindowLinesTall) {
player._moveTo = pt;
player._playerMove = true;
} else if (mousePos.x >= screen._windowXAdd &&
mousePos.x <= (screen._windowXAdd + screen._vWindowBytesWide) &&
mousePos.y >= screen._windowYAdd &&
mousePos.y <= (screen._windowYAdd + screen._vWindowLinesTall)) {
if (checkBoxes1(pt) >= 0) {
checkBoxes3();
}
Expand Down

0 comments on commit f6a1faa

Please sign in to comment.