aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova
diff options
context:
space:
mode:
Diffstat (limited to 'engines/supernova')
-rw-r--r--engines/supernova/state.cpp8
-rw-r--r--engines/supernova/state.h2
2 files changed, 10 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();
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index e50ef3bae2..72aad4cb53 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -24,6 +24,7 @@
#define STATE_H
#include "common/rect.h"
+#include "common/keyboard.h"
#include "supernova/rooms.h"
namespace Supernova {
@@ -146,6 +147,7 @@ public:
Common::EventType getMouseInput();
uint16 getKeyInput(bool blockForPrintChar = false);
void getInput();
+ bool keyPressed(Common::KeyCode keycode, bool equal);
void mouseInput3();
void mouseWait(int delay);
void wait2(int ticks);