mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- made status bar configurable through rmapinfo.
This commit is contained in:
parent
ee559b7ba9
commit
f2d75d4146
12 changed files with 168 additions and 24 deletions
|
@ -1128,6 +1128,14 @@ void FMapInfoParser::ParseGameInfo()
|
|||
sc.SetCMode(false);
|
||||
globalCutscenes.MPSummaryScreen = sc.String;
|
||||
}
|
||||
else if (sc.Compare("statusbarclass"))
|
||||
{
|
||||
ParseAssign();
|
||||
sc.SetCMode(false);
|
||||
sc.MustGetString();
|
||||
sc.SetCMode(false);
|
||||
globalCutscenes.StatusBarClass = sc.String;
|
||||
}
|
||||
else if (!ParseCloseBrace())
|
||||
{
|
||||
// Unknown
|
||||
|
|
|
@ -797,30 +797,7 @@ void InitLanguages()
|
|||
|
||||
void CreateStatusBar()
|
||||
{
|
||||
int flags = g_gameType;
|
||||
PClass* stbarclass = nullptr;
|
||||
|
||||
GC::AddMarkerFunc([]() { GC::Mark(StatusBar); });
|
||||
if (flags & GAMEFLAG_BLOOD)
|
||||
{
|
||||
stbarclass = PClass::FindClass("BloodStatusBar");
|
||||
}
|
||||
else if (flags & GAMEFLAG_SW)
|
||||
{
|
||||
stbarclass = PClass::FindClass("SWStatusBar");
|
||||
}
|
||||
else if (flags & GAMEFLAG_PSEXHUMED)
|
||||
{
|
||||
stbarclass = PClass::FindClass("ExhumedStatusBar");
|
||||
}
|
||||
else if (flags & GAMEFLAG_RRALL)
|
||||
{
|
||||
stbarclass = PClass::FindClass("RedneckStatusBar");
|
||||
}
|
||||
else
|
||||
{
|
||||
stbarclass = PClass::FindClass("DukeStatusBar");
|
||||
}
|
||||
auto stbarclass = PClass::FindClass(globalCutscenes.StatusBarClass);
|
||||
if (!stbarclass)
|
||||
{
|
||||
I_FatalError("No status bar defined");
|
||||
|
@ -828,6 +805,7 @@ void CreateStatusBar()
|
|||
StatusBar = static_cast<DStatusBarCore*>(stbarclass->CreateNew());
|
||||
StatusBar->SetSize(0, 320, 200);
|
||||
InitStatusBar();
|
||||
GC::AddMarkerFunc([]() { GC::Mark(StatusBar); });
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ struct GlobalCutscenes
|
|||
CutsceneDef LoadingScreen;
|
||||
FString MPSummaryScreen;
|
||||
FString SummaryScreen;
|
||||
FString StatusBarClass;
|
||||
};
|
||||
|
||||
struct ClusterDef
|
||||
|
|
|
@ -18,4 +18,5 @@ gameinfo
|
|||
{
|
||||
summaryscreen = BloodCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = BloodCutscenes.BuildMPSummary
|
||||
statusbarclass = BloodStatusBar
|
||||
}
|
||||
|
|
|
@ -71,4 +71,5 @@ gameinfo
|
|||
{
|
||||
summaryscreen = DukeCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = DukeCutscenes.BuildMPSummary
|
||||
statusbarclass = DukeStatusBar
|
||||
}
|
|
@ -300,4 +300,5 @@ cutscenes
|
|||
gameinfo
|
||||
{
|
||||
summaryscreen = ExhumedCutscenes.BuildMap
|
||||
statusbarclass = ExhumedStatusBar
|
||||
}
|
||||
|
|
75
wadsrc/static/filter/nam/engine/rmapinfo.txt
Normal file
75
wadsrc/static/filter/nam/engine/rmapinfo.txt
Normal file
|
@ -0,0 +1,75 @@
|
|||
//This sets up the missing things that cannot be inferred from the setup in the .CON files.
|
||||
|
||||
cluster 1
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE1End
|
||||
}
|
||||
}
|
||||
|
||||
cluster 2
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE2End
|
||||
}
|
||||
interbackground = "BONUSSCREEN2"
|
||||
}
|
||||
|
||||
cluster 3
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE3End
|
||||
}
|
||||
}
|
||||
|
||||
cluster 4
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE4End
|
||||
}
|
||||
}
|
||||
|
||||
cluster 5
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE5End
|
||||
}
|
||||
}
|
||||
|
||||
map { 4, 1 }
|
||||
{
|
||||
intro
|
||||
{
|
||||
function = DukeCutscenes.BuildE4Intro
|
||||
}
|
||||
}
|
||||
|
||||
cutscenes
|
||||
{
|
||||
intro
|
||||
{
|
||||
function = DukeCutscenes.BuildIntro
|
||||
}
|
||||
|
||||
sharewareend
|
||||
{
|
||||
function = DukeCutscenes.BuildSharewareEnd
|
||||
}
|
||||
|
||||
loadscreen
|
||||
{
|
||||
function = DukeCutscenes.BuildLoading
|
||||
}
|
||||
}
|
||||
|
||||
gameinfo
|
||||
{
|
||||
summaryscreen = DukeCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = DukeCutscenes.BuildMPSummary
|
||||
statusbarclass = DukeStatusBar
|
||||
}
|
|
@ -121,4 +121,5 @@ gameinfo
|
|||
{
|
||||
summaryscreen = RRCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's
|
||||
statusbarclass = RedneckStatusBar
|
||||
}
|
||||
|
|
|
@ -117,4 +117,5 @@ gameinfo
|
|||
{
|
||||
summaryscreen = RRCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's
|
||||
statusbarclass = RedneckStatusBar
|
||||
}
|
||||
|
|
|
@ -106,4 +106,5 @@ gameinfo
|
|||
{
|
||||
summaryscreen = RRCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's
|
||||
statusbarclass = RedneckStatusBar
|
||||
}
|
||||
|
|
|
@ -59,5 +59,6 @@ gameinfo
|
|||
{
|
||||
summaryscreen = SWCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = SWCutscenes.BuildMPSummary
|
||||
statusbarclass = SWStatusBar
|
||||
}
|
||||
|
||||
|
|
75
wadsrc/static/filter/ww2gi/engine/rmapinfo.txt
Normal file
75
wadsrc/static/filter/ww2gi/engine/rmapinfo.txt
Normal file
|
@ -0,0 +1,75 @@
|
|||
//This sets up the missing things that cannot be inferred from the setup in the .CON files.
|
||||
|
||||
cluster 1
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE1End
|
||||
}
|
||||
}
|
||||
|
||||
cluster 2
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE2End
|
||||
}
|
||||
interbackground = "BONUSSCREEN2"
|
||||
}
|
||||
|
||||
cluster 3
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE3End
|
||||
}
|
||||
}
|
||||
|
||||
cluster 4
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE4End
|
||||
}
|
||||
}
|
||||
|
||||
cluster 5
|
||||
{
|
||||
outro
|
||||
{
|
||||
function = DukeCutscenes.BuildE5End
|
||||
}
|
||||
}
|
||||
|
||||
map { 4, 1 }
|
||||
{
|
||||
intro
|
||||
{
|
||||
function = DukeCutscenes.BuildE4Intro
|
||||
}
|
||||
}
|
||||
|
||||
cutscenes
|
||||
{
|
||||
intro
|
||||
{
|
||||
function = DukeCutscenes.BuildIntro
|
||||
}
|
||||
|
||||
sharewareend
|
||||
{
|
||||
function = DukeCutscenes.BuildSharewareEnd
|
||||
}
|
||||
|
||||
loadscreen
|
||||
{
|
||||
function = DukeCutscenes.BuildLoading
|
||||
}
|
||||
}
|
||||
|
||||
gameinfo
|
||||
{
|
||||
summaryscreen = DukeCutscenes.BuildSPSummary
|
||||
mpsummaryscreen = DukeCutscenes.BuildMPSummary
|
||||
statusbarclass = DukeStatusBar
|
||||
}
|
Loading…
Reference in a new issue