mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- switched over to the scripted intermission screens.
This commit is contained in:
parent
9ef88ea327
commit
622b4a6457
15 changed files with 193 additions and 1607 deletions
|
@ -971,6 +971,7 @@ void D_ErrorCleanup ()
|
|||
{
|
||||
menuactive = MENU_Off;
|
||||
}
|
||||
if (gamestate == GS_INTERMISSION) gamestate = GS_DEMOSCREEN;
|
||||
insave = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,9 @@ DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenEnteringFont)
|
|||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, mStatscreenFinishedFont)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, gibfactor)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, intermissioncounter)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_single)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_coop)
|
||||
DEFINE_FIELD_X(GameInfoStruct, gameinfo_t, statusscreen_dm)
|
||||
|
||||
|
||||
const char *GameNames[17] =
|
||||
|
@ -393,6 +396,9 @@ void FMapInfoParser::ParseGameInfo()
|
|||
GAMEINFOKEY_BOOL(norandomplayerclass, "norandomplayerclass")
|
||||
GAMEINFOKEY_BOOL(forcekillscripts, "forcekillscripts") // [JM] Force kill scripts on thing death. (MF7_NOKILLSCRIPTS overrides.)
|
||||
GAMEINFOKEY_STRING(Dialogue, "dialogue")
|
||||
GAMEINFOKEY_STRING(statusscreen_single, "statscreen_single")
|
||||
GAMEINFOKEY_STRING(statusscreen_coop, "statscreen_coop")
|
||||
GAMEINFOKEY_STRING(statusscreen_dm, "statscreen_dm")
|
||||
|
||||
else
|
||||
{
|
||||
|
|
3
src/gi.h
3
src/gi.h
|
@ -181,6 +181,9 @@ struct gameinfo_t
|
|||
FGIFont mStatscreenEnteringFont;
|
||||
bool norandomplayerclass;
|
||||
bool forcekillscripts;
|
||||
FName statusscreen_single;
|
||||
FName statusscreen_coop;
|
||||
FName statusscreen_dm;
|
||||
|
||||
const char *GetFinalePage(unsigned int num) const;
|
||||
};
|
||||
|
|
|
@ -645,6 +645,9 @@ xx(ceilingglowheight)
|
|||
xx(fogdensity)
|
||||
xx(Static)
|
||||
xx(Staticconst)
|
||||
xx(DeathmatchStatusScreen)
|
||||
xx(CoopStatusScreen)
|
||||
xx(RavenStatusScreen)
|
||||
|
||||
// USDF keywords
|
||||
xx(Amount)
|
||||
|
|
|
@ -2577,7 +2577,7 @@ EColorRange V_FindFontColor (FName name)
|
|||
|
||||
DEFINE_ACTION_FUNCTION(FFont, FindFontColor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FFont);
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_NAME(code);
|
||||
ACTION_RETURN_INT((int)V_FindFontColor(code));
|
||||
}
|
||||
|
|
1655
src/wi_stuff.cpp
1655
src/wi_stuff.cpp
File diff suppressed because it is too large
Load diff
|
@ -65,6 +65,9 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedpatch = "WIF"
|
||||
statscreen_enteringpatch = "WIENTER"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "DoomStatusScreen"
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -65,6 +65,9 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedpatch = "WIF"
|
||||
statscreen_enteringpatch = "WIENTER"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "DoomStatusScreen"
|
||||
}
|
||||
|
||||
spawnnums
|
||||
|
|
|
@ -63,6 +63,9 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedfont = "SmallFont"
|
||||
statscreen_enteringfont = "SmallFont"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -61,6 +61,9 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedfont = "SmallFont"
|
||||
statscreen_enteringfont = "SmallFont"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -63,6 +63,9 @@ gameinfo
|
|||
statscreen_mapnamefont = "BigFont"
|
||||
statscreen_finishedfont = "BigFont", "white"
|
||||
statscreen_enteringfont = "BigFont", "white"
|
||||
statscreen_coop = "CoopStatusScreen"
|
||||
statscreen_dm = "DeathmatchStatusScreen"
|
||||
statscreen_single = "RavenStatusScreen"
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -37,7 +37,7 @@ struct PatchInfo play version("2.4")
|
|||
|
||||
|
||||
// Will be made a class later, but for now needs to mirror the internal version.
|
||||
class StatusScreen native play version("2.4")
|
||||
class StatusScreen abstract play version("2.4")
|
||||
{
|
||||
enum EValues
|
||||
{
|
||||
|
@ -75,55 +75,50 @@ class StatusScreen native play version("2.4")
|
|||
|
||||
const SHOWNEXTLOCDELAY = 4; // in seconds
|
||||
|
||||
InterBackground bg;
|
||||
native int acceleratestage; // used to accelerate or skip a stage
|
||||
native bool playerready[MAXPLAYERS];
|
||||
native int me; // wbs.pnum
|
||||
native int bcnt;
|
||||
native int CurState; // specifies current CurState
|
||||
native wbstartstruct wbs; // contains information passed into intermission
|
||||
native wbplayerstruct Plrs[MAXPLAYERS]; // wbs.plyr[]
|
||||
native int cnt; // used for general timing
|
||||
native int cnt_kills[MAXPLAYERS];
|
||||
native int cnt_items[MAXPLAYERS];
|
||||
native int cnt_secret[MAXPLAYERS];
|
||||
native int cnt_frags[MAXPLAYERS];
|
||||
native int cnt_deaths[MAXPLAYERS];
|
||||
native int cnt_time;
|
||||
native int cnt_total_time;
|
||||
native int cnt_par;
|
||||
native int cnt_pause;
|
||||
native int total_frags;
|
||||
native int total_deaths;
|
||||
native bool noautostartmap;
|
||||
native int dofrags;
|
||||
native int ng_state;
|
||||
native float shadowalpha;
|
||||
InterBackground bg;
|
||||
int acceleratestage; // used to accelerate or skip a stage
|
||||
bool playerready[MAXPLAYERS];
|
||||
int me; // wbs.pnum
|
||||
int bcnt;
|
||||
int CurState; // specifies current CurState
|
||||
wbstartstruct wbs; // contains information passed into intermission
|
||||
wbplayerstruct Plrs[MAXPLAYERS]; // wbs.plyr[]
|
||||
int cnt; // used for general timing
|
||||
int cnt_kills[MAXPLAYERS];
|
||||
int cnt_items[MAXPLAYERS];
|
||||
int cnt_secret[MAXPLAYERS];
|
||||
int cnt_frags[MAXPLAYERS];
|
||||
int cnt_deaths[MAXPLAYERS];
|
||||
int cnt_time;
|
||||
int cnt_total_time;
|
||||
int cnt_par;
|
||||
int cnt_pause;
|
||||
int total_frags;
|
||||
int total_deaths;
|
||||
bool noautostartmap;
|
||||
int dofrags;
|
||||
int ng_state;
|
||||
float shadowalpha;
|
||||
|
||||
//
|
||||
// GRAPHICS
|
||||
//
|
||||
PatchInfo mapname;
|
||||
PatchInfo finished;
|
||||
PatchInfo entering;
|
||||
|
||||
native PatchInfo mapname;
|
||||
native PatchInfo finished;
|
||||
native PatchInfo entering;
|
||||
|
||||
native TextureID p_secret;
|
||||
native TextureID kills;
|
||||
native TextureID secret;
|
||||
native TextureID items;
|
||||
native TextureID timepic;
|
||||
native TextureID par;
|
||||
native TextureID sucks;
|
||||
TextureID p_secret;
|
||||
TextureID kills;
|
||||
TextureID secret;
|
||||
TextureID items;
|
||||
TextureID timepic;
|
||||
TextureID par;
|
||||
TextureID sucks;
|
||||
|
||||
// [RH] Info to dynamically generate the level name graphics
|
||||
native String lnametexts[2];
|
||||
String lnametexts[2];
|
||||
|
||||
bool snl_pointeron;
|
||||
|
||||
native bool snl_pointeron;
|
||||
|
||||
native int player_deaths[MAXPLAYERS];
|
||||
native int sp_state;
|
||||
int player_deaths[MAXPLAYERS];
|
||||
int sp_state;
|
||||
|
||||
|
||||
//====================================================================
|
||||
|
@ -660,7 +655,7 @@ class StatusScreen native play version("2.4")
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
//
|
||||
|
@ -672,6 +667,8 @@ class StatusScreen native play version("2.4")
|
|||
switch (CurState)
|
||||
{
|
||||
case StatCount:
|
||||
// draw animated background
|
||||
bg.drawBackground(CurState, false, false);
|
||||
drawStats();
|
||||
break;
|
||||
|
||||
|
@ -717,10 +714,10 @@ class StatusScreen native play version("2.4")
|
|||
|
||||
// Use the local level structure which can be overridden by hubs
|
||||
lnametexts[0] = level.LevelName;
|
||||
lnametexts[1] = wbs.nextname;
|
||||
lnametexts[1] = wbstartstruct.nextname;
|
||||
|
||||
bg = InterBackground.Create(wbs);
|
||||
|
||||
bg.LoadBackground(false);
|
||||
initStats();
|
||||
}
|
||||
|
||||
|
@ -729,7 +726,7 @@ class StatusScreen native play version("2.4")
|
|||
protected virtual void updateStats() {}
|
||||
protected virtual void drawStats() {}
|
||||
|
||||
native int, int, int GetPlayerWidths();
|
||||
native Color GetRowColor(PlayerInfo player, bool highlight);
|
||||
native void GetSortedPlayers(in out Array<int> sorted, bool teamplay);
|
||||
native static int, int, int GetPlayerWidths();
|
||||
native static Color GetRowColor(PlayerInfo player, bool highlight);
|
||||
native static void GetSortedPlayers(in out Array<int> sorted, bool teamplay);
|
||||
}
|
||||
|
|
|
@ -215,19 +215,14 @@ class CoopStatusScreen : StatusScreen
|
|||
String text_bonus, text_secret, text_kills;
|
||||
TextureID readyico = TexMan.CheckForTexture("READYICO", TexMan.Type_MiscPatch);
|
||||
|
||||
// draw animated background
|
||||
bg.drawBackground(CurState, false, false);
|
||||
|
||||
y = drawLF();
|
||||
|
||||
[maxnamewidth, maxscorewidth, maxiconheight] = GetPlayerWidths();
|
||||
// Use the readyico height if it's bigger.
|
||||
Vector2 readysize = TexMan.GetScaledSize(readyico);
|
||||
Vector2 readyoffset = TexMan.GetScaledOffset(readyico);
|
||||
if (readysize.Y > maxiconheight)
|
||||
{
|
||||
maxiconheight = height;
|
||||
}
|
||||
height = readysize.Y - readyoffset.Y;
|
||||
maxiconheight = MAX(height, maxiconheight);
|
||||
height = SmallFont.GetHeight() * CleanYfac;
|
||||
lineheight = MAX(height, maxiconheight * CleanYfac);
|
||||
ypadding = (lineheight - height + 1) / 2;
|
||||
|
|
|
@ -152,9 +152,6 @@ class DeathmatchStatusScreen : StatusScreen
|
|||
String text_deaths, text_frags;
|
||||
TextureID readyico = TexMan.CheckForTexture("READYICO", TexMan.Type_MiscPatch);
|
||||
|
||||
// draw animated background
|
||||
bg.drawBackground(CurState, false, false);
|
||||
|
||||
y = drawLF();
|
||||
|
||||
[maxnamewidth, maxscorewidth, maxiconheight] = GetPlayerWidths();
|
||||
|
|
|
@ -135,9 +135,6 @@ class DoomStatusScreen : StatusScreen
|
|||
// line height
|
||||
int lh = IntermissionFont.GetHeight() * 3 / 2;
|
||||
|
||||
// draw animated background
|
||||
bg.drawBackground(CurState, false, false);
|
||||
|
||||
drawLF();
|
||||
|
||||
screen.DrawTexture (Kills, true, SP_STATSX, SP_STATSY, DTA_Clean, true);
|
||||
|
@ -171,9 +168,6 @@ class RavenStatusScreen : DoomStatusScreen
|
|||
// line height
|
||||
int lh = IntermissionFont.GetHeight() * 3 / 2;
|
||||
|
||||
// draw animated background
|
||||
bg.drawBackground(CurState, false, false);
|
||||
|
||||
drawLF();
|
||||
|
||||
screen.DrawText (BigFont, Font.CR_UNTRANSLATED, 50, 65, Stringtable.Localize("$TXT_IMKILLS"), DTA_Clean, true, DTA_Shadow, true);
|
||||
|
|
Loading…
Reference in a new issue