From ea5bce6a3ccb41bac0cf57ac4932a7e9d8c304d9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Jun 2007 15:59:00 +0000 Subject: Added GOB FIXME svn-id: r27671 --- engines/gob/util.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 69ddeafa67..f970a550cc 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -165,15 +165,19 @@ bool Util::getKeyFromBuffer(int16& key) { } int16 Util::translateKey(int16 key) { + // FIXME: This currently maps KeyState::ascii values, when + // it really should map keycodes! To fix this, addKeyToBuffer() + // will have to be called with kbd.keycode instead of kbd.ascii, + // and of course this will in turn require subsequent changes... static struct keyS { int16 from; int16 to; } keys[] = { - {8, 0x0E08}, // Backspace - {32, 0x3920}, // Space - {13, 0x1C0D}, // Enter - {27, 0x011B}, // ESC - {127, 0x5300}, // Del + {Common::KEYCODE_BACKSPACE, 0x0E08}, // Backspace + {Common::KEYCODE_SPACE, 0x3920}, // Space + {Common::KEYCODE_RETURN, 0x1C0D}, // Enter + {Common::KEYCODE_ESCAPE, 0x011B}, // ESC + {Common::KEYCODE_DELETE, 0x5300}, // Del {Common::KEYCODE_UP, 0x4800}, // Up arrow {Common::KEYCODE_DOWN, 0x5000}, // Down arrow {Common::KEYCODE_RIGHT, 0x4D00}, // Right arrow -- cgit v1.2.3