mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
Remove unused/useless st_stuff.c/h
code` (#1075)
This commit is contained in:
parent
bf1c0694e6
commit
38d6d21751
128
src/st_stuff.c
128
src/st_stuff.c
@ -186,24 +186,9 @@ static player_t *plyr;
|
||||
// ST_Start() has just been called
|
||||
static boolean st_firsttime;
|
||||
|
||||
// used to execute ST_Init() only once
|
||||
static int veryfirsttime = 1;
|
||||
|
||||
// lump number for PLAYPAL
|
||||
static int lu_palette;
|
||||
|
||||
// used for timing
|
||||
static unsigned int st_clock;
|
||||
|
||||
// used for making messages go away
|
||||
static int st_msgcounter=0;
|
||||
|
||||
// used when in chat
|
||||
static st_chatstateenum_t st_chatstate;
|
||||
|
||||
// whether in automap or first-person
|
||||
static st_stateenum_t st_gamestate;
|
||||
|
||||
// whether left-side main status bar is active
|
||||
static boolean st_statusbaron;
|
||||
|
||||
@ -211,15 +196,6 @@ static boolean st_statusbaron;
|
||||
boolean st_crispyhud;
|
||||
static boolean st_classicstatusbar;
|
||||
|
||||
// whether status bar chat is active
|
||||
static boolean st_chat;
|
||||
|
||||
// value of st_chat before message popped up
|
||||
static boolean st_oldchat;
|
||||
|
||||
// whether chat window has the cursor on
|
||||
static boolean st_cursoron;
|
||||
|
||||
// !deathmatch
|
||||
static boolean st_notdeathmatch;
|
||||
|
||||
@ -487,17 +463,10 @@ boolean ST_Responder(event_t *ev)
|
||||
// Filter automap on/off.
|
||||
if (ev->type == ev_keyup && (ev->data1 & 0xffff0000) == AM_MSGHEADER)
|
||||
{
|
||||
switch(ev->data1)
|
||||
{
|
||||
case AM_MSGENTERED:
|
||||
st_gamestate = AutomapState;
|
||||
st_firsttime = true;
|
||||
break;
|
||||
|
||||
case AM_MSGEXITED:
|
||||
st_gamestate = FirstPersonState;
|
||||
break;
|
||||
}
|
||||
if (ev->data1 == AM_MSGENTERED)
|
||||
{
|
||||
st_firsttime = true;
|
||||
}
|
||||
}
|
||||
else // if a user keypress...
|
||||
return M_CheatResponder(ev); // Try cheat responder in m_cheat.c
|
||||
@ -775,10 +744,6 @@ void ST_updateWidgets(void)
|
||||
st_fragscount -= plyr->frags[i];
|
||||
}
|
||||
|
||||
// get rid of chat window if up because of message
|
||||
if (!--st_msgcounter)
|
||||
st_chat = st_oldchat;
|
||||
|
||||
}
|
||||
|
||||
// [Alaux]
|
||||
@ -813,7 +778,6 @@ void ST_Ticker(void)
|
||||
st_health = SmoothCount(st_health, plyr->health);
|
||||
st_armor = SmoothCount(st_armor, plyr->armorpoints);
|
||||
|
||||
st_clock++;
|
||||
st_randomnumber = M_Random();
|
||||
ST_updateWidgets();
|
||||
st_oldhealth = plyr->health;
|
||||
@ -993,25 +957,6 @@ void ST_drawWidgets(void)
|
||||
|
||||
}
|
||||
|
||||
void ST_doRefresh(void)
|
||||
{
|
||||
|
||||
st_firsttime = false;
|
||||
|
||||
// draw status bar background to off-screen buff
|
||||
ST_refreshBackground(false);
|
||||
|
||||
// and refresh all widgets
|
||||
ST_drawWidgets();
|
||||
|
||||
}
|
||||
|
||||
void ST_diffDraw(void)
|
||||
{
|
||||
// update all widgets
|
||||
ST_drawWidgets();
|
||||
}
|
||||
|
||||
static void ST_MoveHud (void);
|
||||
|
||||
void ST_Drawer(boolean fullscreen, boolean refresh)
|
||||
@ -1028,10 +973,15 @@ void ST_Drawer(boolean fullscreen, boolean refresh)
|
||||
|
||||
ST_doPaletteStuff(); // Do red-/gold-shifts from damage/items
|
||||
|
||||
if (st_firsttime)
|
||||
ST_doRefresh(); // If just after ST_Start(), refresh all
|
||||
else
|
||||
ST_diffDraw(); // Otherwise, update as little as possible
|
||||
if (st_firsttime) // If just after ST_Start(), refresh all
|
||||
{
|
||||
st_firsttime = false;
|
||||
|
||||
// draw status bar background to off-screen buff
|
||||
ST_refreshBackground(false);
|
||||
}
|
||||
|
||||
ST_drawWidgets();
|
||||
}
|
||||
|
||||
void ST_loadGraphics(void)
|
||||
@ -1138,51 +1088,6 @@ void ST_loadData(void)
|
||||
ST_loadGraphics();
|
||||
}
|
||||
|
||||
void ST_unloadGraphics(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// unload the numbers, tall and short
|
||||
for (i=0;i<10;i++)
|
||||
{
|
||||
Z_ChangeTag(tallnum[i], PU_CACHE);
|
||||
Z_ChangeTag(shortnum[i], PU_CACHE);
|
||||
}
|
||||
|
||||
// unload tall percent
|
||||
Z_ChangeTag(tallpercent, PU_CACHE);
|
||||
|
||||
// unload arms background
|
||||
Z_ChangeTag(armsbg, PU_CACHE);
|
||||
|
||||
// unload gray #'s
|
||||
for (i=0;i<6;i++)
|
||||
Z_ChangeTag(arms[i][0], PU_CACHE);
|
||||
|
||||
// unload the key cards
|
||||
for (i=0;i<NUMCARDS+3;i++) //jff 2/23/98 unload double key patches too
|
||||
Z_ChangeTag(keys[i], PU_CACHE);
|
||||
|
||||
Z_ChangeTag(sbar, PU_CACHE);
|
||||
if (sbarr)
|
||||
Z_ChangeTag(sbarr, PU_CACHE);
|
||||
|
||||
// killough 3/7/98: free each face background color
|
||||
for (i=0;i<MAXPLAYERS;i++)
|
||||
Z_ChangeTag(faceback[i], PU_CACHE);
|
||||
|
||||
for (i=0;i<ST_NUMFACES;i++)
|
||||
if (faces[i])
|
||||
Z_ChangeTag(faces[i], PU_CACHE);
|
||||
|
||||
// Note: nobody ain't seen no unloading of stminus yet. Dude.
|
||||
}
|
||||
|
||||
void ST_unloadData(void)
|
||||
{
|
||||
ST_unloadGraphics();
|
||||
}
|
||||
|
||||
void ST_initData(void)
|
||||
{
|
||||
int i;
|
||||
@ -1190,13 +1095,7 @@ void ST_initData(void)
|
||||
st_firsttime = true;
|
||||
plyr = &players[displayplayer]; // killough 3/7/98
|
||||
|
||||
st_clock = 0;
|
||||
st_chatstate = StartChatState;
|
||||
st_gamestate = FirstPersonState;
|
||||
|
||||
st_statusbaron = true;
|
||||
st_oldchat = st_chat = false;
|
||||
st_cursoron = false;
|
||||
|
||||
st_faceindex = 0;
|
||||
st_palette = -1;
|
||||
@ -1400,7 +1299,6 @@ void ST_Stop(void)
|
||||
|
||||
void ST_Init(void)
|
||||
{
|
||||
veryfirsttime = 0;
|
||||
ST_loadData();
|
||||
// killough 11/98: allocate enough for hires
|
||||
screens[4] = Z_Malloc(MAX_SCREENWIDTH*ST_HEIGHT*4, PU_STATIC, 0);
|
||||
|
@ -54,21 +54,6 @@ void ST_Init(void);
|
||||
// [crispy] forcefully initialize the status bar backing screen
|
||||
extern void ST_refreshBackground(boolean force);
|
||||
|
||||
// States for status bar code.
|
||||
typedef enum
|
||||
{
|
||||
AutomapState,
|
||||
FirstPersonState
|
||||
} st_stateenum_t;
|
||||
|
||||
// States for the chat code.
|
||||
typedef enum
|
||||
{
|
||||
StartChatState,
|
||||
WaitDestState,
|
||||
GetChatState
|
||||
} st_chatstateenum_t;
|
||||
|
||||
// killough 5/2/98: moved from m_misc.c:
|
||||
|
||||
// [Alaux]
|
||||
|
Loading…
x
Reference in New Issue
Block a user