aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/state.cpp
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-08-30 22:38:34 +0200
committerThierry Crozat2018-01-23 02:01:00 +0000
commit7f513ac1db35a3cc76d9193b01d89974066ddfb9 (patch)
treee28a2071a13f83d48145441e2e4707b1394fc011 /engines/supernova/state.cpp
parenta334a4730dca4ac0085c61c639bb30ba6b4fb9bb (diff)
downloadscummvm-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.cpp8
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();