diff options
author | Max Horn | 2009-10-20 11:13:00 +0000 |
---|---|---|
committer | Max Horn | 2009-10-20 11:13:00 +0000 |
commit | 50435d6bae2a89180676dbdbc83986d952ffb717 (patch) | |
tree | e9efbe501a07e9cca801556fd1bf622544172f3c /engines/agi/menu.cpp | |
parent | a41292a92fae04863070e84744bc2620235b7887 (diff) | |
download | scummvm-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.cpp | 14 |
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 |