mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- migrated the global cutscenes to RMAPINFO as well.
This commit is contained in:
parent
2d4e91615f
commit
4458f8c929
5 changed files with 110 additions and 19 deletions
|
@ -876,6 +876,96 @@ void FMapInfoParser::ParseEpisodeInfo ()
|
|||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FMapInfoParser::ParseCutsceneInfo()
|
||||
{
|
||||
unsigned int i;
|
||||
FString map;
|
||||
FString pic;
|
||||
FString name;
|
||||
bool remove = false;
|
||||
char key = 0;
|
||||
int flags = 0;
|
||||
|
||||
ParseOpenBrace();
|
||||
|
||||
while (sc.GetString())
|
||||
{
|
||||
if (sc.Compare("intro"))
|
||||
{
|
||||
ParseCutscene(globalCutscenes.Intro);
|
||||
}
|
||||
else if (sc.Compare("defaultmapintro"))
|
||||
{
|
||||
ParseCutscene(globalCutscenes.DefaultMapIntro);
|
||||
}
|
||||
else if (sc.Compare("defaultmapoutro"))
|
||||
{
|
||||
ParseCutscene(globalCutscenes.DefaultMapOutro);
|
||||
}
|
||||
else if (sc.Compare("defaultgameover"))
|
||||
{
|
||||
ParseCutscene(globalCutscenes.DefaultGameover);
|
||||
}
|
||||
else if (sc.Compare("sharewareend"))
|
||||
{
|
||||
ParseCutscene(globalCutscenes.SharewareEnd);
|
||||
}
|
||||
else if (sc.Compare("loadscreen"))
|
||||
{
|
||||
ParseCutscene(globalCutscenes.LoadingScreen);
|
||||
}
|
||||
else if (!ParseCloseBrace())
|
||||
{
|
||||
// Unknown
|
||||
sc.ScriptMessage("Unknown property '%s' found in episode definition\n", sc.String);
|
||||
SkipToNext();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
CheckEndOfFile("episode");
|
||||
|
||||
|
||||
for (i = 0; i < volumes.Size(); i++)
|
||||
{
|
||||
if (volumes[i].startmap.CompareNoCase(map) == 0)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// SetLevelNum
|
||||
|
@ -988,7 +1078,7 @@ void FMapInfoParser::ParseMapInfo (int lump, MapRecord &gamedefaults, MapRecord
|
|||
}
|
||||
else if (sc.Compare("cutscenes"))
|
||||
{
|
||||
//ParseCutsceneInfo();
|
||||
ParseCutsceneInfo();
|
||||
}
|
||||
else if (sc.Compare("gameinfo"))
|
||||
{
|
||||
|
|
|
@ -53,7 +53,6 @@ struct FMapInfoParser
|
|||
bool CheckLegacyMapDefinition(FString& mapname);
|
||||
bool ParseLookupName(FString &dest);
|
||||
void ParseMusic(FString &name, int &order);
|
||||
//void ParseLumpOrTextureName(char *name);
|
||||
void ParseLumpOrTextureName(FString &name);
|
||||
|
||||
void ParseCutscene(CutsceneDef& cdef);
|
||||
|
@ -62,7 +61,7 @@ struct FMapInfoParser
|
|||
MapRecord *ParseMapHeader(MapRecord &defaultinfo);
|
||||
void ParseMapDefinition(MapRecord &leveldef);
|
||||
void ParseEpisodeInfo ();
|
||||
void ParseSkill ();
|
||||
void ParseCutsceneInfo();
|
||||
void ParseMapInfo (int lump, MapRecord &gamedefaults, MapRecord &defaultinfo);
|
||||
|
||||
void ParseOpenBrace();
|
||||
|
|
|
@ -85,6 +85,7 @@ struct GlobalCutscenes
|
|||
CutsceneDef Intro;
|
||||
CutsceneDef DefaultMapIntro;
|
||||
CutsceneDef DefaultMapOutro;
|
||||
CutsceneDef DefaultGameover;
|
||||
CutsceneDef SharewareEnd;
|
||||
CutsceneDef LoadingScreen;
|
||||
FString MPSummaryScreen;
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
// Cutscene definitions for Duke
|
||||
|
||||
definecutscene intro
|
||||
{
|
||||
function DukeCutscenes.BuildIntro
|
||||
}
|
||||
|
||||
definecutscene sharewareend
|
||||
{
|
||||
function DukeCutscenes.BuildSharewareEnd
|
||||
}
|
||||
|
||||
definecutscene loading
|
||||
{
|
||||
function DukeCutscenes.BuildLoading
|
||||
}
|
||||
|
||||
definecutscene summary DukeCutscenes.BuildSPSummary
|
||||
definecutscene mpsummary DukeCutscenes.BuildMPSummary
|
||||
|
|
|
@ -49,3 +49,20 @@ map { 4, 1 }
|
|||
}
|
||||
}
|
||||
|
||||
cutscenes
|
||||
{
|
||||
intro
|
||||
{
|
||||
function = DukeCutscenes.BuildIntro
|
||||
}
|
||||
|
||||
sharewareend
|
||||
{
|
||||
function = DukeCutscenes.BuildSharewareEnd
|
||||
}
|
||||
|
||||
loadscreen
|
||||
{
|
||||
function = DukeCutscenes.BuildLoading
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue