The base class for intermission status screens. Any status screen used by
MAPINFO
/GameInfo must be derived from this class.
Status screens have four stages:
STATCOUNT
, where the stats are counted and displayed.SHOWNEXTLOC
, where the next map is shown as "ENTERING (map name)" and in episodic maps, the world map.NOSTATE
, at the very end of this process, where the last frame is drawn and the intermission is exited.LEAVINGINTERMISSION
, which is used only to signify that all stages are done and the status screen has been exited.
These are provided as constants in StatusScreen
. The starting stage is STATCOUNT
.
class StatusScreen : Object abstract play
{
const NG_STATSY;
const SHOWNEXTLOCDELAY;
const SP_STATSX;
const SP_STATSY;
const SP_TIMEX;
const SP_TIMEY;
const TITLEY;
InterBackground BG;
WBPlayerStruct Plrs[MAXPLAYERS];
WBStartStruct Wbs;
int AccelerateStage;
int BCnt;
int Cnt;
int Cnt_Deaths[MAXPLAYERS];
int Cnt_Frags[MAXPLAYERS];
int Cnt_Items[MAXPLAYERS];
int Cnt_Kills[MAXPLAYERS];
int Cnt_Par;
int Cnt_Pause;
int Cnt_Secret[MAXPLAYERS];
int Cnt_Time;
int Cnt_Total_Time;
int CurState;
int DoFrags;
int Me;
int NG_State;
bool NoAutoStartMap;
bool PlayerReady[MAXPLAYERS];
int Player_Deaths[MAXPLAYERS];
bool Snl_PointerOn;
int SP_State;
float ShadowAlpha;
int Total_Deaths;
int Total_Frags;
PatchInfo Entering;
PatchInfo Finished;
PatchInfo MapName;
textureid Items;
textureid Kills;
textureid P_Secret;
textureid Par;
textureid Secret;
textureid Sucks;
textureid Timepic;
string LNameTexts[2];
int DrawCharPatch(Font fnt, int charcode, int x, int y, int translation = Font.CR_UNTRANSLATED, bool nomove = false);
void DrawEL();
int DrawLF();
int DrawName(int y, textureid tex, string levelname);
int DrawNum(Font fnt, int x, int y, int n, int digits, bool leadingzeros = true, int translation = Font.CR_UNTRANSLATED);
int DrawPatchText(int y, PatchInfo pinfo, string stringname);
void DrawPercent(Font fnt, int x, int y, int p, int b, bool show_total = true, int color = Font.CR_UNTRANSLATED);
void DrawTime(int x, int y, int t, bool no_sucks = false);
bool AutoSkip();
virtual void Drawer();
virtual void End();
virtual void Start(WBStartStruct wbs_);
virtual void StartMusic();
virtual void Ticker();
protected virtual void DrawNoState();
protected virtual void DrawShowNextLoc();
protected virtual void DrawStats();
protected virtual void InitNoState();
protected virtual void InitShowNextLoc();
protected virtual void InitStats();
protected virtual void UpdateNoState();
protected virtual void UpdateShowNextLoc();
protected virtual void UpdateStats();
protected void CheckForAccelerate();
protected int FragSum(int playernum);
static int, int, int GetPlayerWidths();
static color GetRowColor(PlayerInfo player, bool highlight);
static void GetSortedPlayers(in out array<int> sorted, bool teamplay);
static void PlaySound(sound snd);
}
TODO
TODO
TODO
TODO
TODO
TODO
The Y position (in 320x200 pixels) to draw the top of the "finished" and
"entering" texts. Used by DrawEL
and DrawLF
.
The InterBackground
object for this intermission, set by Start
with the
initial Wbs
object.
The value of Wbs.Plyr
when Start
was called. Usually not changed, so
essentially equivalent to Wbs.Plyr
.
The WBStartStruct
passed to this class via the Start
function.
Used to signify to the current stage that it should go quicker or be skipped entirely.
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
The current stage the intermission is in.
TODO
The value of Wbs.PNum
when Start
was called. Usually not changed, so
essentially equivalent to Wbs.PNum
.
TODO
TODO
Used in networked games to signify when each player is ready to continue to the
next map. Set by CheckForAccelerate
.
TODO
TODO
Used in single-player status screens during the STATCOUNT
stage for
indicating the current round of statistics to count up.
TODO
TODO
TODO
TODO
TODO
TODO
The "ITEMS" (default WIOSTI
) graphic.
The "KILLS" (default WIOSTK
) graphic.
The "SECRET" (default WISCRT2
) graphic.
The "PAR" (default WIPAR
) graphic.
The "SCRT" (default WIOSTS
) graphic.
The "SUCKS" (default WISUCKS
) graphic.
The "TIME" (default WITIME
) graphic.
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
Called by WI_Drawer
, which is called every frame when GameState
is
GS_INTERMISSION
.
Called when the intermission should end. Default behaviour is to set CurState
to LEAVINGINTERMISSION
and remove bots in death-match. Generally,
Level.WorldDone
should be called directly after this.
Called by WI_Start
after the WBStartStruct
is populated, sounds are stopped
and the screen blend is set to black. Sets up initial values and runs
InitStats
.
Called in the first tick by Ticker
to set the intermission music.
Called by WI_Ticker
, which is called every game tick when GameState
is
GS_INTERMISSION
.
Called by Drawer
when CurState
is NOSTATE
or any other non-state.
Called by Drawer
when CurState
is SHOWNEXTLOC
and, by default,
DrawNoState
after setting Snl_PointerOn
to true
.
Called by Drawer
directly after drawing the animated background when
CurState
is STATCOUNT
.
Called by UpdateShowNextLoc
to initiate the NOSTATE
stage.
Called by UpdateStats
to initiate the SHOWNEXTLOC
stage.
Called by Start
to initiate the STATCOUNT
stage.
Called by Ticker
when CurState
is NOSTATE
or any other non-state. Exits
the intermission by calling End
and Level.WorldDone
when appropriate.
Called by Ticker
when CurState
is SHOWNEXTLOC
. Runs InitNoState
when
appropriate and alternates Snl_PointerOn
.
Called by Ticker
when CurState
is STATCOUNT
. Runs InitShowNextLoc
when appropriate.
Updates the values of AccelerateStage
and PlayerReady
according to each
player's inputs.
Returns the number of frags player playernum
has accumulated against all
currently in-game players. This is different from WBPlayerStruct.FragCount
because it is counted dynamically, i.e. if a player leaves the count will be
changed. This is only useful for game modes where frags do not count as score.
TODO
TODO
TODO
Plays a UI sound at full volume using S_Sound
.