From d0ee1b3c8ff521707a6f5064ee54638460aaee21 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 22:19:17 +0000 Subject: BS1: Make use of Common::KeySate::reset() svn-id: r27636 --- engines/sword1/control.cpp | 4 ++-- engines/sword1/sword1.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 7479484a06..1ebfaedb2e 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -224,7 +224,7 @@ void Control::askForCd(void) { uint8 Control::runPanel(void) { _mouseDown = false; _restoreBuf = NULL; - _keyPressed.keycode = Common::KEYCODE_INVALID; + _keyPressed.reset(); _numButtons = 0; _screenBuf = (uint8*)malloc(640 * 480); memset(_screenBuf, 0, 640 * 480); @@ -1037,7 +1037,7 @@ void Control::delay(uint32 msecs) { uint32 now = _system->getMillis(); uint32 endTime = now + msecs; - _keyPressed.keycode = Common::KEYCODE_INVALID; //reset + _keyPressed.reset(); _mouseState = 0; do { diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 8968aefb5a..3c8abd0953 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -635,7 +635,7 @@ void SwordEngine::checkCd(void) { uint8 SwordEngine::mainLoop(void) { uint8 retCode = 0; - _keyPressed.keycode = Common::KEYCODE_INVALID; + _keyPressed.reset(); while ((retCode == 0) && (!_systemVars.engineQuit)) { // do we need the section45-hack from sword.c here? @@ -685,7 +685,7 @@ uint8 SwordEngine::mainLoop(void) { _screen->fullRefresh(); } _mouseState = 0; - _keyPressed.keycode = Common::KEYCODE_INVALID; + _keyPressed.reset(); } while ((Logic::_scriptVars[SCREEN] == Logic::_scriptVars[NEW_SCREEN]) && (retCode == 0) && (!_systemVars.engineQuit)); if ((retCode == 0) && (Logic::_scriptVars[SCREEN] != 53) && _systemVars.wantFade && (!_systemVars.engineQuit)) { -- cgit v1.2.3