diff options
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index f5fe417c0d..d976c3463d 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -421,7 +421,7 @@ void GUI::checkTextfieldInput() { while (_vm->_eventMan->pollEvent(event) && running) { switch (event.type) { case Common::EVENT_KEYDOWN: - if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL) + if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.flags == Common::KBD_CTRL) _vm->quitGame(); else _keyPressed = event.kbd; diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 451750ce14..2c2d6a424b 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -261,9 +261,9 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop, int eventFlag) switch (event.type) { case Common::EVENT_KEYDOWN: - if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' && + if (event.kbd.keycode >= Common::KEYCODE_1 && event.kbd.keycode <= Common::KEYCODE_9 && (event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && mainLoop) { - int saveLoadSlot = 9 - (event.kbd.keycode - '0') + 990; + int saveLoadSlot = 9 - (event.kbd.keycode - Common::KEYCODE_0) + 990; if (event.kbd.flags == Common::KBD_CTRL) { loadGameStateCheck(saveLoadSlot); @@ -271,14 +271,14 @@ int KyraEngine_v1::checkInput(Button *buttonList, bool mainLoop, int eventFlag) breakLoop = true; } else { char savegameName[14]; - sprintf(savegameName, "Quicksave %d", event.kbd.keycode - '0'); + sprintf(savegameName, "Quicksave %d", event.kbd.keycode - Common::KEYCODE_0); saveGameState(saveLoadSlot, savegameName, 0); } } else if (event.kbd.flags == Common::KBD_CTRL) { - if (event.kbd.keycode == 'd') { + if (event.kbd.keycode == Common::KEYCODE_d) { if (_debugger) _debugger->attach(); - } else if (event.kbd.keycode == 'q') { + } else if (event.kbd.keycode == Common::KEYCODE_q) { quitGame(); } } else { @@ -379,12 +379,12 @@ void KyraEngine_v1::updateInput() { while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_KEYDOWN: - if (event.kbd.keycode == '.' || event.kbd.keycode == Common::KEYCODE_ESCAPE || + if (event.kbd.keycode == Common::KEYCODE_PERIOD || event.kbd.keycode == Common::KEYCODE_ESCAPE || event.kbd.keycode == Common::KEYCODE_SPACE || event.kbd.keycode == Common::KEYCODE_RETURN || event.kbd.keycode == Common::KEYCODE_UP || event.kbd.keycode == Common::KEYCODE_RIGHT || event.kbd.keycode == Common::KEYCODE_DOWN || event.kbd.keycode == Common::KEYCODE_LEFT) _eventList.push_back(Event(event, true)); - else if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL) + else if (event.kbd.keycode == Common::KEYCODE_q && event.kbd.flags == Common::KBD_CTRL) quitGame(); else _eventList.push_back(event); |