diff options
author | Filippos Karapetis | 2015-07-21 22:01:50 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-15 00:05:02 +0100 |
commit | da0ee48ab941185749f639e884b79e9892dfca82 (patch) | |
tree | f955f7960ccf82356968535558fdd1ee49027bd8 /engines/lab | |
parent | b1eb345f8076806ce73cd41ecae51b14be121a34 (diff) | |
download | scummvm-rg350-da0ee48ab941185749f639e884b79e9892dfca82.tar.gz scummvm-rg350-da0ee48ab941185749f639e884b79e9892dfca82.tar.bz2 scummvm-rg350-da0ee48ab941185749f639e884b79e9892dfca82.zip |
LAB: Remove the fillUpMusic() and checkMusic() wrappers. Some cleanup
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/intro.cpp | 48 | ||||
-rw-r--r-- | engines/lab/map.cpp | 14 |
2 files changed, 26 insertions, 36 deletions
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index c430b61058..16a54ff53f 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -39,25 +39,13 @@ namespace Lab { static TextFont filler, *msgfont = &filler; +static bool QuitIntro = false, IntroDoBlack; -extern bool nopalchange, hidemouse, DoBlack, NoFlip, IsHiRes; - +extern bool nopalchange, DoBlack, IsHiRes; extern char diffcmap[256 * 3]; - extern uint32 VGAScreenWidth, VGAScreenHeight; - - extern uint16 *FadePalette; -static uint16 Palette[16] = { - 0x0000, 0x0855, 0x0FF9, 0x0EE7, 0x0ED5, 0x0DB4, 0x0CA2, 0x0C91, 0x0B80, 0x0B80, 0x0B91, 0x0CA2, 0x0CB3, 0x0DC4, 0x0DD6, 0x0EE7 -}; - - -static bool QuitIntro = false, IntroDoBlack; -extern int32 longcharsdrawn; - - /******************************************************************************/ /* Goes thru, and responds to all the intuition messages currently in the */ @@ -105,10 +93,10 @@ static void doPictText(const char *Filename, bool isscreen) { strcat(filename, Filename); if (isscreen) { - g_music->fillUpMusic(true); + g_music->updateMusic(); timedelay = 35; } else { - g_music->checkMusic(); + g_music->updateMusic(); timedelay = 7; } @@ -160,7 +148,7 @@ static void doPictText(const char *Filename, bool isscreen) { Msg = getMsg(); if (Msg == NULL) { - g_music->checkMusic(); + g_music->updateMusic(); diffNextFrame(); getTime(&secs, µs); @@ -235,13 +223,13 @@ static void doPictText(const char *Filename, bool isscreen) { void musicDelay() { int16 counter; - g_music->checkMusic(); + g_music->updateMusic(); if (QuitIntro) return; for (counter = 0; counter < 20; counter++) { - g_music->checkMusic(); + g_music->updateMusic(); waitTOF(); waitTOF(); waitTOF(); @@ -253,7 +241,7 @@ void musicDelay() { static void NReadPict(const char *Filename, bool PlayOnce) { Common::String finalFileName = "P:Intro/"; - g_music->checkMusic(); + g_music->updateMusic(); introEatMessages(); if (QuitIntro) @@ -272,6 +260,10 @@ static void NReadPict(const char *Filename, bool PlayOnce) { /*****************************************************************************/ void introSequence() { uint16 counter, counter1; + + uint16 Palette[16] = { + 0x0000, 0x0855, 0x0FF9, 0x0EE7, 0x0ED5, 0x0DB4, 0x0CA2, 0x0C91, 0x0B80, 0x0B80, 0x0B91, 0x0CA2, 0x0CB3, 0x0DC4, 0x0DD6, 0x0EE7 + }; DoBlack = true; @@ -313,14 +305,14 @@ void introSequence() { (diffcmap[counter * 3 + 2] >> 2); } - g_music->checkMusic(); + g_music->updateMusic(); fade(true, 0); for (int times = 0; times < 150; times++) { if (QuitIntro) break; - g_music->checkMusic(); + g_music->updateMusic(); uint16 temp = Palette[2]; for (counter = 2; counter < 15; counter++) @@ -335,7 +327,7 @@ void introSequence() { fade(false, 0); blackAllScreen(); - g_music->checkMusic(); + g_music->updateMusic(); NReadPict("Title.A", true); NReadPict("AB", true); @@ -359,9 +351,9 @@ void introSequence() { g_music->newOpen("p:Intro/Intro.1"); /* load the picture into the buffer */ - g_music->checkMusic(); + g_music->updateMusic(); blackAllScreen(); - g_music->fillUpMusic(true); + g_music->updateMusic(); getFont("P:Map.fon", msgfont); @@ -382,7 +374,7 @@ void introSequence() { freeAllStolenMem(); blackAllScreen(); - g_music->fillUpMusic(true); + g_music->updateMusic(); IntroDoBlack = true; NReadPict("Station1", true); @@ -414,7 +406,7 @@ void introSequence() { for (counter1 = (8 * 3); counter1 < (255 * 3); counter1++) diffcmap[counter1] = 255 - diffcmap[counter1]; - g_music->checkMusic(); + g_music->updateMusic(); waitTOF(); VGASetPal(diffcmap, 256); waitTOF(); @@ -479,8 +471,6 @@ void introSequence() { rectFill(0, 0, VGAScreenWidth - 1, VGAScreenHeight - 1); DoBlack = true; } - - hidemouse = false; } } // End of namespace Lab diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index a3cae9b841..3b2eaf67f5 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -83,7 +83,7 @@ bool getFont(const char *filename, TextFont *textfont) { uint32 filesize, headersize = 4L + 2L + 256 * 3 + 4L; file = g_music->newOpen(filename, filesize); - g_music->checkMusic(); + g_music->updateMusic(); if ((file != NULL) && (filesize > headersize)) { byte *fontbuffer = (byte *)stealBufMem(filesize - (sizeof(TextFont) + 4)); @@ -102,7 +102,7 @@ bool getFont(const char *filename, TextFont *textfont) { readBlock(textfont->Offsets, 256L * 2L, file); swapUShortPtr(textfont->Offsets, 256); - skip(file, 4L); + (*file) += 4; textfont->data = fontbuffer; readBlock(textfont->data, textfont->DataLength, file); return true; @@ -120,7 +120,7 @@ char *getText(const char *filename) { bool dodecrypt; byte **tfile; - g_music->checkMusic(); + g_music->updateMusic(); dodecrypt = (isBuffered(filename) == NULL); tfile = g_music->newOpen(filename); @@ -624,7 +624,7 @@ static void drawMap(uint16 CurRoom, uint16 CurMsg, uint16 Floor, bool fadeout, b && g_lab->_roomsFound->in(drawroom) && Maps[drawroom].x) { drawRoom(drawroom, (bool)(drawroom == CurRoom)); - g_music->checkMusic(); + g_music->updateMusic(); } } @@ -729,11 +729,11 @@ void processMap(uint16 CurRoom) { CurFloor = Maps[CurRoom].PageNumber; while (1) { - g_music->checkMusic(); /* Make sure we check the music at least after every message */ + g_music->updateMusic(); /* Make sure we check the music at least after every message */ Msg = getMsg(); if (Msg == NULL) { - g_music->checkMusic(); + g_music->updateMusic(); if (place <= 14) { newcolor[0] = 14 << 2; @@ -893,7 +893,7 @@ void processMap(uint16 CurRoom) { void doMap(uint16 CurRoom) { FadePalette = AmigaMapPalette; - g_music->checkMusic(); + g_music->updateMusic(); loadMapData(); blackAllScreen(); |