aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/menu.cpp
diff options
context:
space:
mode:
authorMax Horn2009-10-20 11:13:00 +0000
committerMax Horn2009-10-20 11:13:00 +0000
commit50435d6bae2a89180676dbdbc83986d952ffb717 (patch)
treee9efbe501a07e9cca801556fd1bf622544172f3c /engines/agi/menu.cpp
parenta41292a92fae04863070e84744bc2620235b7887 (diff)
downloadscummvm-rg350-50435d6bae2a89180676dbdbc83986d952ffb717.tar.gz
scummvm-rg350-50435d6bae2a89180676dbdbc83986d952ffb717.tar.bz2
scummvm-rg350-50435d6bae2a89180676dbdbc83986d952ffb717.zip
AGI: Turn g_tickTimer & g_mouse into members of class AgiEngine resp. AgiBase
svn-id: r45259
Diffstat (limited to 'engines/agi/menu.cpp')
-rw-r--r--engines/agi/menu.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index e1db04ff49..6d23ebc14c 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -132,16 +132,16 @@ void Menu::newMenuSelected(int i) {
}
bool Menu::mouseOverText(int line, int col, char *s) {
- if (g_mouse.x < col * CHAR_COLS)
+ if (_vm->_mouse.x < col * CHAR_COLS)
return false;
- if (g_mouse.x > (int)(col + strlen(s)) * CHAR_COLS)
+ if (_vm->_mouse.x > (int)(col + strlen(s)) * CHAR_COLS)
return false;
- if (g_mouse.y < line * CHAR_LINES)
+ if (_vm->_mouse.y < line * CHAR_LINES)
return false;
- if (g_mouse.y >= (line + 1) * CHAR_LINES)
+ if (_vm->_mouse.y >= (line + 1) * CHAR_LINES)
return false;
return true;
@@ -296,12 +296,12 @@ bool Menu::keyhandler(int key) {
//
// Mouse handling
//
- if (g_mouse.button) {
+ if (_vm->_mouse.button) {
int hmenu, vmenu;
buttonUsed = 1; // Button has been used at least once
- if (g_mouse.y <= CHAR_LINES) {
+ if (_vm->_mouse.y <= CHAR_LINES) {
// on the menubar
hmenu = 0;
@@ -361,7 +361,7 @@ bool Menu::keyhandler(int key) {
drawMenuOptionHilite(_hCurMenu, _vCurMenu);
- if (g_mouse.y <= CHAR_LINES) {
+ if (_vm->_mouse.y <= CHAR_LINES) {
// on the menubar
} else {
// see which option we selected