diff options
author | Paul Gilbert | 2015-07-28 21:10:21 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-28 21:10:21 -0400 |
commit | 8c46a7ef2a1ec19ec9a776890cdcf8ed3085369c (patch) | |
tree | 161a3fed1f06cda93faaae43cb8711e1fe15b6dd /engines/sherlock/tattoo | |
parent | 1460e1f2965a474a968ecabc091c437ee5692927 (diff) | |
download | scummvm-rg350-8c46a7ef2a1ec19ec9a776890cdcf8ed3085369c.tar.gz scummvm-rg350-8c46a7ef2a1ec19ec9a776890cdcf8ed3085369c.tar.bz2 scummvm-rg350-8c46a7ef2a1ec19ec9a776890cdcf8ed3085369c.zip |
SHERLOCK: RT: Remove redundant keypad checks
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_journal.cpp | 10 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_map.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_hangman.cpp | 4 |
3 files changed, 5 insertions, 13 deletions
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp index b4b8005ae6..b7830620c1 100644 --- a/engines/sherlock/tattoo/tattoo_journal.cpp +++ b/engines/sherlock/tattoo/tattoo_journal.cpp @@ -135,7 +135,7 @@ void TattooJournal::handleKeyboardEvents() { events.warpMouse(Common::Point(r.left + (r.width() / 3) * (_selector + 1) - 10, mousePos.y)); } - } else if (keyState.keycode == Common::KEYCODE_PAGEUP || keyState.keycode == Common::KEYCODE_KP9) { + } else if (keyState.keycode == Common::KEYCODE_PAGEUP) { // See if they have Shift held down to go forward 10 pages if (keyState.flags & Common::KBD_SHIFT) { if (_page > 1) { @@ -160,7 +160,7 @@ void TattooJournal::handleKeyboardEvents() { } } - } else if (keyState.keycode == Common::KEYCODE_PAGEDOWN || keyState.keycode == Common::KEYCODE_KP3) { + } else if (keyState.keycode == Common::KEYCODE_PAGEDOWN) { if (keyState.flags & Common::KBD_SHIFT) { if (_down) { // Scroll down 10 Pages @@ -185,7 +185,7 @@ void TattooJournal::handleKeyboardEvents() { } } - } else if (keyState.keycode == Common::KEYCODE_HOME || keyState.keycode == Common::KEYCODE_KP7) { + } else if (keyState.keycode == Common::KEYCODE_HOME) { // Scroll to start of journal if (_page > 1) { // Go to the beginning of the journal @@ -201,7 +201,7 @@ void TattooJournal::handleKeyboardEvents() { _wait = false; } - } else if (keyState.keycode == Common::KEYCODE_END || keyState.keycode == Common::KEYCODE_KP1) { + } else if (keyState.keycode == Common::KEYCODE_END) { // Scroll to end of journal if (_down) { // Go to the end of the journal @@ -211,7 +211,7 @@ void TattooJournal::handleKeyboardEvents() { _wait = false; } - } else if (keyState.keycode == Common::KEYCODE_RETURN || keyState.keycode == Common::KEYCODE_KP_ENTER) { + } else if (keyState.keycode == Common::KEYCODE_RETURN) { events._pressed = false; events._released = true; events._oldButtons = 0; diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp index 96bc1f8a42..bcb7b60ab1 100644 --- a/engines/sherlock/tattoo/tattoo_map.cpp +++ b/engines/sherlock/tattoo/tattoo_map.cpp @@ -162,26 +162,22 @@ int TattooMap::show() { switch (keyState.keycode) { case Common::KEYCODE_HOME: - case Common::KEYCODE_KP7: _targetScroll.x = 0; _targetScroll.y = 0; break; case Common::KEYCODE_END: - case Common::KEYCODE_KP1: _targetScroll.x = screen._backBuffer1.w() - SHERLOCK_SCREEN_WIDTH; _targetScroll.y = screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT; break; case Common::KEYCODE_PAGEUP: - case Common::KEYCODE_KP9: _targetScroll.y -= SHERLOCK_SCREEN_HEIGHT; if (_targetScroll.y < 0) _targetScroll.y = 0; break; case Common::KEYCODE_PAGEDOWN: - case Common::KEYCODE_KP3: _targetScroll.y += SHERLOCK_SCREEN_HEIGHT; if (_targetScroll.y > (screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT)) _targetScroll.y = screen._backBuffer1.h() - SHERLOCK_SCREEN_HEIGHT; diff --git a/engines/sherlock/tattoo/widget_hangman.cpp b/engines/sherlock/tattoo/widget_hangman.cpp index 84cfb02101..28410636f3 100644 --- a/engines/sherlock/tattoo/widget_hangman.cpp +++ b/engines/sherlock/tattoo/widget_hangman.cpp @@ -162,7 +162,6 @@ void WidgetHangman::show() { break; case Common::KEYCODE_UP: - case Common::KEYCODE_KP8: if (line) { line--; if (i >= strlen(solutions[line])) @@ -171,7 +170,6 @@ void WidgetHangman::show() { break; case Common::KEYCODE_DOWN: - case Common::KEYCODE_KP2: if (line < 2) { ++line; if (i >= strlen(solutions[line])) @@ -181,7 +179,6 @@ void WidgetHangman::show() { case Common::KEYCODE_BACKSPACE: case Common::KEYCODE_LEFT: - case Common::KEYCODE_KP4: if (i) --i; else if (line) { @@ -195,7 +192,6 @@ void WidgetHangman::show() { break; case Common::KEYCODE_RIGHT: - case Common::KEYCODE_KP6: if (i < strlen(solutions[line]) - 1) i++; else if (line < 2) { |