Skip to content

Commit

Permalink
ACCESS: MM - Implement mainAreaClick
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jan 6, 2015
1 parent 10e3a4c commit e4f7a89
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion engines/access/martian/martian_room.cpp
Expand Up @@ -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

0 comments on commit e4f7a89

Please sign in to comment.