aboutsummaryrefslogtreecommitdiff
path: root/engines/tucker/sequences.cpp
diff options
context:
space:
mode:
authorOri Avtalion2016-02-22 00:47:05 +0200
committerOri Avtalion2016-02-22 00:47:05 +0200
commit4b83ce3800c0ecad8fa34687a4fa59e85737c835 (patch)
tree0c5768c4be52be860970c308684148f73bb6bd43 /engines/tucker/sequences.cpp
parent1acbfe888948a202ff4061071d97e3f1bb33fde1 (diff)
downloadscummvm-rg350-4b83ce3800c0ecad8fa34687a4fa59e85737c835.tar.gz
scummvm-rg350-4b83ce3800c0ecad8fa34687a4fa59e85737c835.tar.bz2
scummvm-rg350-4b83ce3800c0ecad8fa34687a4fa59e85737c835.zip
TUCKER: Allow skipping and quitting from cutscene loops
Diffstat (limited to 'engines/tucker/sequences.cpp')
-rw-r--r--engines/tucker/sequences.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp
index 1591a9595f..e2a25b3560 100644
--- a/engines/tucker/sequences.cpp
+++ b/engines/tucker/sequences.cpp
@@ -244,7 +244,7 @@ void TuckerEngine::handleNewPartSequence() {
_inputKeys[kInputKeyEscape] = false;
break;
}
- } while (isSpeechSoundPlaying());
+ } while (isSpeechSoundPlaying() && !_quitGame);
stopSpeechSound();
do {
if (_fadePaletteCounter > 0) {
@@ -257,7 +257,7 @@ void TuckerEngine::handleNewPartSequence() {
drawSprite(0);
redrawScreen(0);
waitForTimer(3);
- } while (_fadePaletteCounter > 0);
+ } while (_fadePaletteCounter > 0 && !_quitGame);
_locationNum = currentLocation;
}
@@ -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;
@@ -290,6 +290,10 @@ void TuckerEngine::handleMeanwhileSequence() {
_fullRedraw = true;
redrawScreen(0);
waitForTimer(3);
+ if (_inputKeys[kInputKeyEscape]) {
+ _inputKeys[kInputKeyEscape] = false;
+ break;
+ }
}
do {
if (_fadePaletteCounter > 0) {
@@ -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;
}