diff options
author | Joseph-Eugene Winzer | 2017-08-30 22:38:34 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:01:00 +0000 |
commit | 7f513ac1db35a3cc76d9193b01d89974066ddfb9 (patch) | |
tree | e28a2071a13f83d48145441e2e4707b1394fc011 /engines/supernova/state.cpp | |
parent | a334a4730dca4ac0085c61c639bb30ba6b4fb9bb (diff) | |
download | scummvm-rg350-7f513ac1db35a3cc76d9193b01d89974066ddfb9.tar.gz scummvm-rg350-7f513ac1db35a3cc76d9193b01d89974066ddfb9.tar.bz2 scummvm-rg350-7f513ac1db35a3cc76d9193b01d89974066ddfb9.zip |
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'.
Diffstat (limited to 'engines/supernova/state.cpp')
-rw-r--r-- | engines/supernova/state.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |