From fce9e495f93f47333cc75830986844244f1cce6f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 2 Sep 2016 17:23:20 +0200 Subject: DIRECTOR: Added basic keycode mapping --- engines/director/score.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 69d974a21c..49ec050dc1 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -842,6 +842,23 @@ void Score::processEvents() { if (event.type == Common::EVENT_KEYDOWN) { _vm->_keyCode = event.kbd.keycode; + switch (_vm->_keyCode) { + case Common::KEYCODE_LEFT: + _vm->_keyCode = 123; + break; + case Common::KEYCODE_RIGHT: + _vm->_keyCode = 124; + break; + case Common::KEYCODE_DOWN: + _vm->_keyCode = 125; + break; + case Common::KEYCODE_UP: + _vm->_keyCode = 126; + break; + default: + warning("Keycode: %d", _vm->_keyCode); + } + _lingo->processEvent(kEventKeyDown, 0); } } -- cgit v1.2.3