aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/input.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-12 21:54:37 +1000
committerPaul Gilbert2012-05-12 21:54:37 +1000
commit073e46503cd09130c3d7e2372ae50e47402569d2 (patch)
tree22ec65b1c51c3b02bb8368082c1655c8fe155f17 /engines/tony/input.cpp
parent109e5f8226c1db18926e307d4ecb9c3c83fdd7bc (diff)
downloadscummvm-rg350-073e46503cd09130c3d7e2372ae50e47402569d2.tar.gz
scummvm-rg350-073e46503cd09130c3d7e2372ae50e47402569d2.tar.bz2
scummvm-rg350-073e46503cd09130c3d7e2372ae50e47402569d2.zip
TONY: Properly implement game saving and loading.
Saving isn't enabled in the demo, so for testing purposes I'm currently dissbling the ADGF_DEMO flag in the detection tables so saving is enabled.
Diffstat (limited to 'engines/tony/input.cpp')
-rw-r--r--engines/tony/input.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp
index bd90ec641d..fcd56b5989 100644
--- a/engines/tony/input.cpp
+++ b/engines/tony/input.cpp
@@ -127,4 +127,14 @@ bool RMInput::MouseRight() {
return _rightButton;
}
+/**
+ * Return true if a key has been pressed */
+bool RMInput::GetAsyncKeyState(Common::KeyCode kc) {
+ // The act of testing for a particular key automatically clears the state, to prevent
+ // the same key being registered in multiple different frames
+ bool result = _keyDown[(int)kc];
+ _keyDown[(int)kc] = false;
+ return result;
+}
+
} // End of namespace Tony