mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
LAB: Remove the fillUpMusic() and checkMusic() wrappers. Some cleanup
This commit is contained in:
parent
b1eb345f80
commit
da0ee48ab9
@ -39,24 +39,12 @@
|
||||
namespace Lab {
|
||||
|
||||
static TextFont filler, *msgfont = &filler;
|
||||
|
||||
extern bool nopalchange, hidemouse, DoBlack, NoFlip, 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;
|
||||
|
||||
extern bool nopalchange, DoBlack, IsHiRes;
|
||||
extern char diffcmap[256 * 3];
|
||||
extern uint32 VGAScreenWidth, VGAScreenHeight;
|
||||
extern uint16 *FadePalette;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
@ -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
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user