Skip to content

Commit

Permalink
TUCKER: Allow skipping and quitting from cutscene loops
Browse files Browse the repository at this point in the history
  • Loading branch information
salty-horse committed Feb 21, 2016
1 parent 1acbfe8 commit 4b83ce3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions engines/tucker/sequences.cpp
Expand Up @@ -244,7 +244,7 @@ void TuckerEngine::handleNewPartSequence() {
_inputKeys[kInputKeyEscape] = false;
break;
}
} while (isSpeechSoundPlaying());
} while (isSpeechSoundPlaying() && !_quitGame);
stopSpeechSound();
do {
if (_fadePaletteCounter > 0) {
Expand All @@ -257,7 +257,7 @@ void TuckerEngine::handleNewPartSequence() {
drawSprite(0);
redrawScreen(0);
waitForTimer(3);
} while (_fadePaletteCounter > 0);
} while (_fadePaletteCounter > 0 && !_quitGame);
_locationNum = currentLocation;
}

Expand All @@ -281,7 +281,7 @@ void TuckerEngine::handleMeanwhileSequence() {
}
loadImage(filename, _quadBackgroundGfxBuf + 89600, 1);
_fadePaletteCounter = 0;
for (int i = 0; i < 60; ++i) {
for (int i = 0; i < 60 && !_quitGame; ++i) {
if (_fadePaletteCounter < 16) {
fadeOutPalette();
++_fadePaletteCounter;
Expand All @@ -290,6 +290,10 @@ void TuckerEngine::handleMeanwhileSequence() {
_fullRedraw = true;
redrawScreen(0);
waitForTimer(3);
if (_inputKeys[kInputKeyEscape]) {
_inputKeys[kInputKeyEscape] = false;
break;
}
}
do {
if (_fadePaletteCounter > 0) {
Expand All @@ -300,7 +304,7 @@ void TuckerEngine::handleMeanwhileSequence() {
_fullRedraw = true;
redrawScreen(0);
waitForTimer(3);
} while (_fadePaletteCounter > 0);
} while (_fadePaletteCounter > 0 && !_quitGame);
memcpy(_currentPalette, backupPalette, 256 * 3);
_fullRedraw = true;
}
Expand Down

0 comments on commit 4b83ce3

Please sign in to comment.