From 7f513ac1db35a3cc76d9193b01d89974066ddfb9 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Wed, 30 Aug 2017 22:38:34 +0200 Subject: SUPERNOVA: Adds key input check function This is temporary. Input is all over the place right now I feel, so it will be reworked 'soon'. --- engines/supernova/state.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'engines/supernova/state.cpp') diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 0cf8441521..5fc764fc69 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -464,6 +464,14 @@ void GameManager::resetInputState() { processInput(); } +bool GameManager::keyPressed(Common::KeyCode keycode, bool equal) { + bool ret = _key.keycode == keycode; + _key.reset(); + + return equal ? ret : !ret; +} + + void GameManager::processInput() { if (_mouseClickType == Common::EVENT_LBUTTONUP) { _vm->removeMessage(); -- cgit v1.2.3