diff options
author | Paul Gilbert | 2014-11-28 15:06:49 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:50:54 -0500 |
commit | e3322185686f268c0375bcaef93c5ef35209ebdc (patch) | |
tree | 71498ceace43e17dfc7b3f3238f2c3dd0c445fed /engines | |
parent | 740df9b42aac87472353512d2eda796bdd6d3aa3 (diff) | |
download | scummvm-rg350-e3322185686f268c0375bcaef93c5ef35209ebdc.tar.gz scummvm-rg350-e3322185686f268c0375bcaef93c5ef35209ebdc.tar.bz2 scummvm-rg350-e3322185686f268c0375bcaef93c5ef35209ebdc.zip |
ACCESS: Workaround for Exit/walk icon in massacre site scene
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/amazon/amazon_room.cpp | 16 | ||||
-rw-r--r-- | engines/access/amazon/amazon_room.h | 2 | ||||
-rw-r--r-- | engines/access/room.cpp | 33 | ||||
-rw-r--r-- | engines/access/room.h | 2 |
4 files changed, 40 insertions, 13 deletions
diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp index 4df1131643..ca0d7bf341 100644 --- a/engines/access/amazon/amazon_room.cpp +++ b/engines/access/amazon/amazon_room.cpp @@ -199,6 +199,22 @@ void AmazonRoom::mainAreaClick() { } } +void AmazonRoom::walkCursor() { + // WORKAROUND: For scene 29, which is a normal walkable scene, but yet can be + // 'exitted'. This workaround ensures the scene will only be left if you click + // the Exit icon wgeb the cursor is already a walk cursor + EventsManager &events = *_vm->_events; + + if (_vm->_player->_roomNumber == 29 && events._normalMouse != CURSOR_CROSSHAIRS) { + events._normalMouse = CURSOR_CROSSHAIRS; + events.setCursor(CURSOR_CROSSHAIRS); + _selectCommand = -1; + _vm->_boxSelect = true; + } else { + Room::walkCursor(); + } +} + void AmazonRoom::init4Quads() { if (!_vm->_screen->_vesaMode) return; diff --git a/engines/access/amazon/amazon_room.h b/engines/access/amazon/amazon_room.h index bcb0d84e15..ab9212724f 100644 --- a/engines/access/amazon/amazon_room.h +++ b/engines/access/amazon/amazon_room.h @@ -53,6 +53,8 @@ protected: virtual void mainAreaClick(); virtual void clearRoom(); + + virtual void walkCursor(); public: AmazonRoom(AccessEngine *vm); diff --git a/engines/access/room.cpp b/engines/access/room.cpp index bc76d48d8d..b9ce06959a 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -540,19 +540,7 @@ void Room::executeCommand(int commandId) { events.setCursor(CURSOR_TALK); break; case 7: - events._normalMouse = CURSOR_CROSSHAIRS; - events.setCursor(CURSOR_CROSSHAIRS); - _vm->_scripts->_sequence = 5000; - _vm->_scripts->searchForSequence(); - roomMenu(); - _selectCommand = -1; - - _conFlag = true; - while (_conFlag && !_vm->shouldQuit()) { - _conFlag = false; - _vm->_scripts->executeScript(); - } - _vm->_boxSelect = true; + walkCursor(); return; case 8: events._normalMouse = CURSOR_HELP; @@ -580,6 +568,25 @@ void Room::executeCommand(int commandId) { _vm->_boxSelect = true; } +void Room::walkCursor() { + EventsManager &events = *_vm->_events; + + events._normalMouse = CURSOR_CROSSHAIRS; + events.setCursor(CURSOR_CROSSHAIRS); + _vm->_scripts->_sequence = 5000; + _vm->_scripts->searchForSequence(); + roomMenu(); + _selectCommand = -1; + + _conFlag = true; + while (_conFlag && !_vm->shouldQuit()) { + _conFlag = false; + _vm->_scripts->executeScript(); + } + + _vm->_boxSelect = true; +} + void Room::commandOff() { _selectCommand = -1; _vm->_events->setCursor(CURSOR_CROSSHAIRS); diff --git a/engines/access/room.h b/engines/access/room.h index a3ee019d39..4ec80d114c 100644 --- a/engines/access/room.h +++ b/engines/access/room.h @@ -112,6 +112,8 @@ protected: virtual void doCommands(); virtual void mainAreaClick() = 0; + + virtual void walkCursor(); public: Plotter _plotter; Common::Array<JetFrame> _jetFrame; |