diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gnap/gnap.cpp | 16 | ||||
-rw-r--r-- | engines/gnap/gnap.h | 6 |
2 files changed, 9 insertions, 13 deletions
diff --git a/engines/gnap/gnap.cpp b/engines/gnap/gnap.cpp index c9ea940933..76818181a5 100644 --- a/engines/gnap/gnap.cpp +++ b/engines/gnap/gnap.cpp @@ -264,11 +264,11 @@ void GnapEngine::updateEvents() { _debugger->onFrame(); } - _keyPressState[event.kbd.keycode] = 1; - _keyDownState[event.kbd.keycode] = 1; + _keyPressState[event.kbd.keycode] = true; + _keyDownState[event.kbd.keycode] = true; break; case Common::EVENT_KEYUP: - _keyDownState[event.kbd.keycode] = 0; + _keyDownState[event.kbd.keycode] = false; break; case Common::EVENT_MOUSEMOVE: _mousePos = event.mouse; @@ -988,21 +988,19 @@ void GnapEngine::screenEffect(int dir, byte r, byte g, byte b) { } bool GnapEngine::isKeyStatus1(int key) { - return _keyPressState[key] != 0; + return _keyPressState[key]; } bool GnapEngine::isKeyStatus2(int key) { - return _keyDownState[key] != 0; + return _keyDownState[key]; } void GnapEngine::clearKeyStatus1(int key) { - _keyPressState[key] = 0; - _keyDownState[key] = 0; + _keyPressState[key] = false; + _keyDownState[key] = false; } void GnapEngine::clearAllKeyStatus1() { - _keyStatus1[0] = 0; - _keyStatus1[1] = 0; memset(_keyPressState, 0, sizeof(_keyPressState)); memset(_keyDownState, 0, sizeof(_keyDownState)); } diff --git a/engines/gnap/gnap.h b/engines/gnap/gnap.h index 29665728d5..dbefa31795 100644 --- a/engines/gnap/gnap.h +++ b/engines/gnap/gnap.h @@ -253,8 +253,8 @@ public: int _lastUpdateClock; bool _gameDone; - byte _keyPressState[512]; - byte _keyDownState[512]; + bool _keyPressState[512]; + bool _keyDownState[512]; bool _isPaused; Graphics::Surface *_pauseSprite; @@ -263,8 +263,6 @@ public: MouseButtonState _mouseButtonState; MouseButtonState _mouseClickState; - uint32 _keyStatus1[2]; - bool _sceneSavegameLoaded, _wasSavegameLoaded; Graphics::Surface *_backgroundSurface; |