diff --git a/source/core/g_mapinfo.cpp b/source/core/g_mapinfo.cpp index 17779349c..1f1712454 100644 --- a/source/core/g_mapinfo.cpp +++ b/source/core/g_mapinfo.cpp @@ -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 diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 76f0e3d20..036217f20 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -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(stbarclass->CreateNew()); StatusBar->SetSize(0, 320, 200); InitStatusBar(); + GC::AddMarkerFunc([]() { GC::Mark(StatusBar); }); } diff --git a/source/core/mapinfo.h b/source/core/mapinfo.h index 1bbefcfa2..dc4a0a5cd 100644 --- a/source/core/mapinfo.h +++ b/source/core/mapinfo.h @@ -104,6 +104,7 @@ struct GlobalCutscenes CutsceneDef LoadingScreen; FString MPSummaryScreen; FString SummaryScreen; + FString StatusBarClass; }; struct ClusterDef diff --git a/wadsrc/static/filter/blood/engine/rmapinfo.txt b/wadsrc/static/filter/blood/engine/rmapinfo.txt index f05bb05c4..482dbc52c 100644 --- a/wadsrc/static/filter/blood/engine/rmapinfo.txt +++ b/wadsrc/static/filter/blood/engine/rmapinfo.txt @@ -18,4 +18,5 @@ gameinfo { summaryscreen = BloodCutscenes.BuildSPSummary mpsummaryscreen = BloodCutscenes.BuildMPSummary + statusbarclass = BloodStatusBar } diff --git a/wadsrc/static/filter/duke/engine/rmapinfo.txt b/wadsrc/static/filter/duke/engine/rmapinfo.txt index 4462a9795..f2259245b 100644 --- a/wadsrc/static/filter/duke/engine/rmapinfo.txt +++ b/wadsrc/static/filter/duke/engine/rmapinfo.txt @@ -71,4 +71,5 @@ gameinfo { summaryscreen = DukeCutscenes.BuildSPSummary mpsummaryscreen = DukeCutscenes.BuildMPSummary + statusbarclass = DukeStatusBar } \ No newline at end of file diff --git a/wadsrc/static/filter/exhumed/engine/rmapinfo.txt b/wadsrc/static/filter/exhumed/engine/rmapinfo.txt index 01ac9c0ac..6d5dcad9e 100644 --- a/wadsrc/static/filter/exhumed/engine/rmapinfo.txt +++ b/wadsrc/static/filter/exhumed/engine/rmapinfo.txt @@ -300,4 +300,5 @@ cutscenes gameinfo { summaryscreen = ExhumedCutscenes.BuildMap + statusbarclass = ExhumedStatusBar } diff --git a/wadsrc/static/filter/nam/engine/rmapinfo.txt b/wadsrc/static/filter/nam/engine/rmapinfo.txt new file mode 100644 index 000000000..f2259245b --- /dev/null +++ b/wadsrc/static/filter/nam/engine/rmapinfo.txt @@ -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 +} \ No newline at end of file diff --git a/wadsrc/static/filter/redneck.redneck/engine/rmapinfo.txt b/wadsrc/static/filter/redneck.redneck/engine/rmapinfo.txt index dcbd6a8d9..8d9e1d751 100644 --- a/wadsrc/static/filter/redneck.redneck/engine/rmapinfo.txt +++ b/wadsrc/static/filter/redneck.redneck/engine/rmapinfo.txt @@ -121,4 +121,5 @@ gameinfo { summaryscreen = RRCutscenes.BuildSPSummary mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's + statusbarclass = RedneckStatusBar } diff --git a/wadsrc/static/filter/redneck.ridesagain/engine/rmapinfo.txt b/wadsrc/static/filter/redneck.ridesagain/engine/rmapinfo.txt index bd8cda805..d6ca9561a 100644 --- a/wadsrc/static/filter/redneck.ridesagain/engine/rmapinfo.txt +++ b/wadsrc/static/filter/redneck.ridesagain/engine/rmapinfo.txt @@ -117,4 +117,5 @@ gameinfo { summaryscreen = RRCutscenes.BuildSPSummary mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's + statusbarclass = RedneckStatusBar } diff --git a/wadsrc/static/filter/redneck.route66/engine/rmapinfo.txt b/wadsrc/static/filter/redneck.route66/engine/rmapinfo.txt index 59246e710..79104d930 100644 --- a/wadsrc/static/filter/redneck.route66/engine/rmapinfo.txt +++ b/wadsrc/static/filter/redneck.route66/engine/rmapinfo.txt @@ -106,4 +106,5 @@ gameinfo { summaryscreen = RRCutscenes.BuildSPSummary mpsummaryscreen = DukeCutscenes.BuildMPSummary // identical with Duke's + statusbarclass = RedneckStatusBar } diff --git a/wadsrc/static/filter/shadowwarrior/engine/rmapinfo.txt b/wadsrc/static/filter/shadowwarrior/engine/rmapinfo.txt index 877cda926..72ef780bc 100644 --- a/wadsrc/static/filter/shadowwarrior/engine/rmapinfo.txt +++ b/wadsrc/static/filter/shadowwarrior/engine/rmapinfo.txt @@ -59,5 +59,6 @@ gameinfo { summaryscreen = SWCutscenes.BuildSPSummary mpsummaryscreen = SWCutscenes.BuildMPSummary + statusbarclass = SWStatusBar } diff --git a/wadsrc/static/filter/ww2gi/engine/rmapinfo.txt b/wadsrc/static/filter/ww2gi/engine/rmapinfo.txt new file mode 100644 index 000000000..f2259245b --- /dev/null +++ b/wadsrc/static/filter/ww2gi/engine/rmapinfo.txt @@ -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 +} \ No newline at end of file