mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-12 07:14:03 +00:00
- create intermission descriptor objects from EndGame definitions.
SVN r2878 (finale)
This commit is contained in:
parent
a9632c2694
commit
287741c18b
2 changed files with 57 additions and 11 deletions
|
@ -80,6 +80,7 @@ struct FIntermissionAction
|
||||||
FString mPalette;
|
FString mPalette;
|
||||||
FString mSound;
|
FString mSound;
|
||||||
bool mFlatfill;
|
bool mFlatfill;
|
||||||
|
bool mMusicLooping;
|
||||||
TArray<FIntermissionPatch> mOverlays;
|
TArray<FIntermissionPatch> mOverlays;
|
||||||
FName mLink;
|
FName mLink;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,14 @@
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void ReplaceIntermission(FName intname,FIntermissionDescriptor *desc)
|
||||||
|
{
|
||||||
|
FIntermissionDescriptor ** pDesc = IntermissionDescriptors.CheckKey(intname);
|
||||||
|
if (pDesc != NULL && *pDesc != NULL) delete *pDesc;
|
||||||
|
IntermissionDescriptors[intname] = desc;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// FIntermissionAction
|
// FIntermissionAction
|
||||||
|
@ -54,6 +62,7 @@ FIntermissionAction::FIntermissionAction()
|
||||||
mCdTrack =
|
mCdTrack =
|
||||||
mDuration = 0;
|
mDuration = 0;
|
||||||
mFlatfill = false;
|
mFlatfill = false;
|
||||||
|
mMusicLooping = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FIntermissionAction::ParseKey(FScanner &sc)
|
bool FIntermissionAction::ParseKey(FScanner &sc)
|
||||||
|
@ -490,13 +499,9 @@ void FMapInfoParser::ParseIntermission()
|
||||||
{
|
{
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
FName intname = sc.String;
|
FName intname = sc.String;
|
||||||
|
|
||||||
FIntermissionDescriptor ** pDesc = IntermissionDescriptors.CheckKey(intname);
|
|
||||||
if (pDesc != NULL && *pDesc != NULL) delete *pDesc;
|
|
||||||
|
|
||||||
FIntermissionDescriptor *desc = new FIntermissionDescriptor();
|
FIntermissionDescriptor *desc = new FIntermissionDescriptor();
|
||||||
IntermissionDescriptors[intname] = desc;
|
|
||||||
|
|
||||||
|
ReplaceIntermission(intname, desc);
|
||||||
sc.MustGetToken('{');
|
sc.MustGetToken('{');
|
||||||
while (!sc.CheckToken('}'))
|
while (!sc.CheckToken('}'))
|
||||||
{
|
{
|
||||||
|
@ -598,16 +603,53 @@ FName FMapInfoParser::ParseEndGame()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FIntermissionDescriptor *desc = new FIntermissionDescriptor;
|
||||||
|
FIntermissionAction *action;
|
||||||
|
|
||||||
switch (newSeq.EndType)
|
switch (newSeq.EndType)
|
||||||
{
|
{
|
||||||
case END_Pic:
|
case END_Pic:
|
||||||
|
action = new FIntermissionAction;
|
||||||
|
break;
|
||||||
|
|
||||||
case END_Bunny:
|
case END_Bunny:
|
||||||
case END_Cast:
|
{
|
||||||
case END_Demon:
|
FIntermissionActionScroller *bunny = new FIntermissionActionScroller;
|
||||||
;
|
bunny->mSecondPic = newSeq.PicName2;
|
||||||
|
bunny->mScrollDir = SCROLL_Right;
|
||||||
|
bunny->mScrollDelay = 230;
|
||||||
|
bunny->mScrollTime = 640;
|
||||||
|
bunny->mDuration = 1130;
|
||||||
|
action = bunny;
|
||||||
|
if (newSeq.PlayTheEnd) action->mLink = "TheEnd";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case END_Demon:
|
||||||
|
{
|
||||||
|
FIntermissionActionScroller *demon = new FIntermissionActionScroller;
|
||||||
|
demon->mSecondPic = newSeq.PicName2;
|
||||||
|
demon->mScrollDir = SCROLL_Up;
|
||||||
|
demon->mScrollDelay = 70;
|
||||||
|
demon->mScrollTime = 600;
|
||||||
|
action = demon;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case END_Cast:
|
||||||
|
action = new FIntermissionAction;
|
||||||
|
action->mDuration = 1;
|
||||||
|
action->mLink = "Doom2Cast";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
action->mBackground = newSeq.PicName;
|
||||||
|
action->mMusic = newSeq.Music;
|
||||||
|
action->mMusicLooping = newSeq.MusicLooping;
|
||||||
|
|
||||||
FString seq;
|
FString seq;
|
||||||
seq.Format("EndSequence_%d_", generated++);
|
seq.Format("@EndSequence_%d_", generated++);
|
||||||
|
ReplaceIntermission(seq, desc);
|
||||||
return FName(seq);
|
return FName(seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -650,8 +692,11 @@ FName FMapInfoParser::CheckEndSequence()
|
||||||
ParseComma();
|
ParseComma();
|
||||||
sc.MustGetString ();
|
sc.MustGetString ();
|
||||||
FString seqname;
|
FString seqname;
|
||||||
seqname << "EndPic_" << sc.String;
|
seqname << "@EndPic_" << sc.String;
|
||||||
// create sequence here
|
FIntermissionDescriptor *desc = new FIntermissionDescriptor;
|
||||||
|
FIntermissionAction *action = new FIntermissionAction;
|
||||||
|
action->mBackground = sc.String;
|
||||||
|
ReplaceIntermission(seqname, desc);
|
||||||
return FName(seqname);
|
return FName(seqname);
|
||||||
}
|
}
|
||||||
else if (sc.Compare("endbunny"))
|
else if (sc.Compare("endbunny"))
|
||||||
|
|
Loading…
Reference in a new issue