- make the startup banner in the initial console window work.

This commit is contained in:
Christoph Oelckers 2021-04-10 19:14:30 +02:00
parent 02dedaad46
commit db5fbe3bbb
4 changed files with 99 additions and 3 deletions

View file

@ -717,9 +717,6 @@ static TArray<GrpEntry> SetupGame()
if (groupno == -1) return TArray<GrpEntry>();
auto& group = groups[groupno];
if (GameStartupInfo.Name.IsNotEmpty()) I_SetWindowTitle(GameStartupInfo.Name);
else I_SetWindowTitle(group.FileInfo.name);
// Now filter out the data we actually need and delete the rest.
usedgroups.Push(group);
@ -818,6 +815,8 @@ void CreateStatusBar()
int RunGame()
{
GameStartupInfo.FgColor = 0xffffff;
// Set up the console before anything else so that it can receive text.
C_InitConsole(1024, 768, true);
@ -836,6 +835,19 @@ int RunGame()
G_LoadConfig();
auto usedgroups = SetupGame();
for (auto& grp : usedgroups)
{
if (grp.FileInfo.name.IsNotEmpty())
{
if (GameStartupInfo.Name.IsEmpty()) GameStartupInfo.Name = grp.FileInfo.name;
if (grp.FileInfo.FgColor != grp.FileInfo.BgColor && (GameStartupInfo.FgColor != 0 || GameStartupInfo.BkColor != 0))
{
GameStartupInfo.FgColor = grp.FileInfo.FgColor;
GameStartupInfo.BkColor = grp.FileInfo.BgColor;
}
}
}
I_SetIWADInfo();
InitFileSystem(usedgroups);
if (usedgroups.Size() == 0) return 0;
@ -927,6 +939,7 @@ int RunGame()
lookups.postLoadTables();
PostLoadSetup();
videoInit();
if (GameStartupInfo.Name.IsNotEmpty()) I_SetWindowTitle(GameStartupInfo.Name);
D_CheckNetGame();
UpdateGenericUI(ui_generic);

View file

@ -150,6 +150,7 @@ struct GrpInfo
TArray<FString> tobedeleted;
TArray<FString> loadfiles;
TArray<FString> loadart;
uint32_t FgColor = 0, BgColor = 0;
};

View file

@ -460,6 +460,16 @@ static TArray<GrpInfo> ParseGrpInfo(const char *fn, FileReader &fr, TMap<FString
sc.MustGetToken(TK_StringConst);
grp.gamefilter = sc.String;
}
else if (sc.Compare("fgcolor"))
{
sc.MustGetToken(TK_IntConst);
grp.FgColor = sc.Number;
}
else if (sc.Compare("bkcolor"))
{
sc.MustGetToken(TK_IntConst);
grp.BgColor = sc.Number;
}
else if (sc.Compare("crc"))
{
sc.MustGetAnyToken();

View file

@ -52,6 +52,8 @@ grpinfo
flags GAMEFLAG_DUKE
gamefilter "Duke.Duke"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -62,6 +64,8 @@ grpinfo
flags GAMEFLAG_DUKE
gamefilter "Duke.Duke"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -72,6 +76,8 @@ grpinfo
flags GAMEFLAG_DUKE
gamefilter "Duke.Duke"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -82,6 +88,8 @@ grpinfo
flags GAMEFLAG_DUKE
gamefilter "Duke.Duke"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo // another variant? I got this one, dated 2016-10-12
@ -92,6 +100,8 @@ grpinfo // another variant? I got this one, dated 2016-10-12
flags GAMEFLAG_DUKE
gamefilter "Duke.Duke"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -102,6 +112,8 @@ grpinfo
flags GAMEFLAG_DUKE
gamefilter "Duke.Duke"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -112,6 +124,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA
gamefilter "Duke.Shareware"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -122,6 +136,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE
gamefilter "Duke.Shareware"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -132,6 +148,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE
gamefilter "Duke.Shareware"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -142,6 +160,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE
gamefilter "Duke.Shareware"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -152,6 +172,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE
gamefilter "Duke.Shareware"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -162,6 +184,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE
gamefilter "Duke.Shareware"
dependency 0
FgColor 0xffff00
BkColor 0xff6f00
}
grpinfo
@ -218,6 +242,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
dependency DUKE15_CRC
gamefilter "Duke.Vacation"
FgColor 0x00004f
BkColor 0x8f8fff
}
grpinfo
@ -229,6 +255,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
dependency DUKE15_CRC
gamefilter "Duke.Vacation"
FgColor 0x00004f
BkColor 0x8f8fff
}
grpinfo
@ -240,6 +268,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
dependency DUKE15_CRC
gamefilter "Duke.NWinter"
FgColor 0
BkColor 0x8f8f8f
}
grpinfo
@ -251,6 +281,8 @@ grpinfo
flags GAMEFLAG_DUKE|GAMEFLAG_ADDON
dependency DUKE15_CRC
gamefilter "Duke.NWinter"
FgColor 0
BkColor 0x8f8f8f
}
grpinfo
@ -297,6 +329,8 @@ grpinfo
dependency 0
loadgrp "SOUNDS.RFF", "GUI.RFF"
gamefilter "Blood.Blood"
FgColor 0
BkColor 0x7f003f
}
grpinfo
@ -310,6 +344,8 @@ grpinfo
dependency 0
loadgrp "SOUNDS.RFF", "GUI.RFF"
gamefilter "Blood.Blood"
FgColor 0
BkColor 0xaf0024
}
grpinfo
@ -323,6 +359,8 @@ grpinfo
dependency 0
loadgrp "SOUNDS.RFF", "GUI.RFF"
gamefilter "Blood.Blood"
FgColor 0
BkColor 0xaf0024
}
grpinfo
@ -336,6 +374,8 @@ grpinfo
dependency 0
loadgrp "SOUNDS.RFF", "GUI.RFF"
gamefilter "Blood.Blood"
FgColor 0
BkColor 0x7f002f
}
/* this doesn't work with the current setup.
@ -410,6 +450,8 @@ grpinfo
size 47536148
defname "sw.def"
gamefilter "ShadowWarrior.ShadowWarrior"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -420,6 +462,8 @@ grpinfo
size 47536148
defname "sw.def"
gamefilter "ShadowWarrior.ShadowWarrior"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -430,6 +474,8 @@ grpinfo
size 47536148
defname "sw.def"
gamefilter "ShadowWarrior.ShadowWarrior"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -440,6 +486,8 @@ grpinfo
size 47537951
defname "sw.def"
gamefilter "ShadowWarrior.ShadowWarrior"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -450,6 +498,8 @@ grpinfo
size 25702245
defname "sw.def"
gamefilter "ShadowWarrior.Shareware"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -460,6 +510,8 @@ grpinfo
size 25833456
defname "sw.def"
gamefilter "ShadowWarrior.Shareware"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -470,6 +522,8 @@ grpinfo
size 26056769
defname "sw.def"
gamefilter "ShadowWarrior.Shareware"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -480,6 +534,8 @@ grpinfo
size 26056769
defname "sw.def"
gamefilter "ShadowWarrior.Shareware"
FgColor 0
BkColor 0xaf0000
}
grpinfo
@ -559,6 +615,8 @@ grpinfo
flags GAMEFLAG_RR
dependency 0
gamefilter "Redneck.Redneck"
FgColor 0xbc9e89
BkColor 0x7f3300
}
grpinfo
@ -570,6 +628,8 @@ grpinfo
flags GAMEFLAG_RRRA
dependency 0
gamefilter "Redneck.RidesAgain"
FgColor 0xbc9e89
BkColor 0x7f3300
}
grpinfo
@ -606,6 +666,8 @@ grpinfo
flags GAMEFLAG_NAM
dependency 0
gamefilter "Nam.Nam"
FgColor 0
BkColor 0x78720d
}
grpinfo
@ -616,6 +678,8 @@ grpinfo
flags GAMEFLAG_NAM|GAMEFLAG_NAPALM
dependency 0
gamefilter "Nam.Napalm"
FgColor 0
BkColor 0x78720d
}
grpinfo
@ -626,6 +690,8 @@ grpinfo
flags GAMEFLAG_WW2GI
dependency 0
gamefilter "WW2GI.WW2GI"
FgColor 0
BkColor 0x78720d
}
grpinfo
@ -647,6 +713,8 @@ grpinfo
size 27020745
defname "exhumed.def"
gamefilter "Exhumed.Powerslave"
FgColor 0xff0000
BkColor 0xffff33
}
grpinfo
@ -657,6 +725,8 @@ grpinfo
size 27108170
defname "exhumed.def"
gamefilter "Exhumed.Exhumed"
FgColor 0xff0000
BkColor 0xffff33
}
grpinfo
@ -667,6 +737,8 @@ grpinfo
size 27020745
defname "exhumed.def"
gamefilter "Exhumed.Powerslave"
FgColor 0xff0000
BkColor 0xffff33
}