From 67638343817f98b02de2beccb67637b2093a6b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Einar=20Johan=20Tr=C3=B8an=20S=C3=B8ma=CC=8Aen?= Date: Tue, 17 Jul 2012 17:19:58 +0200 Subject: [PATCH] WINTERMUTE: Put in the VKEYs necessary to complete the white chamber. --- engines/wintermute/Base/BKeyboardState.cpp | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp index f67833eb5e7..ba8d8074629 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