diff options
author | Paul Gilbert | 2014-12-06 16:43:30 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 23:02:06 -0500 |
commit | a1e5e8be9481add1402ea337039b755937ef6441 (patch) | |
tree | 6ea34dbd22b41933f29a100cd0a9b4dd5b21e597 /engines | |
parent | 40b84172969781899347aff208f87da9d243d0ba (diff) | |
download | scummvm-rg350-a1e5e8be9481add1402ea337039b755937ef6441.tar.gz scummvm-rg350-a1e5e8be9481add1402ea337039b755937ef6441.tar.bz2 scummvm-rg350-a1e5e8be9481add1402ea337039b755937ef6441.zip |
ACCESS: Cleaned up event handling for scene establish text display
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/access.cpp | 10 | ||||
-rw-r--r-- | engines/access/amazon/amazon_game.cpp | 1 | ||||
-rw-r--r-- | engines/access/events.cpp | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 55fe2514ed..a09e47c733 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -196,7 +196,7 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { int curPage = 0; int soundsLeft = 0; - for (;;) { + while (!shouldQuit()) { soundsLeft = _countTbl[curPage]; _events->zeroKeys(); @@ -216,7 +216,7 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { if (!_sound->_isVoice) { _events->waitKeyMouse(); } else { - for (;;) { + while (!shouldQuit()) { _sound->freeSounds(); Resource *sound = _sound->loadSound(_narateFile + 99, _sndSubFile); _sound->_soundTable.push_back(SoundEntry(sound, 1)); @@ -225,11 +225,7 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) { _events->pollEvents(); - if (_events->_leftButton) { - _events->debounceLeft(); - _sndSubFile += soundsLeft; - break; - } else if (_events->isKeyPending()) { + if (_events->isKeyMousePressed()) { _sndSubFile += soundsLeft; break; } else { diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp index 902cfcd38a..979fffe2d3 100644 --- a/engines/access/amazon/amazon_game.cpp +++ b/engines/access/amazon/amazon_game.cpp @@ -201,6 +201,7 @@ void AmazonEngine::loadEstablish(int estabIndex) { void AmazonEngine::doEstablish(int screenId, int estabIndex) { _establishMode = 1; + _events->clearEvents(); _screen->forceFadeOut(); _screen->clearScreen(); _screen->setPanel(3); diff --git a/engines/access/events.cpp b/engines/access/events.cpp index a1be7ffa5b..5ed5ee2052 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -299,7 +299,7 @@ void EventsManager::clearEvents() { } void EventsManager::waitKeyMouse() { - while (!_vm->shouldQuit() && isKeyMousePressed()) { + while (!_vm->shouldQuit() && !isKeyMousePressed()) { pollEvents(true); g_system->delayMillis(10); } |