From 073e46503cd09130c3d7e2372ae50e47402569d2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 12 May 2012 21:54:37 +1000 Subject: 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. --- engines/tony/input.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/tony/input.cpp') 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 -- cgit v1.2.3