From 9e4ab3519ed050b2b76803a0a489a57c757db77d Mon Sep 17 00:00:00 2001 From: Zak Larue-Buckley Date: Fri, 3 Jan 2020 19:17:26 +0000 Subject: [PATCH] Remove more unused code. --- include/d_englsh.h | 2 +- include/g_game.h | 4 +--- include/global_data.h | 5 +---- include/global_init.h | 1 - source/am_map.c | 12 ------------ source/d_client.c | 4 +--- source/d_main.c | 2 +- source/doom_iwad.c | 2 +- source/g_game.c | 4 +--- 9 files changed, 7 insertions(+), 29 deletions(-) diff --git a/include/d_englsh.h b/include/d_englsh.h index 2053fcf..deba839 100644 --- a/include/d_englsh.h +++ b/include/d_englsh.h @@ -47,7 +47,7 @@ #define LOADNET "you can't do load while in a net game!\n\n"PRESSKEY #define QLOADNET "you can't quickload during a netgame!\n\n"PRESSKEY #define QSAVESPOT "you haven't picked a quicksave slot yet!\n\n"PRESSKEY -#define SAVEDEAD "you can't save if you aren't playing!\n\n"PRESSKEY +#define SAVEDEAD "you can't save if\nyou aren't playing!\n\n"PRESSKEY #define QSPROMPT "quicksave over your game named\n\n'%s'?\n\n"PRESSYN #define QLPROMPT "do you want to quickload the game named\n\n'%s'?\n\n"PRESSYN diff --git a/include/g_game.h b/include/g_game.h index d326e62..a0d1bda 100644 --- a/include/g_game.h +++ b/include/g_game.h @@ -129,8 +129,6 @@ extern const int key_map_follow; extern const int key_map_mark; // ^ extern const int key_map_clear; // | extern const int key_map_grid; // phares -extern const int key_map_rotate; // cph - map rotation -extern const int key_map_overlay;// cph - map overlay // killough 5/2/98: moved from d_deh.c: @@ -140,7 +138,7 @@ extern const int cpars[32]; // hardcoded array size // CPhipps - Make savedesciption visible in wider scope #define SAVEDESCLEN 8 -#define NUMKEYS 512 +#define NUMKEYS 16 #endif diff --git a/include/global_data.h b/include/global_data.h index effdfc5..7a097de 100644 --- a/include/global_data.h +++ b/include/global_data.h @@ -88,7 +88,6 @@ fixed_t scale_ftom; int lastlevel, lastepisode; -boolean leveljuststarted; // kluge until AM_LevelInit() is called boolean stopped; fixed_t mtof_zoommul; // how far the window zooms each tic (map coords) @@ -98,8 +97,7 @@ fixed_t ftom_zoommul; // how far the window zooms each tic (fb coords) //d_client.c //****************************************************************************** -ticcmd_t netcmds[MAXPLAYERS]; -ticcmd_t* localcmds; +ticcmd_t netcmd; int maketic; int lastmadetic; @@ -185,7 +183,6 @@ int basetic; /* killough 9/29/98: for demo sync */ int totalkills, totallive, totalitems, totalsecret; // for intermission int demover; wbstartstruct_t wminfo; // parms for world map / intermission -byte *savebuffer; // CPhipps - static int totalleveltimes; // CPhipps - total time for all completed levels int longtics; diff --git a/include/global_init.h b/include/global_init.h index 67a229e..d540b15 100644 --- a/include/global_init.h +++ b/include/global_init.h @@ -5,7 +5,6 @@ //am_map.c //****************************************************************************** -_g->leveljuststarted = 1; _g->scale_mtof = (fixed_t)INITSCALEMTOF; _g->stopped = true; diff --git a/source/am_map.c b/source/am_map.c index d2e5763..cfd8c06 100644 --- a/source/am_map.c +++ b/source/am_map.c @@ -261,8 +261,6 @@ static void AM_initVariables(void) // CPhipps - get status bar height from status bar code static void AM_LevelInit(void) { - _g->leveljuststarted = 0; - _g->f_x = _g->f_y = 0; _g->f_w = SCREENWIDTH*2; // killough 2/7/98: get rid of finit_ vars _g->f_h = SCREENHEIGHT-ST_SCALED_HEIGHT;// to allow runtime setting of width/height @@ -405,16 +403,6 @@ boolean AM_Responder // Ty 03/27/98 - externalized _g->player.message = (_g->automapmode & am_follow) ? AMSTR_FOLLOWON : AMSTR_FOLLOWOFF; } // | - else if (ch == key_map_rotate) - { - _g->automapmode ^= am_rotate; - _g->player.message = (_g->automapmode & am_rotate) ? AMSTR_ROTATEON : AMSTR_ROTATEOFF; - } - else if (ch == key_map_overlay) - { - _g->automapmode ^= am_overlay; - _g->player.message = (_g->automapmode & am_overlay) ? AMSTR_OVERLAYON : AMSTR_OVERLAYOFF; - } else if (ch == key_map_zoomout) { _g->mtof_zoommul = M_ZOOMOUT; diff --git a/source/d_client.c b/source/d_client.c index 7fa6c8c..650934b 100644 --- a/source/d_client.c +++ b/source/d_client.c @@ -68,8 +68,6 @@ void D_InitNetGame (void) { - _g->localcmds = &_g->netcmds[0]; - _g->playeringame = true; } @@ -84,7 +82,7 @@ void D_BuildNewTiccmds(void) if (_g->maketic - _g->gametic > 3) break; - G_BuildTiccmd(&_g->localcmds[0]); + G_BuildTiccmd(&_g->netcmd); _g->maketic++; } } diff --git a/source/d_main.c b/source/d_main.c index 7b29d39..4a235ce 100644 --- a/source/d_main.c +++ b/source/d_main.c @@ -261,7 +261,7 @@ static void D_DoomLoop(void) if (_g->singletics) { I_StartTic (); - G_BuildTiccmd (&_g->netcmds[0]); + G_BuildTiccmd (&_g->netcmd); if (_g->advancedemo) D_DoAdvanceDemo (); diff --git a/source/doom_iwad.c b/source/doom_iwad.c index 91dbf6c..fa6f94f 100644 --- a/source/doom_iwad.c +++ b/source/doom_iwad.c @@ -1,4 +1,4 @@ -#include "iwad/doom2.gba.h" +#include "iwad/doomu.gba.h" #include "doom_iwad.h" diff --git a/source/g_game.c b/source/g_game.c index f60c7e1..77ed5ab 100644 --- a/source/g_game.c +++ b/source/g_game.c @@ -103,8 +103,6 @@ const int key_map_up = KEYD_UP; const int key_map_down = KEYD_DOWN; const int key_map = KEYD_SELECT; const int key_map_follow = KEYD_A; -const int key_map_overlay = 'o'; // cph - map overlay -const int key_map_rotate = 'r'; // cph - map rotation const int key_map_zoomin = KEYD_R; const int key_map_zoomout = KEYD_L; // phares @@ -511,7 +509,7 @@ boolean G_Responder (event_t* ev) { ticcmd_t *cmd = &_g->player.cmd; - memcpy(cmd, &_g->netcmds[0], sizeof *cmd); + memcpy(cmd, &_g->netcmd, sizeof *cmd); if (_g->demoplayback) G_ReadDemoTiccmd (cmd);