aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-08-04 10:48:47 +0200
committerThierry Crozat2018-01-23 00:29:35 +0000
commit30e138dcfa3f154f03a41f6bbb1a6e2838f6d568 (patch)
treee314a1cf0b98293826caeb6dcf62bb045be2fae9 /engines
parent0fdb3d8d10e0347a647cb0529c399bd74b9d8350 (diff)
downloadscummvm-rg350-30e138dcfa3f154f03a41f6bbb1a6e2838f6d568.tar.gz
scummvm-rg350-30e138dcfa3f154f03a41f6bbb1a6e2838f6d568.tar.bz2
scummvm-rg350-30e138dcfa3f154f03a41f6bbb1a6e2838f6d568.zip
SUPERNOVA: Adds indicator for key presses
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova/state.cpp3
-rw-r--r--engines/supernova/state.h1
-rw-r--r--engines/supernova/supernova.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index 4fb856a0ad..9bfc4745b8 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -295,6 +295,7 @@ void GameManager::resetInputState() {
_processInput = false;
_mouseClicked = false;
_key = 0;
+ _keyPressed = false;
_mouseClickType = Common::EVENT_MOUSEMOVE;
processInput();
@@ -543,7 +544,7 @@ void GameManager::mouseInput2() {
while (true) {
_vm->updateEvents();
// TODO: handle key input (e.g. alt+x, F-keys?)
- if (_mouseClicked || _key) {
+ if (_mouseClicked || _keyPressed) {
break;
}
g_system->updateScreen();
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index 2072d91efe..2c61e153c6 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -106,6 +106,7 @@ public:
uint16 _key;
Common::EventType _mouseClickType;
bool _mouseClicked;
+ bool _keyPressed;
int _mouseX;
int _mouseY;
int _mouseField;
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index d11f85670b..ff2211c1e5 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -175,6 +175,7 @@ void SupernovaEngine::updateEvents() {
_gm->_currentRoom->animation();
_gm->_mouseClicked = false;
+ _gm->_keyPressed = false;
while (g_system->getEventManager()->pollEvent(_event)) {
switch (_event.type) {
case Common::EVENT_QUIT:
@@ -183,6 +184,7 @@ void SupernovaEngine::updateEvents() {
break;
case Common::EVENT_KEYDOWN:
+ _gm->_keyPressed = true;
if (_event.kbd.keycode == Common::KEYCODE_d &&
(_event.kbd.flags & Common::KBD_CTRL)) {
_console->attach();