diff options
author | johndoe123 | 2015-11-24 00:10:10 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | fa17f684da1da7fded805746b75c454502ffe683 (patch) | |
tree | 1e668515abccf6455299a5b9fbadc2c5b6affd98 /engines/illusions/input.cpp | |
parent | 09bbb482a8ccdfb8e36128d40364900b99aa2a13 (diff) | |
download | scummvm-rg350-fa17f684da1da7fded805746b75c454502ffe683.tar.gz scummvm-rg350-fa17f684da1da7fded805746b75c454502ffe683.tar.bz2 scummvm-rg350-fa17f684da1da7fded805746b75c454502ffe683.zip |
ILLUSIONS: DUCKMAN: Start implementing the menu system
Still work-in-progress, missing functionality and buggy
Maybe needs some work for BBDOU where this isn't implemented yet.
Diffstat (limited to 'engines/illusions/input.cpp')
-rw-r--r-- | engines/illusions/input.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/illusions/input.cpp b/engines/illusions/input.cpp index 3956691ef6..37da087543 100644 --- a/engines/illusions/input.cpp +++ b/engines/illusions/input.cpp @@ -77,12 +77,14 @@ uint InputEvent::handle(Common::KeyCode key, int mouseButton, bool down) { // Input +const uint kAllButtons = 0xFFFF; + Input::Input() { _buttonStates = 0; _newButtons = 0; _buttonsDown = 0; _newKeys = 0; - _enabledButtons = 0xFFFF; + _enabledButtons = kAllButtons; _cursorPos.x = 0; _cursorPos.y = 0; _prevCursorPos.x = 0; @@ -123,12 +125,16 @@ bool Input::pollEvent(uint evt) { return pollButton(_inputEvents[evt].getBitMask()); } +bool Input::hasNewEvents() { + return lookNewButtons(kAllButtons); +} + void Input::discardEvent(uint evt) { discardButtons(_inputEvents[evt].getBitMask()); } void Input::discardAllEvents() { - discardButtons(0xFFFF); + discardButtons(kAllButtons); } void Input::activateButton(uint bitMask) { |