From 374669d7c3d8b9d3b7207925c90417a4e82f7ed2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 19 Oct 2014 22:03:20 -0400 Subject: ACCESS: Fix scene establishment paging when there are multiple pages --- engines/access/access.cpp | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'engines/access') diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 28847370a2..a97bd6d322 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -239,29 +239,34 @@ void AccessEngine::speakText(ASurface *s, Common::Array msgArr) s->_printOrg = Common::Point(s->_printStart.x, s->_printOrg.y + 9); if ((s->_printOrg.y > _printEnd) && (!lastLine)) { - while (true) { - _sound->_soundTable[0] = _sound->loadSound(_narateFile + 99, _sndSubFile); - _sound->_soundPriority[0] = 1; - _sound->playSound(0); - _scripts->cmdFreeSound(); - - _events->pollEvents(); - - if (_events->_leftButton) { - _events->debounceLeft(); - _sndSubFile += soundsLeft; - break; - } else if (_events->_keypresses.size() != 0) { - _sndSubFile += soundsLeft; - break; - } else { - ++_sndSubFile; - --soundsLeft; - if (soundsLeft == 0) + if (!_sound->_isVoice) { + _events->waitKeyMouse(); + } else { + for (;;) { + _sound->_soundTable[0] = _sound->loadSound(_narateFile + 99, _sndSubFile); + _sound->_soundPriority[0] = 1; + _sound->playSound(0); + _scripts->cmdFreeSound(); + + _events->pollEvents(); + + if (_events->_leftButton) { + _events->debounceLeft(); + _sndSubFile += soundsLeft; + break; + } else if (_events->_keypresses.size() != 0) { + _sndSubFile += soundsLeft; break; + } else { + ++_sndSubFile; + --soundsLeft; + if (soundsLeft == 0) + break; + } } } - _buffer2.copyBuffer(s); + + s->copyBuffer(&_buffer2); s->_printOrg.y = s->_printStart.y; ++curPage; soundsLeft = _countTbl[curPage]; -- cgit v1.2.3