Skip to content

Commit 5160b9c

Browse files
committed
More cleanup
1 parent 0ce45c0 commit 5160b9c

File tree

7 files changed

+14
-39
lines changed

7 files changed

+14
-39
lines changed

client/src/cl_game.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ EXTERN_CVAR (in_autosr50)
108108

109109
EXTERN_CVAR (chasedemo)
110110

111-
gameaction_t gameaction;
112111
gamestate_t gamestate = GS_STARTUP;
113112

114113
bool sendpause; // send a pause event next tic
@@ -120,8 +119,6 @@ bool longtics; // don't quantize yaw for classic vanilla demos
120119
bool nodrawers; // for comparative timing purposes
121120
bool noblit; // for comparative timing purposes
122121

123-
byte consoleplayer_id; // player taking events and displaying
124-
byte displayplayer_id; // view being displayed
125122
int gametic;
126123

127124
extern fixed_t bobx;
@@ -187,7 +184,6 @@ CVAR_FUNC_IMPL(cl_mouselook)
187184
}
188185

189186
char demoname[256];
190-
bool demoplayback;
191187

192188
extern bool simulated_connection;
193189

common/d_event.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Emacs style mode select -*- C++ -*-
1+
// Emacs style mode select -*- C++ -*-
22
//-----------------------------------------------------------------------------
33
//
44
// $Id$
@@ -18,7 +18,7 @@
1818
//
1919
// DESCRIPTION:
2020
// Input event handling (?)
21-
//
21+
//
2222
//-----------------------------------------------------------------------------
2323

2424
#pragma once
@@ -63,7 +63,7 @@ struct event_t
6363
int mod; // input mods
6464
};
6565

66-
66+
6767
typedef enum
6868
{
6969
ga_nothing,
@@ -96,7 +96,7 @@ typedef enum
9696
// Flag: game events, not really buttons.
9797
BT_SPECIAL = 128,
9898
BT_SPECIALMASK = 3,
99-
99+
100100
// Flag, weapon change pending.
101101
// If true, the next 3 bits hold weapon num.
102102
BT_CHANGE = 4,
@@ -112,10 +112,10 @@ typedef enum
112112
BTS_SAVEGAME = 2,
113113

114114
// Savegame slot numbers
115-
// occupy the second byte of buttons.
115+
// occupy the second byte of buttons.
116116
BTS_SAVEMASK = (4+8+16),
117117
BTS_SAVESHIFT = 2
118-
118+
119119
} buttoncode_t;
120120

121121

@@ -130,4 +130,4 @@ extern event_t events[MAXEVENTS];
130130
extern int eventhead;
131131
extern int eventtail;
132132

133-
extern gameaction_t gameaction;
133+
inline gameaction_t gameaction;

common/d_player.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,8 @@ size_t P_NumPlayersInGame();
644644
size_t P_NumReadyPlayersInGame();
645645
size_t P_NumPlayersOnTeam(team_t team);
646646

647-
extern byte consoleplayer_id;
648-
extern byte displayplayer_id;
647+
inline byte consoleplayer_id; // player taking events and displaying
648+
inline byte displayplayer_id; // view being displayed
649649

650650
//
651651

common/doomstat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ extern level_locals_t level;
127127
// Disable save/end game?
128128
extern bool usergame;
129129

130-
extern bool demoplayback;
130+
inline bool demoplayback;
131131

132132
// Quit after playing a demo from cmdline.
133133
extern bool singledemo;

common/p_boomfspec.h

-2
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,3 @@ void P_SpawnFireFlicker(sector_t* sector);
6060
AActor* P_GetPushThing(int);
6161
void P_PostProcessCompatibleLinedefSpecial(line_t* line);
6262
bool P_IsTeleportLine(const short special);
63-
64-
extern bool demoplayback;

server/src/sv_game.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,15 @@ EXTERN_CVAR (sv_fastmonsters)
5656
EXTERN_CVAR (sv_freelook)
5757
EXTERN_CVAR (sv_teamsinplay)
5858

59-
gameaction_t gameaction;
6059
gamestate_t gamestate = GS_STARTUP;
6160

6261
bool sendpause; // send a pause event next tic
6362

6463
player_t nullplayer; // The null player
6564

66-
byte consoleplayer_id; // player taking events and displaying
67-
byte displayplayer_id; // view being displayed
6865
int gametic;
6966

70-
7167
FILE *recorddemo_fp; // Ch0wW : Keeping this for future serverside demo-recording.
72-
bool demoplayback; // FIXME : remove this serverside !
7368
int demostartgametic; // FIXME : remove this serverside !
7469

7570
wbstartstruct_t wminfo; // parms for world map / intermission

tests/unit-tests/src/t_stubs.cpp

+4-18
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,13 @@ bool clientside = false; // don't want any rendering code called
4040
bool serverside = true;
4141
baseapp_t baseapp = test;
4242

43-
// Unnatural Level Progression. True if we've used 'map' or another command
44-
// to switch to a specific map out of order, otherwise false.
45-
bool unnatural_level_progression;
46-
unsigned char consoleplayer_id;
43+
bool unnatural_level_progression = false;
44+
bool step_mode = false;
4745
wbstartstruct_t wminfo;
48-
gameaction_t gameaction;
46+
4947
bool predicting;
5048
int demostartgametic;
51-
5249
bool isFast;
53-
bool demoplayback;
54-
bool step_mode;
5550
int gametic;
5651
bool simulated_connection;
5752
gamestate_t gamestate;
@@ -127,19 +122,10 @@ void V_RefreshColormaps() {}
127122

128123
size_t C_BasePrint(const int printlevel, const char* color_code, const std::string& str) { return 0; }
129124

130-
#define NORM_PITCH 128
131-
#define NORM_PRIORITY 64
132-
#define NORM_SEP 128
133-
134-
#define S_PITCH_PERTURB 1
135-
#define S_STEREO_SWING (96<<FRACBITS)
136-
137125
//
138126
// [RH] Print sound debug info. Called from D_Display()
139127
//
140-
void S_NoiseDebug()
141-
{
142-
}
128+
void S_NoiseDebug() {}
143129

144130

145131
//

0 commit comments

Comments
 (0)