diff options
author | Christopher Page | 2008-07-13 21:54:23 +0000 |
---|---|---|
committer | Christopher Page | 2008-07-13 21:54:23 +0000 |
commit | e7d7f8df95fc45c9fedb5238e6634080cb8f49cf (patch) | |
tree | 67d0b165c5dbf9ab4f9f3ef34a53a37a21f2c016 /engines/sword1/credits.cpp | |
parent | a6e1d6bd3dcdc1fae7832ffe26b4d774ec1fe6a3 (diff) | |
download | scummvm-rg350-e7d7f8df95fc45c9fedb5238e6634080cb8f49cf.tar.gz scummvm-rg350-e7d7f8df95fc45c9fedb5238e6634080cb8f49cf.tar.bz2 scummvm-rg350-e7d7f8df95fc45c9fedb5238e6634080cb8f49cf.zip |
SWORD1 works with the new GMM implementation
svn-id: r33043
Diffstat (limited to 'engines/sword1/credits.cpp')
-rw-r--r-- | engines/sword1/credits.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/sword1/credits.cpp b/engines/sword1/credits.cpp index 14dd0ecd2b..55f1f7358b 100644 --- a/engines/sword1/credits.cpp +++ b/engines/sword1/credits.cpp @@ -125,7 +125,7 @@ void CreditsPlayer::play(void) { uint16 renderY = BUFSIZE_Y / 2; uint16 clearY = 0xFFFF; bool clearLine = false; - while (((*textData != FNT_EOB) || (scrollY != renderY)) && !SwordEngine::_systemVars.engineQuit) { + while (((*textData != FNT_EOB) || (scrollY != renderY)) && !g_engine->quit()) { if ((int32)_mixer->getSoundElapsedTime(bgSound) - relDelay < (SCROLL_TIMING * 2)) { // sync to audio if (scrollY < BUFSIZE_Y - CREDITS_Y) _system->copyRectToScreen(screenBuf + scrollY * CREDITS_X, CREDITS_X, START_X, START_Y, CREDITS_X, CREDITS_Y); @@ -175,7 +175,7 @@ void CreditsPlayer::play(void) { uint8 *revoBuf = credFile.decompressFile(REVO_LOGO); uint8 *revoPal = credFile.fetchFile(REVO_PAL, &_palLen); _palLen /= 3; - while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEUP_TIME) && !SwordEngine::_systemVars.engineQuit) { + while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEUP_TIME) && !g_engine->quit()) { delay(100); } memset(_palette, 0, 256 * 4); @@ -184,13 +184,13 @@ void CreditsPlayer::play(void) { _system->updateScreen(); fadePalette(revoPal, true, _palLen); - while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEDOWN_TIME) && !SwordEngine::_systemVars.engineQuit) { + while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEDOWN_TIME) && !g_engine->quit()) { delay(100); } fadePalette(revoPal, false, _palLen); delay(3000); - if (SwordEngine::_systemVars.engineQuit) + if (g_engine->quit()) _mixer->stopAll(); free(revoBuf); } @@ -200,7 +200,7 @@ void CreditsPlayer::fadePalette(uint8 *srcPal, bool fadeup, uint16 len) { int fadeStart = fadeup ? 0 : 12; int relDelay = _system->getMillis(); - for (int fadeStep = fadeStart; (fadeStep >= 0) && (fadeStep <= 12) && !SwordEngine::_systemVars.engineQuit; fadeStep += fadeDir) { + for (int fadeStep = fadeStart; (fadeStep >= 0) && (fadeStep <= 12) && !g_engine->quit(); fadeStep += fadeDir) { for (uint16 cnt = 0; cnt < len * 3; cnt++) _palette[(cnt / 3) * 4 + (cnt % 3)] = (srcPal[cnt] * fadeStep) / 12; _system->setPalette(_palette, 0, 256); @@ -281,9 +281,6 @@ void CreditsPlayer::delay(int msecs) { Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case Common::EVENT_QUIT: - SwordEngine::_systemVars.engineQuit = true; - break; default: break; } @@ -294,7 +291,7 @@ void CreditsPlayer::delay(int msecs) { if (msecs > 0) _system->delayMillis(10); - } while ((_system->getMillis() < start + msecs) && !SwordEngine::_systemVars.engineQuit); + } while ((_system->getMillis() < start + msecs) && !g_engine->quit()); } ArcFile::ArcFile(void) { |