diff options
author | Max Horn | 2009-01-30 16:04:39 +0000 |
---|---|---|
committer | Max Horn | 2009-01-30 16:04:39 +0000 |
commit | 716f88f57127e32916ce22f756b1a3f2d2eff9d6 (patch) | |
tree | e8d0463c041f44e52ef8a4bf1487fda8d4076577 /engines/sword1/credits.cpp | |
parent | f465abb75d81a248e3c553aa5706031b52c7189d (diff) | |
download | scummvm-rg350-716f88f57127e32916ce22f756b1a3f2d2eff9d6.tar.gz scummvm-rg350-716f88f57127e32916ce22f756b1a3f2d2eff9d6.tar.bz2 scummvm-rg350-716f88f57127e32916ce22f756b1a3f2d2eff9d6.zip |
Avoid using g_engine if possible
svn-id: r36149
Diffstat (limited to 'engines/sword1/credits.cpp')
-rw-r--r-- | engines/sword1/credits.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sword1/credits.cpp b/engines/sword1/credits.cpp index a3ce402711..986f751f8a 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)) && !g_engine->shouldQuit()) { + while (((*textData != FNT_EOB) || (scrollY != renderY)) && !Engine::shouldQuit()) { 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) && !g_engine->shouldQuit()) { + while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEUP_TIME) && !Engine::shouldQuit()) { 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) && !g_engine->shouldQuit()) { + while ((_mixer->getSoundElapsedTime(bgSound) < LOGO_FADEDOWN_TIME) && !Engine::shouldQuit()) { delay(100); } fadePalette(revoPal, false, _palLen); delay(3000); - if (g_engine->shouldQuit()) + if (Engine::shouldQuit()) _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) && !g_engine->shouldQuit(); fadeStep += fadeDir) { + for (int fadeStep = fadeStart; (fadeStep >= 0) && (fadeStep <= 12) && !Engine::shouldQuit(); 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); @@ -293,7 +293,7 @@ void CreditsPlayer::delay(int msecs) { if (msecs > 0) _system->delayMillis(10); - } while ((_system->getMillis() < start + msecs) && !g_engine->shouldQuit()); + } while ((_system->getMillis() < start + msecs) && !Engine::shouldQuit()); } ArcFile::ArcFile(void) { |