diff options
author | Strangerke | 2015-12-16 01:11:13 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:06 +0100 |
commit | 802a0d09dc782314079da14d5afede357f8c4a90 (patch) | |
tree | dc1049c8c074b519d40d50180cc0de58e635ff17 | |
parent | eab6682929d47d09c0ac81921f479e46a06e93bd (diff) | |
download | scummvm-rg350-802a0d09dc782314079da14d5afede357f8c4a90.tar.gz scummvm-rg350-802a0d09dc782314079da14d5afede357f8c4a90.tar.bz2 scummvm-rg350-802a0d09dc782314079da14d5afede357f8c4a90.zip |
LAB: Use Common::KEYCODE in several places
-rw-r--r-- | engines/lab/engine.cpp | 9 | ||||
-rw-r--r-- | engines/lab/intro.cpp | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index cce5aef751..4e1b974b76 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -807,7 +807,7 @@ bool LabEngine::fromCrumbs(uint32 tmpClass, uint16 code, uint16 qualifier, Commo bool LabEngine::processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &qualifier, Common::Point &curPos, uint16 &curInv, bool &forceDraw, uint16 code) { byte codeLower = tolower(code); - if (code == 13) { + if (code == Common::KEYCODE_RETURN) { // The return key msgClass = MOUSEBUTTONS; qualifier = IEQUALIFIER_LEFTBUTTON; @@ -883,13 +883,10 @@ bool LabEngine::processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &quali forceDraw = true; interfaceOn(); - } else if (code == 9) { - // TAB key + } else if (code == Common::KEYCODE_TAB) msgClass = DELTAMOVE; - } else if (code == 27) { - // ESC key + else if (code == Common::KEYCODE_ESCAPE) _closeDataPtr = nullptr; - } eatMessages(); diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index f49a860d3f..992d2370e7 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -62,7 +62,7 @@ void Intro::introEatMessages() { return; if (((msg->_msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RIGHTBUTTON & msg->_qualifier)) - || ((msg->_msgClass == RAWKEY) && (msg->_code == 27))) + || ((msg->_msgClass == RAWKEY) && (msg->_code == Common::KEYCODE_ESCAPE))) _quitIntro = true; } } |