aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-17 17:19:58 +0200
committerEinar Johan Trøan Sømåen2012-07-17 17:19:58 +0200
commit67638343817f98b02de2beccb67637b2093a6b7c (patch)
tree29fc009e32d05735740feba41e18b14f667a0606
parent9bc7fa7376074ed6fd251e93f1435e29d74ba2ff (diff)
downloadscummvm-rg350-67638343817f98b02de2beccb67637b2093a6b7c.tar.gz
scummvm-rg350-67638343817f98b02de2beccb67637b2093a6b7c.tar.bz2
scummvm-rg350-67638343817f98b02de2beccb67637b2093a6b7c.zip
WINTERMUTE: Put in the VKEYs necessary to complete the white chamber.
-rw-r--r--engines/wintermute/Base/BKeyboardState.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp
index f67833eb5e..ba8d807462 100644
--- a/engines/wintermute/Base/BKeyboardState.cpp
+++ b/engines/wintermute/Base/BKeyboardState.cpp
@@ -266,10 +266,39 @@ uint32 CBKeyboardState::keyCodeToVKey(Common::Event *event) {
}
}
+enum VKeyCodes {
+ VK_SPACE = 32,
+ VK_LEFT = 37,
+ VK_UP = 38,
+ VK_RIGHT = 39,
+ VK_DOWN = 40
+};
+
//////////////////////////////////////////////////////////////////////////
Common::KeyCode CBKeyboardState::vKeyToKeyCode(uint32 vkey) {
// todo
- return (Common::KeyCode)vkey;
+ switch (vkey) {
+ case VK_SPACE:
+ return Common::KEYCODE_SPACE;
+ break;
+ case VK_LEFT:
+ return Common::KEYCODE_LEFT;
+ break;
+ case VK_RIGHT:
+ return Common::KEYCODE_RIGHT;
+ break;
+ case VK_UP:
+ return Common::KEYCODE_UP;
+ break;
+ case VK_DOWN:
+ return Common::KEYCODE_DOWN;
+ break;
+ default:
+ warning("Unknown VKEY: %d", vkey);
+ return (Common::KeyCode)vkey;
+ break;
+ }
+
}
} // end of namespace WinterMute