aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-11-27 17:17:35 -0500
committerPaul Gilbert2014-12-12 22:49:00 -0500
commitf6a1faa5e4ea7b35b3dd9d1bd942858dd31cdbde (patch)
tree02c457bacb6e259fc1600a5f8bf63b78959fc405
parentbb93268ee21a216162ef077c64462e0ac360df0a (diff)
downloadscummvm-rg350-f6a1faa5e4ea7b35b3dd9d1bd942858dd31cdbde.tar.gz
scummvm-rg350-f6a1faa5e4ea7b35b3dd9d1bd942858dd31cdbde.tar.bz2
scummvm-rg350-f6a1faa5e4ea7b35b3dd9d1bd942858dd31cdbde.zip
ACCESS: Fix check for scene area that can be clicked in
-rw-r--r--engines/access/amazon/amazon_room.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp
index a942ed3ba8..4df1131643 100644
--- a/engines/access/amazon/amazon_room.cpp
+++ b/engines/access/amazon/amazon_room.cpp
@@ -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
@@ -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();
}