aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-01 17:03:15 -0400
committerPaul Gilbert2015-08-01 17:03:15 -0400
commitc72d826b7b538e2e1f825c43d3d4a19a6cceefe0 (patch)
tree63c1159b653ad2ebc5ccab9c13feebef9362d51a /engines/sherlock/scalpel
parent650c455e8525a8b294e966e7cc7a31a3f127a2dd (diff)
downloadscummvm-rg350-c72d826b7b538e2e1f825c43d3d4a19a6cceefe0.tar.gz
scummvm-rg350-c72d826b7b538e2e1f825c43d3d4a19a6cceefe0.tar.bz2
scummvm-rg350-c72d826b7b538e2e1f825c43d3d4a19a6cceefe0.zip
SHERLOCK: SS: Fix return type of dartHit
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r--engines/sherlock/scalpel/darts.cpp8
-rw-r--r--engines/sherlock/scalpel/darts.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/sherlock/scalpel/darts.cpp b/engines/sherlock/scalpel/darts.cpp
index a24af4e444..8b5d02fb9c 100644
--- a/engines/sherlock/scalpel/darts.cpp
+++ b/engines/sherlock/scalpel/darts.cpp
@@ -422,16 +422,16 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i
return MIN(idx * 100 / DARTBARSIZE, 100);
}
-bool Darts::dartHit() {
+int Darts::dartHit() {
Events &events = *_vm->_events;
// Process pending events
events.pollEventsAndWait();
if (events.kbHit()) {
- // Key was pressed, so discard it and return true
- events.clearKeyboard();
- return true;
+ // Key was pressed, so return it
+ Common::KeyState keyState = events.getKey();
+ return keyState.keycode;
}
_oldDartButtons = events._pressed;
diff --git a/engines/sherlock/scalpel/darts.h b/engines/sherlock/scalpel/darts.h
index 4368954814..bf327b61a2 100644
--- a/engines/sherlock/scalpel/darts.h
+++ b/engines/sherlock/scalpel/darts.h
@@ -97,7 +97,7 @@ private:
/**
* Returns true if a mouse button or key is pressed.
*/
- bool dartHit();
+ int dartHit();
/**
* Return the score of the given location on the dart-board