From e4f7a899d36ba6c8d51432fb6c7527227a76f53a Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 7 Jan 2015 00:22:25 +0100 Subject: ACCESS: MM - Implement mainAreaClick --- engines/access/martian/martian_room.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'engines/access/martian') diff --git a/engines/access/martian/martian_room.cpp b/engines/access/martian/martian_room.cpp index 0134d12b5b..d5b03db246 100644 --- a/engines/access/martian/martian_room.cpp +++ b/engines/access/martian/martian_room.cpp @@ -115,8 +115,23 @@ void MartianRoom::roomMenu() { } void MartianRoom::mainAreaClick() { + Common::Point &mousePos = _vm->_events->_mousePos; + Common::Point pt = _vm->_events->calcRawMouse(); + Screen &screen = *_vm->_screen; + Player &player = *_vm->_player; + + if (_selectCommand == -1) { + 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(); + } + } } } // End of namespace Martian - } // End of namespace Access -- cgit v1.2.3