diff options
author | Matthew Hoops | 2014-06-03 00:47:55 -0400 |
---|---|---|
committer | Matthew Hoops | 2014-06-03 00:49:04 -0400 |
commit | 5e6e4fa85f9193ce5b1034255d74b518044ee39f (patch) | |
tree | d33210b7d2717614eb0287ba68ea6211cc176d34 /engines/pegasus | |
parent | 86b3a075d48eed0e71f0237107449ea6dd64673f (diff) | |
download | scummvm-rg350-5e6e4fa85f9193ce5b1034255d74b518044ee39f.tar.gz scummvm-rg350-5e6e4fa85f9193ce5b1034255d74b518044ee39f.tar.bz2 scummvm-rg350-5e6e4fa85f9193ce5b1034255d74b518044ee39f.zip |
PEGASUS: Use KP7 and KP9 as alternative keys for the item drawers
Based on a patch by Keith Kaisershot (blitter)
Diffstat (limited to 'engines/pegasus')
-rw-r--r-- | engines/pegasus/input.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp index 3f16acc2f6..e1b7e25cd5 100644 --- a/engines/pegasus/input.cpp +++ b/engines/pegasus/input.cpp @@ -57,8 +57,10 @@ InputDeviceManager::InputDeviceManager() { _keyMap[Common::KEYCODE_p] = false; _keyMap[Common::KEYCODE_TILDE] = false; _keyMap[Common::KEYCODE_BACKQUOTE] = false; + _keyMap[Common::KEYCODE_KP7] = false; _keyMap[Common::KEYCODE_BACKSPACE] = false; _keyMap[Common::KEYCODE_KP_MULTIPLY] = false; + _keyMap[Common::KEYCODE_KP9] = false; _keyMap[Common::KEYCODE_LALT] = false; _keyMap[Common::KEYCODE_RALT] = false; _keyMap[Common::KEYCODE_e] = false; @@ -117,10 +119,14 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) { // events don't come as expected. In many cases, the key down event is sent many times // causing the drawer to open and close constantly until pressed again. It only causes // more grief than anything else. - if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE]) + + // The original doesn't use KP7 for inventory, but we're using it as an alternative for + // num lock. KP9 is used for the biochip drawer to balance things out. + + if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE] || _keyMap[Common::KEYCODE_KP7]) currentBits |= (kRawButtonDown << kLeftFireButtonShift); - if (_keyMap[Common::KEYCODE_BACKSPACE] || _keyMap[Common::KEYCODE_KP_MULTIPLY]) + if (_keyMap[Common::KEYCODE_BACKSPACE] || _keyMap[Common::KEYCODE_KP_MULTIPLY] || _keyMap[Common::KEYCODE_KP9]) currentBits |= (kRawButtonDown << kRightFireButtonShift); // Update mouse button state |