mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- migrated Duke's cutscene definitions to the new RMAPINFO.txt.
This commit is contained in:
parent
dbd179be5c
commit
2d4e91615f
5 changed files with 68 additions and 60 deletions
|
@ -234,7 +234,7 @@ void FMapInfoParser::ParseCutscene(CutsceneDef& cdef)
|
|||
{
|
||||
sc.MustGetString();
|
||||
if (sc.Compare("video")) { ParseAssign(); sc.MustGetString(); cdef.video = sc.String; cdef.function = ""; }
|
||||
else if (sc.Compare("function")) { ParseAssign(); sc.MustGetString(); cdef.function = sc.String; cdef.video = ""; }
|
||||
else if (sc.Compare("function")) { ParseAssign(); sc.SetCMode(false); sc.MustGetString(); sc.SetCMode(true); cdef.function = sc.String; cdef.video = ""; }
|
||||
else if (sc.Compare("sound")) { ParseAssign(); sc.MustGetString(); cdef.soundName = sc.String; }
|
||||
else if (sc.Compare("soundid")) { ParseAssign(); sc.MustGetNumber(); cdef.soundID = sc.Number; }
|
||||
else if (sc.Compare("fps")) { ParseAssign(); sc.MustGetNumber(); cdef.framespersec = sc.Number; }
|
||||
|
@ -269,17 +269,14 @@ void FMapInfoParser::ParseCluster()
|
|||
}
|
||||
else if (sc.Compare("intro"))
|
||||
{
|
||||
ParseAssign();
|
||||
ParseCutscene(clusterinfo->intro);
|
||||
}
|
||||
else if (sc.Compare("outro"))
|
||||
{
|
||||
ParseAssign();
|
||||
ParseCutscene(clusterinfo->outro);
|
||||
}
|
||||
else if (sc.Compare("gameover"))
|
||||
{
|
||||
ParseAssign();
|
||||
ParseCutscene(clusterinfo->gameover);
|
||||
}
|
||||
else if (sc.Compare("interbackground"))
|
||||
|
@ -321,15 +318,14 @@ bool FMapInfoParser::CheckLegacyMapDefinition(FString& mapname)
|
|||
int indx = sc.Number;
|
||||
auto map = FindMapByIndexOnly(vol, indx);
|
||||
if (!map) I_Error("Map {%d, %d} does not exist", vol, indx);
|
||||
mapname = map->fileName; // we need the actual file name for further processing.
|
||||
mapname = map->labelName;
|
||||
}
|
||||
else
|
||||
{
|
||||
// SW only uses the level number
|
||||
auto map = FindMapByLevelNum(vol);
|
||||
if (!map) I_Error("Map {%d} does not exist", vol);
|
||||
mapname = map->fileName; // we need the actual file name for further processing.
|
||||
|
||||
mapname = map->labelName;
|
||||
}
|
||||
sc.MustGetStringName("}");
|
||||
return true;
|
||||
|
@ -444,13 +440,11 @@ DEFINE_MAP_OPTION(cdtrack, true)
|
|||
|
||||
DEFINE_MAP_OPTION(intro, true)
|
||||
{
|
||||
parse.ParseAssign();
|
||||
parse.ParseCutscene(info->intro);
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(outro, true)
|
||||
{
|
||||
parse.ParseAssign();
|
||||
parse.ParseCutscene(info->outro);
|
||||
}
|
||||
|
||||
|
@ -769,7 +763,7 @@ MapRecord *FMapInfoParser::ParseMapHeader(MapRecord &defaultinfo)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (map->name.IsEmpty()) I_Error("Missing level name");
|
||||
if (map->name.IsEmpty()) sc.ScriptError("Missing level name");
|
||||
sc.UnGet();
|
||||
}
|
||||
map->levelNumber = GetDefaultLevelNum(map->labelName);
|
||||
|
@ -992,6 +986,10 @@ void FMapInfoParser::ParseMapInfo (int lump, MapRecord &gamedefaults, MapRecord
|
|||
mapList.Clear();
|
||||
clusters.Clear();
|
||||
}
|
||||
else if (sc.Compare("cutscenes"))
|
||||
{
|
||||
//ParseCutsceneInfo();
|
||||
}
|
||||
else if (sc.Compare("gameinfo"))
|
||||
{
|
||||
// todo: global game propeties.
|
||||
|
|
|
@ -74,6 +74,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "v_draw.h"
|
||||
#include "gi.h"
|
||||
#include "vm.h"
|
||||
#include "g_mapinfo.h"
|
||||
|
||||
CVAR(Bool, autoloadlights, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, autoloadbrightmaps, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
@ -961,6 +962,7 @@ int RunGame()
|
|||
StartScreen->Progress();
|
||||
gi->app_init();
|
||||
StartScreen->Progress();
|
||||
G_ParseMapInfo();
|
||||
CreateStatusBar();
|
||||
SetDefaultMenuColors();
|
||||
M_Init();
|
||||
|
|
|
@ -5,54 +5,6 @@ definecutscene intro
|
|||
function DukeCutscenes.BuildIntro
|
||||
}
|
||||
|
||||
definecutscene episode 1
|
||||
{
|
||||
outro
|
||||
{
|
||||
function DukeCutscenes.BuildE1End
|
||||
}
|
||||
}
|
||||
|
||||
definecutscene episode 2
|
||||
{
|
||||
outro
|
||||
{
|
||||
function DukeCutscenes.BuildE2End
|
||||
}
|
||||
}
|
||||
|
||||
definecutscene episode 3
|
||||
{
|
||||
outro
|
||||
{
|
||||
function DukeCutscenes.BuildE3End
|
||||
}
|
||||
}
|
||||
|
||||
definecutscene episode 4
|
||||
{
|
||||
outro
|
||||
{
|
||||
function DukeCutscenes.BuildE4End
|
||||
}
|
||||
}
|
||||
|
||||
definecutscene episode 5
|
||||
{
|
||||
outro
|
||||
{
|
||||
function DukeCutscenes.BuildE5End
|
||||
}
|
||||
}
|
||||
|
||||
definecutscene map e4l1
|
||||
{
|
||||
intro
|
||||
{
|
||||
function DukeCutscenes.BuildE4Intro
|
||||
}
|
||||
}
|
||||
|
||||
definecutscene sharewareend
|
||||
{
|
||||
function DukeCutscenes.BuildSharewareEnd
|
||||
|
|
51
wadsrc/static/filter/duke/engine/rmapinfo.txt
Normal file
51
wadsrc/static/filter/duke/engine/rmapinfo.txt
Normal file
|
@ -0,0 +1,51 @@
|
|||
//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
|
||||
}
|
||||
}
|
||||
|
|
@ -579,8 +579,13 @@ class DukeLevelSummaryScreen : SummaryScreenBase
|
|||
{
|
||||
Super.Init(fadein | fadeout);
|
||||
SetParameters(m, s);
|
||||
int vol = level.cluster;
|
||||
String basetex = vol == 2? "BONUSSCREEN2" : "BONUSSCREEN";
|
||||
String basetex = level.InterBackground;
|
||||
if (basetex.length() == 0)
|
||||
{
|
||||
let cluster = level.GetCluster();
|
||||
if (cluster != null) basetex = cluster.InterBackground;
|
||||
}
|
||||
if (basetex.length() == 0) basetex = "BONUSSCREEN";
|
||||
texBg = TexMan.CheckForTexture(basetex);
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue