diff options
author | Filippos Karapetis | 2015-12-18 00:41:24 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:08 +0100 |
commit | b6bed0aed72bb45e88dd363a9a34a26ad9f03f6d (patch) | |
tree | 9398e2e586caaced26057aeb4fc221c6f50eb1e5 /engines/lab/intro.cpp | |
parent | fdf09a63851cf51dc4c07a65e5fbc82c2d56512c (diff) | |
download | scummvm-rg350-b6bed0aed72bb45e88dd363a9a34a26ad9f03f6d.tar.gz scummvm-rg350-b6bed0aed72bb45e88dd363a9a34a26ad9f03f6d.tar.bz2 scummvm-rg350-b6bed0aed72bb45e88dd363a9a34a26ad9f03f6d.zip |
LAB: Simplify mouse button handling
Diffstat (limited to 'engines/lab/intro.cpp')
-rw-r--r-- | engines/lab/intro.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 45119f4a5d..e4c84dc768 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -61,8 +61,8 @@ void Intro::introEatMessages() { if (!msg) return; - if (((msg->_msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & msg->_qualifier)) - || ((msg->_msgClass == RAWKEY) && (msg->_code == Common::KEYCODE_ESCAPE))) + if ((msg->_msgClass == kMessageRightClick) + || ((msg->_msgClass == kMessageRawKey) && (msg->_code == Common::KEYCODE_ESCAPE))) _quitIntro = true; } } @@ -151,11 +151,10 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { _vm->waitTOF(); } else { uint32 msgClass = msg->_msgClass; - uint16 qualifier = msg->_qualifier; uint16 code = msg->_code; - if (((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & qualifier)) || - ((msgClass == RAWKEY) && (code == Common::KEYCODE_ESCAPE))) { + if ((msgClass == kMessageRightClick) || + ((msgClass == kMessageRawKey) && (code == Common::KEYCODE_ESCAPE))) { _quitIntro = true; if (isScreen) @@ -163,8 +162,8 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { delete[] textBuffer; return; - } else if (msgClass == MOUSEBUTTONS) { - if (IEQUALIFIER_LEFTBUTTON & qualifier) { + } else if ((msgClass == kMessageLeftClick) || (msgClass == kMessageRightClick)) { + if (msgClass == kMessageLeftClick) { if (doneFl) { if (isScreen) _vm->_graphics->fade(false, 0); |