allow cutscenes in intermissions
This commit is contained in:
parent
74a04474e1
commit
206c2291d9
6 changed files with 143 additions and 16 deletions
|
|
@ -194,6 +194,46 @@ bool FIntermissionAction::ParseKey(FScanner &sc)
|
|||
else return false;
|
||||
}
|
||||
|
||||
bool FIntermissionAction::Parse(FMapInfoParser &m, FScanner &sc)
|
||||
{
|
||||
sc.MustGetToken('{');
|
||||
while (!sc.CheckToken('}'))
|
||||
{
|
||||
bool success = false;
|
||||
if (!sc.CheckToken(TK_Sound))
|
||||
{
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
}
|
||||
|
||||
success = ParseKey(sc);
|
||||
if (!success)
|
||||
{
|
||||
sc.ScriptMessage("Unknown key name '%s'\n", sc.String);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FIntermissionActionCutscene
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FIntermissionActionCutscene::FIntermissionActionCutscene()
|
||||
{
|
||||
scn = {};
|
||||
mSize = sizeof(FIntermissionActionCutscene);
|
||||
mClass = RUNTIME_CLASS(DIntermissionScreenCutscene);
|
||||
}
|
||||
|
||||
bool FIntermissionActionCutscene::Parse(FMapInfoParser &m, FScanner &sc)
|
||||
{
|
||||
m.ParseCutscene(scn, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FIntermissionActionFader
|
||||
|
|
@ -527,6 +567,10 @@ void FMapInfoParser::ParseIntermissionAction(FIntermissionDescriptor *desc)
|
|||
{
|
||||
ac = new FIntermissionActionCast;
|
||||
}
|
||||
else if (sc.Compare("cutscene"))
|
||||
{
|
||||
ac = new FIntermissionActionCutscene;
|
||||
}
|
||||
else if (sc.Compare("Fader"))
|
||||
{
|
||||
ac = new FIntermissionActionFader;
|
||||
|
|
@ -556,25 +600,17 @@ void FMapInfoParser::ParseIntermissionAction(FIntermissionDescriptor *desc)
|
|||
sc.ScriptMessage("Unknown intermission type '%s'", sc.String);
|
||||
}
|
||||
|
||||
sc.MustGetToken('{');
|
||||
while (!sc.CheckToken('}'))
|
||||
if(ac)
|
||||
{
|
||||
bool success = false;
|
||||
if (!sc.CheckToken(TK_Sound))
|
||||
if(!ac->Parse(*this, sc))
|
||||
{
|
||||
sc.MustGetToken(TK_Identifier);
|
||||
SkipToNext();
|
||||
}
|
||||
if (ac != NULL)
|
||||
else
|
||||
{
|
||||
success = ac->ParseKey(sc);
|
||||
if (!success)
|
||||
{
|
||||
sc.ScriptMessage("Unknown key name '%s'\n", sc.String);
|
||||
}
|
||||
desc->mActions.Push(ac);
|
||||
}
|
||||
if (!success) SkipToNext();
|
||||
}
|
||||
if (ac != NULL) desc->mActions.Push(ac);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue