aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/access/access.cpp10
-rw-r--r--engines/access/amazon/amazon_game.cpp1
-rw-r--r--engines/access/events.cpp2
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);
}