- summary screens, too.

This commit is contained in:
Christoph Oelckers 2021-05-02 12:28:32 +02:00
parent 4458f8c929
commit 15f9861633
4 changed files with 53 additions and 30 deletions

View file

@ -931,38 +931,58 @@ void FMapInfoParser::ParseCutsceneInfo()
break;
}
}
CheckEndOfFile("episode");
CheckEndOfFile("cutscenes");
}
for (i = 0; i < volumes.Size(); i++)
//==========================================================================
//
//
//
//==========================================================================
void FMapInfoParser::ParseGameInfo()
{
unsigned int i;
FString map;
FString pic;
FString name;
bool remove = false;
char key = 0;
int flags = 0;
ParseOpenBrace();
while (sc.GetString())
{
if (volumes[i].startmap.CompareNoCase(map) == 0)
if (sc.Compare("summaryscreen"))
{
ParseAssign();
sc.SetCMode(false);
sc.MustGetString();
sc.SetCMode(false);
globalCutscenes.SummaryScreen = sc.String;
}
else if (sc.Compare("mpsummaryscreen"))
{
ParseAssign();
sc.SetCMode(false);
sc.MustGetString();
sc.SetCMode(false);
globalCutscenes.MPSummaryScreen = sc.String;
}
else if (!ParseCloseBrace())
{
// Unknown
sc.ScriptMessage("Unknown property '%s' found in episode definition\n", sc.String);
SkipToNext();
}
else
{
break;
}
}
if (remove)
{
// If the remove property is given for an episode, remove it.
volumes.Delete(i);
}
else
{
// Only allocate a new entry if this doesn't replace an existing episode.
if (i >= volumes.Size())
{
i = volumes.Reserve(1);
}
auto epi = &volumes[i];
epi->startmap = map;
epi->name = name;
epi->shortcut = tolower(key);
epi->flags = flags;
epi->index = i;
}
CheckEndOfFile("cutscenes");
}
@ -1082,7 +1102,7 @@ void FMapInfoParser::ParseMapInfo (int lump, MapRecord &gamedefaults, MapRecord
}
else if (sc.Compare("gameinfo"))
{
// todo: global game propeties.
ParseGameInfo();
}
else
{

View file

@ -62,6 +62,7 @@ struct FMapInfoParser
void ParseMapDefinition(MapRecord &leveldef);
void ParseEpisodeInfo ();
void ParseCutsceneInfo();
void ParseGameInfo();
void ParseMapInfo (int lump, MapRecord &gamedefaults, MapRecord &defaultinfo);
void ParseOpenBrace();

View file

@ -1,4 +0,0 @@
definecutscene summary DukeCutscenes.BuildSPSummary
definecutscene mpsummary DukeCutscenes.BuildMPSummary

View file

@ -66,3 +66,9 @@ cutscenes
function = DukeCutscenes.BuildLoading
}
}
gameinfo
{
summaryscreen = DukeCutscenes.BuildSPSummary
mpsummaryscreen = DukeCutscenes.BuildMPSummary
}