aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/access.cpp43
1 files changed, 18 insertions, 25 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index bb5414da31..97b08d73c4 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -216,27 +216,25 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) {
s->_printOrg = Common::Point(s->_printStart.x, s->_printOrg.y + 9);
if ((s->_printOrg.y > _printEnd) && (!lastLine)) {
- if (!_sound->_isVoice) {
- _events->waitKeyMouse();
- } else {
- while (!shouldQuit()) {
- _sound->freeSounds();
- Resource *sound = _sound->loadSound(_narateFile + 99, _sndSubFile);
- _sound->_soundTable.push_back(SoundEntry(sound, 1));
- _sound->playSound(0);
- _scripts->cmdFreeSound();
-
- _events->pollEvents();
-
- if (_events->isKeyMousePressed()) {
- _sndSubFile += soundsLeft;
+ _events->clearEvents();
+ while (!shouldQuit()) {
+ _sound->freeSounds();
+ Resource *sound = _sound->loadSound(_narateFile + 99, _sndSubFile);
+ _sound->_soundTable.push_back(SoundEntry(sound, 1));
+ _sound->playSound(0);
+ _scripts->cmdFreeSound();
+
+ _events->pollEvents();
+
+ if (_events->isKeyMousePressed()) {
+ _sndSubFile += soundsLeft;
+ break;
+ } else {
+ ++_sndSubFile;
+ --soundsLeft;
+ if (soundsLeft == 0)
break;
- } else {
- ++_sndSubFile;
- --soundsLeft;
- if (soundsLeft == 0)
- break;
- }
+ _events->clearEvents();
}
}
@@ -253,11 +251,6 @@ void AccessEngine::speakText(ASurface *s, const Common::String &msg) {
if (soundsLeft == 0)
return;
- if (!_sound->_isVoice) {
- _events->waitKeyMouse();
- return;
- }
-
for (;;) {
_sound->freeSounds();
Resource *res = _sound->loadSound(_narateFile + 99, _sndSubFile);