diff options
author | Johannes Schickel | 2006-05-25 08:07:20 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-05-25 08:07:20 +0000 |
commit | 197b1f4e88b8e4b7f5d0fb56b7a3c24818e17cd2 (patch) | |
tree | d8053f5e8038592cc77f608f530978a3c5b4d602 /engines | |
parent | 259e06a69b14b0612188a167bf2a0d1e4beb3708 (diff) | |
download | scummvm-rg350-197b1f4e88b8e4b7f5d0fb56b7a3c24818e17cd2.tar.gz scummvm-rg350-197b1f4e88b8e4b7f5d0fb56b7a3c24818e17cd2.tar.bz2 scummvm-rg350-197b1f4e88b8e4b7f5d0fb56b7a3c24818e17cd2.zip |
Some more _quitFlag checks, makes quitting while end sequence faster.
svn-id: r22623
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/screen.cpp | 13 | ||||
-rw-r--r-- | engines/kyra/sequences_v1.cpp | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index fe06842225..51687151af 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -218,7 +218,7 @@ void Screen::fadePalette(const uint8 *palData, int delay) { delayInc += delay; } int delayAcc = 0; - while (1) { + while (!_vm->quit()) { delayAcc += delayInc; bool needRefresh = false; for (int i = 0; i < 768; ++i) { @@ -250,6 +250,11 @@ void Screen::fadePalette(const uint8 *palData, int delay) { _vm->delay((delayAcc >> 8) * 1000 / 60); delayAcc &= 0xFF; } + + if (_vm->quit()) { + setScreenPalette(palData); + _system->updateScreen(); + } } void Screen::setPaletteIndex(uint8 index, uint8 red, uint8 green, uint8 blue) { @@ -448,7 +453,7 @@ void Screen::shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPag int32 start, now; int wait; - for (y = 0; y < h; ++y) { + for (y = 0; y < h && !_vm->quit(); ++y) { start = (int32)_system->getMillis(); int y_cur = y; for (x = 0; x < w; ++x) { @@ -470,6 +475,10 @@ void Screen::shuffleScreen(int sx, int sy, int w, int h, int srcPage, int dstPag _vm->delay(wait); } } + if (_vm->quit()) { + copyRegion(sx, sy, sx, sy, w, h, srcPage, dstPage); + _system->updateScreen(); + } } void Screen::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum) { diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index e451fc2206..158d3b4c73 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -993,6 +993,8 @@ void KyraEngine::seq_brandonToStone() { void KyraEngine::seq_playEnding() { debugC(9, kDebugLevelMain, "KyraEngine::seq_playEnding()"); + if (_quitFlag) + return; _screen->hideMouse(); _screen->_curPage = 0; _screen->fadeToBlack(); |