diff options
author | Filippos Karapetis | 2015-02-25 00:37:07 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | 16df4305f4334845b52b0bbc999e4d6d04cdbbbb (patch) | |
tree | e2bd0c1d3fb4fa65d4663a58bc9fb1269578ba83 /engines/lab/intro.cpp | |
parent | 6842ffbe90867deb214f4f9e7f0f75476fbefdf9 (diff) | |
download | scummvm-rg350-16df4305f4334845b52b0bbc999e4d6d04cdbbbb.tar.gz scummvm-rg350-16df4305f4334845b52b0bbc999e4d6d04cdbbbb.tar.bz2 scummvm-rg350-16df4305f4334845b52b0bbc999e4d6d04cdbbbb.zip |
LAB: Allow skipping the credits in the intro sequence
Also, remove some unused variables and perform some minor renaming
Diffstat (limited to 'engines/lab/intro.cpp')
-rw-r--r-- | engines/lab/intro.cpp | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 8d508aebba..e37b347d68 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -40,7 +40,7 @@ namespace Lab { static TextFont filler, *msgfont = &filler; -extern bool nopalchange, noscreenchange, hidemouse, DoBlack, NoFlip, IsHiRes; +extern bool nopalchange, hidemouse, DoBlack, NoFlip, IsHiRes; extern char diffcmap[256 * 3]; @@ -248,18 +248,19 @@ void musicDelay() { static void NReadPict(const char *Filename, bool PlayOnce) { - char filename[20] = "P:Intro/"; + Common::String finalFileName = "P:Intro/"; g_music->newCheckMusic(); + introEatMessages(); if (QuitIntro) return; - strcat(filename, Filename); + finalFileName += Filename; DoBlack = IntroDoBlack; stopDiffEnd(); - readPict(filename, PlayOnce); + readPict(finalFileName.c_str(), PlayOnce); } @@ -274,13 +275,17 @@ void introSequence() { DoBlack = true; if (g_lab->getPlatform() != Common::kPlatformWindows) { - readPict("p:Intro/EA0", true); - readPict("p:Intro/EA1", true); - readPict("p:Intro/EA2", true); - readPict("p:Intro/EA3", true); + NReadPict("EA0", true); + NReadPict("EA1", true); + NReadPict("EA2", true); + NReadPict("EA3", true); } else { - readPict("p:Intro/WYRMKEEP", true); - microDelay(4, 0); + NReadPict("WYRMKEEP", true); + for (counter = 0; counter < 4; counter++) { + if (QuitIntro) + break; + microDelay(1, 0); + } } blackAllScreen(); @@ -288,14 +293,15 @@ void introSequence() { g_music->initMusic(); nopalchange = true; - noscreenchange = true; - readPict("p:Intro/TNDcycle2.pic", true); + NReadPict("TNDcycle2.pic", true); nopalchange = false; - noscreenchange = false; FadePalette = Palette; for (counter = 0; counter < 16; counter++) { + if (QuitIntro) + break; + Palette[counter] = ((diffcmap[counter * 3] >> 2) << 8) + ((diffcmap[counter * 3 + 1] >> 2) << 4) + (diffcmap[counter * 3 + 2] >> 2); @@ -305,6 +311,9 @@ void introSequence() { fade(true, 0); for (int times = 0; times < 150; times++) { + if (QuitIntro) + break; + g_music->newCheckMusic(); uint16 temp = Palette[2]; @@ -322,24 +331,24 @@ void introSequence() { g_music->newCheckMusic(); - readPict("p:Intro/Title.A", true); - readPict("p:Intro/AB", true); + NReadPict("Title.A", true); + NReadPict("AB", true); musicDelay(); - readPict("p:Intro/BA", true); - readPict("p:Intro/AC", true); + NReadPict("BA", true); + NReadPict("AC", true); musicDelay(); if (g_lab->getPlatform() == Common::kPlatformWindows) musicDelay(); // more credits on this page now - readPict("p:Intro/CA", true); - readPict("p:Intro/AD", true); + NReadPict("CA", true); + NReadPict("AD", true); musicDelay(); if (g_lab->getPlatform() == Common::kPlatformWindows) musicDelay(); // more credits on this page now - readPict("p:Intro/DA", true); + NReadPict("DA", true); musicDelay(); g_music->newOpen("p:Intro/Intro.1"); /* load the picture into the buffer */ @@ -351,9 +360,7 @@ void introSequence() { getFont("P:Map.font", msgfont); nopalchange = true; - noscreenchange = true; - readPict("p:Intro/Intro.1", true); - noscreenchange = false; + NReadPict("Intro.1", true); nopalchange = false; for (counter = 0; counter < 16; counter++) { |