[Scummvm-cvs-logs] scummvm master -> 5e6e4fa85f9193ce5b1034255d74b518044ee39f

clone2727 clone2727 at gmail.com
Tue Jun 3 06:50:10 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5e6e4fa85f PEGASUS: Use KP7 and KP9 as alternative keys for the item drawers


Commit: 5e6e4fa85f9193ce5b1034255d74b518044ee39f
    https://github.com/scummvm/scummvm/commit/5e6e4fa85f9193ce5b1034255d74b518044ee39f
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2014-06-03T00:49:04-04:00

Commit Message:
PEGASUS: Use KP7 and KP9 as alternative keys for the item drawers

Based on a patch by Keith Kaisershot (blitter)

Changed paths:
    engines/pegasus/input.cpp



diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp
index 3f16acc..e1b7e25 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






More information about the Scummvm-git-logs mailing list