Merge branch 'mi-a-bit-of-cleanup' into 'master'

MI's unimportant code cleanup

Just removing a bunch of unused variables/function prototypes from the source code and similarly minor stuff, nothing here should change gameplay much (if at all).

See merge request !71
This commit is contained in:
Monster Iestyn 2017-04-17 14:43:50 -04:00
commit 93efb3084e
15 changed files with 4 additions and 45 deletions

View File

@ -1563,8 +1563,6 @@ static void CL_LoadReceivedSavegame(void)
automapactive = false;
// load a base level
playerdeadview = false;
if (P_LoadNetGame())
{
const INT32 actnum = mapheaderinfo[gamemap-1]->actnum;

View File

@ -720,7 +720,6 @@ void D_StartTitle(void)
maptol = 0;
gameaction = ga_nothing;
playerdeadview = false;
displayplayer = consoleplayer = 0;
//demosequence = -1;
gametype = GT_COOP;

View File

@ -34,7 +34,7 @@ void D_SRB2Loop(void) FUNCNORETURN;
// D_SRB2Main()
// Not a globally visible function, just included for source reference,
// calls all startup code, parses command line options.
// If not overrided by user input, calls N_AdvanceDemo.
// If not overrided by user input, calls D_AdvanceDemo.
//
void D_SRB2Main(void);
@ -51,9 +51,6 @@ const char *D_Home(void);
//
// BASE LEVEL
//
void D_PageTicker(void);
// pagename is lumpname of a 320x200 patch to fill the screen
void D_PageDrawer(const char *pagename);
void D_AdvanceDemo(void);
void D_StartTitle(void);

View File

@ -49,7 +49,9 @@ doomcom_t *doomcom = NULL;
/// \brief network packet data, points inside doomcom
doomdata_t *netbuffer = NULL;
#ifdef DEBUGFILE
FILE *debugfile = NULL; // put some net info in a file during the game
#endif
#define MAXREBOUND 8
static doomdata_t reboundstore[MAXREBOUND];

View File

@ -191,7 +191,6 @@ void Command_ExitGame_f(void);
void Command_Retry_f(void);
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pultmode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect);
void ObjectPlace_OnChange(void);
void ItemFinder_OnChange(void);
void D_SetPassword(const char *pw);

View File

@ -452,19 +452,17 @@ extern mapthing_t *redctfstarts[MAXPLAYERS]; // CTF
#if defined (macintosh)
#define DEBFILE(msg) I_OutputMsg(msg)
extern FILE *debugfile;
#else
#define DEBUGFILE
#ifdef DEBUGFILE
#define DEBFILE(msg) { if (debugfile) { fputs(msg, debugfile); fflush(debugfile); } }
extern FILE *debugfile;
#else
#define DEBFILE(msg) {}
extern FILE *debugfile;
#endif
#endif
#ifdef DEBUGFILE
extern FILE *debugfile;
extern INT32 debugload;
#endif

View File

@ -434,7 +434,6 @@ void F_StartIntro(void)
G_SetGamestate(GS_INTRO);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1125,7 +1124,6 @@ void F_StartCredits(void)
}
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1272,7 +1270,6 @@ void F_StartGameEvaluation(void)
G_SaveGame((UINT32)cursaveslot);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1383,7 +1380,6 @@ void F_StartGameEnd(void)
G_SetGamestate(GS_GAMEEND);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1586,7 +1582,6 @@ void F_StartContinue(void)
gameaction = ga_nothing;
keypressed = false;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1755,7 +1750,6 @@ void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean reset
G_SetGamestate(GS_CUTSCENE);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();

View File

@ -3619,7 +3619,6 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
mapmusflags |= MUSIC_RELOADRESET;
ultimatemode = pultmode;
playerdeadview = false;
automapactive = false;
imcontinuing = false;

View File

@ -564,8 +564,6 @@ static inline void HWR_SubsecPoly(INT32 num, poly_t *poly)
subsector_t *sub;
seg_t *lseg;
sscount++;
sub = &subsectors[num];
count = sub->numlines;
lseg = &segs[sub->firstline];

View File

@ -3367,7 +3367,6 @@ static void HWR_Subsector(size_t num)
if (num < numsubsectors)
{
sscount++;
// subsector
sub = &subsectors[num];
// sector

View File

@ -78,9 +78,6 @@ extern boolean chat_on;
// set true whenever the tab rankings are being shown for any reason
extern boolean hu_showscores;
// P_DeathThink sets this true to show scores while dead, in multiplayer
extern boolean playerdeadview;
// init heads up data at game startup.
void HU_Init(void);

View File

@ -72,7 +72,6 @@
// both the head and tail of the thinker list
extern thinker_t thinkercap;
extern INT32 runcount;
void P_InitThinkers(void);
void P_AddThinker(thinker_t *thinker);

View File

@ -9093,8 +9093,6 @@ void P_DoPityCheck(player_t *player)
// P_PlayerThink
//
boolean playerdeadview; // show match/chaos/tag/capture the flag rankings while in death view
void P_PlayerThink(player_t *player)
{
ticcmd_t *cmd;
@ -9290,10 +9288,6 @@ void P_PlayerThink(player_t *player)
if (player->playerstate == PST_DEAD)
{
player->mo->flags2 &= ~MF2_SHADOW;
// show the multiplayer rankings while dead
if (player == &players[displayplayer])
playerdeadview = true;
P_DeathThink(player);
return;
@ -9314,9 +9308,6 @@ void P_PlayerThink(player_t *player)
player->lives = cv_startinglives.value;
}
if (player == &players[displayplayer])
playerdeadview = false;
if ((gametype == GT_RACE || gametype == GT_COMPETITION) && leveltime < 4*TICRATE)
{
cmd->buttons &= BT_USE; // Remove all buttons except BT_USE

View File

@ -60,7 +60,6 @@ fixed_t projectiony; // aspect ratio
// just for profiling purposes
size_t framecount;
size_t sscount;
size_t loopcount;
fixed_t viewx, viewy, viewz;
@ -491,9 +490,6 @@ static void R_InitTextureMapping(void)
// Take out the fencepost cases from viewangletox.
for (i = 0; i < FINEANGLES/2; i++)
{
t = FixedMul(FINETANGENT(i), focallength);
t = centerx - t;
if (viewangletox[i] == -1)
viewangletox[i] = 0;
else if (viewangletox[i] == viewwidth+1)
@ -885,8 +881,6 @@ void R_SkyboxFrame(player_t *player)
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
sscount = 0;
// recalc necessary stuff for mouseaiming
// slopes are already calculated for the full possible view (which is 4*viewheight).
@ -1010,8 +1004,6 @@ void R_SetupFrame(player_t *player, boolean skybox)
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
sscount = 0;
// recalc necessary stuff for mouseaiming
// slopes are already calculated for the full possible view (which is 4*viewheight).

View File

@ -108,7 +108,4 @@ extern angle_t rw_normalangle;
// angle to line origin
extern angle_t rw_angle1;
// Segs count?
extern size_t sscount;
#endif