Skip to content

Commit

Permalink
Duke3D: Remove several unused variables and definitions
Browse files Browse the repository at this point in the history
Including a leftover T_RENAMEFILE definition that was removed long ago
  • Loading branch information
dibollinger authored and Hendricks266 committed Mar 6, 2024
1 parent c050921 commit f5cb424
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 14 deletions.
2 changes: 0 additions & 2 deletions source/duke3d/src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ enum gametokens
T_DISTANCE,
T_VOLUME,
T_DELAY,
T_RENAMEFILE,
T_GLOBALGAMEFLAGS,
T_ASPECT,
T_FORCEFILTER,
Expand Down Expand Up @@ -5409,7 +5408,6 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass)
{ "sound", T_SOUND },
{ "cutscene", T_CUTSCENE },
{ "animsounds", T_ANIMSOUNDS },
{ "renamefile", T_RENAMEFILE },
{ "globalgameflags", T_GLOBALGAMEFLAGS },
{ "newgamechoices", T_NEWGAMECHOICES },
{ "localization" , T_LOCALIZATION },
Expand Down
1 change: 0 additions & 1 deletion source/duke3d/src/gamedef.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ extern int32_t g_numXStrings;
extern int32_t g_scriptVersion;
extern int32_t g_totalLines;
extern int32_t g_warningCnt;
extern uint32_t g_scriptcrc;
extern int32_t otherp;
extern uint8_t *bitptr;

Expand Down
3 changes: 0 additions & 3 deletions source/duke3d/src/osdfuncs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "premap.h"

int osdhightile = 1;
int osdshown = 0;

#ifdef EDUKE32_TOUCH_DEVICES
float osdscale = 2.f, osdrscale = 0.5f;
Expand Down Expand Up @@ -134,8 +133,6 @@ void dukeConsoleOnShowCallback(int shown)

mouseLockToWindow(lock);

osdshown = shown;

// XXX: it's weird to fake a keypress like this.
// if (numplayers == 1 && ((shown && !ud.pause_on) || (!shown && ud.pause_on)))
// KB_KeyDown[sc_Pause] = 1;
Expand Down
1 change: 0 additions & 1 deletion source/duke3d/src/osdfuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ void dukeConsoleOnShowCallback(int shown);
void dukeConsoleClearBackground(int numcols, int numrows);

extern int osdhightile;
extern int osdshown;
extern float osdscale, osdrscale;
7 changes: 1 addition & 6 deletions source/duke3d/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "android.h"
#endif

int32_t lastvisinc;
hudweapon_t hudweap;

#ifdef SPLITSCREEN_MOD_HACKS
Expand Down Expand Up @@ -3011,7 +3010,6 @@ enddisplayweapon:;
#define MAXHORIZVEL 256

int32_t g_myAimMode, g_myAimStat, g_oldAimStat;
int32_t mouseyaxismode = -1;
uint64_t g_lastInputTicks;

enum inputlock_t
Expand Down Expand Up @@ -4565,10 +4563,7 @@ static void P_ProcessWeapon(int playerNum)
if (PWEAPON(playerNum, pPlayer->curr_weapon, Shoots) != 0)
{
if (!(PWEAPON(playerNum, pPlayer->curr_weapon, Flags) & WEAPON_NOVISIBLE))
{
lastvisinc = (int32_t) totalclock+32;
pPlayer->visibility = 0;
}

P_SetWeaponGamevars(playerNum, pPlayer);
A_Shoot(pPlayer->i, PWEAPON(playerNum, pPlayer->curr_weapon, Shoots));
Expand Down Expand Up @@ -5081,7 +5076,7 @@ void P_ProcessInput(int playerNum)

int32_t cz[4], fz[4], hzhit[4], lzhit[4];
vec3_t pos[4] = { pPlayer->pos, pPlayer->pos, pPlayer->pos, pPlayer->pos };

int const thirdStep = pPlayer->autostep_sbw / 3;

pos[0].z += pPlayer->autostep_sbw;
Expand Down
1 change: 0 additions & 1 deletion source/duke3d/src/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ extern int32_t g_levelTextTime;
extern int32_t g_myAimMode;
extern int32_t g_numObituaries;
extern int32_t g_numSelfObituaries;
extern int32_t mouseyaxismode;
extern int32_t ticrandomseed;
extern uint64_t g_lastInputTicks;

Expand Down

0 comments on commit f5cb424

Please sign in to comment.