aboutsummaryrefslogtreecommitdiff
path: root/engines/tucker/sequences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tucker/sequences.cpp')
-rw-r--r--engines/tucker/sequences.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp
index d9f284e443..0151c55eb1 100644
--- a/engines/tucker/sequences.cpp
+++ b/engines/tucker/sequences.cpp
@@ -54,6 +54,7 @@ void TuckerEngine::handleCreditsSequence() {
int counter2 = 0;
int counter1 = 0;
loadCharset2();
+ showCursor(false);
stopSounds();
_locationNum = 74;
_flagsTable[236] = 74;
@@ -159,12 +160,16 @@ void TuckerEngine::handleCreditsSequence() {
redrawScreen(0);
waitForTimer(2);
} while (_fadePaletteCounter > 0);
+ showCursor(true);
}
void TuckerEngine::handleCongratulationsSequence() {
+ // This method is only called right before the program terminates,
+ // so it doesn't bother restoring the palette
_timerCounter2 = 0;
_fadePaletteCounter = 0;
stopSounds();
+ showCursor(false);
loadImage("congrat.pcx", _loadTempBuf, 1);
Graphics::copyRect(_locationBackgroundGfxBuf, 640, _loadTempBuf, 320, 320, 200);
_fullRedraw = true;
@@ -176,11 +181,13 @@ void TuckerEngine::handleCongratulationsSequence() {
}
waitForTimer(3);
}
+ showCursor(true);
}
void TuckerEngine::handleNewPartSequence() {
char filename[40];
+ showCursor(false);
stopSounds();
if (_flagsTable[219] == 1) {
_flagsTable[219] = 0;
@@ -244,7 +251,7 @@ void TuckerEngine::handleNewPartSequence() {
_inputKeys[kInputKeyEscape] = false;
break;
}
- } while (isSpeechSoundPlaying());
+ } while (isSpeechSoundPlaying() && !_quitGame);
stopSpeechSound();
do {
if (_fadePaletteCounter > 0) {
@@ -257,8 +264,9 @@ void TuckerEngine::handleNewPartSequence() {
drawSprite(0);
redrawScreen(0);
waitForTimer(3);
- } while (_fadePaletteCounter > 0);
+ } while (_fadePaletteCounter > 0 && !_quitGame);
_locationNum = currentLocation;
+ showCursor(true);
}
void TuckerEngine::handleMeanwhileSequence() {
@@ -280,8 +288,9 @@ void TuckerEngine::handleMeanwhileSequence() {
strcpy(filename, "loc80.pcx");
}
loadImage(filename, _quadBackgroundGfxBuf + 89600, 1);
+ showCursor(false);
_fadePaletteCounter = 0;
- for (int i = 0; i < 60; ++i) {
+ for (int i = 0; i < 60 && !_quitGame; ++i) {
if (_fadePaletteCounter < 16) {
fadeOutPalette();
++_fadePaletteCounter;
@@ -290,7 +299,10 @@ void TuckerEngine::handleMeanwhileSequence() {
_fullRedraw = true;
redrawScreen(0);
waitForTimer(3);
- ++i;
+ if (_inputKeys[kInputKeyEscape]) {
+ _inputKeys[kInputKeyEscape] = false;
+ break;
+ }
}
do {
if (_fadePaletteCounter > 0) {
@@ -301,9 +313,10 @@ void TuckerEngine::handleMeanwhileSequence() {
_fullRedraw = true;
redrawScreen(0);
waitForTimer(3);
- } while (_fadePaletteCounter > 0);
+ } while (_fadePaletteCounter > 0 && !_quitGame);
memcpy(_currentPalette, backupPalette, 256 * 3);
_fullRedraw = true;
+ showCursor(true);
}
void TuckerEngine::handleMapSequence() {