Skip to content

Commit

Permalink
ACCESS: Fix scene establishment paging when there are multiple pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent 5a6a44f commit 374669d
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions engines/access/access.cpp
Expand Up @@ -239,29 +239,34 @@ void AccessEngine::speakText(ASurface *s, Common::Array<Common::String> 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];
Expand Down

0 comments on commit 374669d

Please sign in to comment.