Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with Q2PRO: Cleanups #425

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ Controls rendering of entities with `EF_GIB` flag set. When using Q2PRO
protocol, disabling this saves some bandwidth since the server stops
sending these entities at all. Default value is 1 (enabled).

#### `cl_gun`
Controls rendering of the player's own gun model. When using R1Q2 or Q2PRO
protocol, disabling this saves some bandwidth since the server stops
sending gun updates at all. Default value is 1 (enabled).

#### `cl_footsteps`
Controls footstep sounds. When using Q2PRO protocol, disabling this saves
some bandwidth since the server stops sending footstep events at all.
Expand Down Expand Up @@ -327,10 +322,6 @@ available at the same time, depending on how client was compiled):
- wave — Windows waveform audio
- sdl — SDL2 audio

#### `al_driver`
Specifies the name of OpenAL driver to use. Default value is `soft_oal`
on Windows, and ‘libopenal.so.1’ on Linux.

#### `al_device`
Specifies the name of OpenAL device to use. Format of this value depends on
your OpenAL implementation. Default value is empty, which means default
Expand Down
2 changes: 0 additions & 2 deletions inc/common/files.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ size_t FS_NormalizePathBuffer(char *out, const char *in, size_t size);
int FS_ValidatePath(const char *s);
void FS_CleanupPath(char *s);

void FS_SanitizeFilenameVariable(cvar_t *var);

#ifdef _WIN32
char *FS_ReplaceSeparators(char *s, int separator);
#endif
Expand Down
4 changes: 0 additions & 4 deletions inc/common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,4 @@ void Com_PageInMemory(void *buffer, size_t size);

color_index_t Com_ParseColor(const char *s);

#if USE_REF == REF_GL
unsigned Com_ParseExtensionString(const char *s, const char *const extnames[]);
#endif

#endif // UTILS_H
3 changes: 1 addition & 2 deletions inc/refresh/refresh.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,8 @@ typedef struct {
} r_opengl_config_t;

typedef enum {
QVF_ACCELERATED = (1 << 0),
QVF_FULLSCREEN = (1 << 0),
QVF_GAMMARAMP = (1 << 1),
QVF_FULLSCREEN = (1 << 2)
} vidFlags_t;

typedef struct {
Expand Down
14 changes: 0 additions & 14 deletions inc/shared/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define PATH_SEP_STRING "/"
#endif

#if (defined _WIN32)
#define LIBGL "opengl32"
#define LIBAL "soft_oal"
#elif (defined __OpenBSD__)
#define LIBGL "libGL.so"
#define LIBAL "libopenal.so"
#elif (defined __APPLE__)
#define LIBGL "/System/Library/Frameworks/OpenGL.framework/OpenGL"
#define LIBAL "/System/Library/Frameworks/OpenAL.framework/OpenAL"
#else
#define LIBGL "libGL.so.1"
#define LIBAL "libopenal.so.1"
#endif

#ifdef _WIN32
#define os_mkdir(p) _mkdir(p)
#define os_unlink(p) _unlink(p)
Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ SET(SRC_CLIENT
client/sound/mem.c
client/sound/ogg.c
client/sound/qal/fixed.c
# client/sound/qal/dynamic.c
common/async.c
)

Expand All @@ -132,7 +131,6 @@ SET(HEADERS_CLIENT
client/client.h
client/ui/ui.h
client/sound/sound.h
client/sound/qal/dynamic.h
client/sound/qal/fixed.h
)

Expand Down
6 changes: 2 additions & 4 deletions src/client/cin.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ void SCR_StopCinematic(void)
{
R_DiscardRawPic();

if (cin.pic)
Z_Free(cin.pic);
if (cin.file)
FS_CloseFile(cin.file);
Z_Free(cin.pic);
FS_CloseFile(cin.file);
memset(&cin, 0, sizeof(cin));
}

Expand Down
4 changes: 0 additions & 4 deletions src/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ typedef struct client_state_s {
// localmove and pending cmd, cleared each time cmd is finalized
vec2_t mousemove;

#if USE_SMOOTH_DELTA_ANGLES
short delta_angles[3]; // interpolated
#endif

int time; // this is the time value that the client
// is rendering at. always <= cl.servertime
float lerpfrac; // between oldframe and frame
Expand Down
5 changes: 2 additions & 3 deletions src/client/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,9 @@ static void Con_RemoteMode_f(void)
con.chat = CHAT_NONE;
}

Z_Free(con.remotePassword);

con.remoteAddress = adr;
if (con.remotePassword) {
Z_Free(con.remotePassword);
}
con.remotePassword = Z_CopyString(s);
}

Expand Down
17 changes: 0 additions & 17 deletions src/client/entities.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,17 +1135,6 @@ static void CL_FinishViewValues(void)
CL_SetupFirstPersonView();
}

#if USE_SMOOTH_DELTA_ANGLES
static inline float LerpShort(int a2, int a1, float frac)
{
if (a1 - a2 > 32768)
a1 &= 65536;
if (a2 - a1 > 32768)
a1 &= 65536;
return a2 + frac * (a1 - a2);
}
#endif

static inline float lerp_client_fov(float ofov, float nfov, float lerp)
{
if (cls.demo.playback) {
Expand Down Expand Up @@ -1235,12 +1224,6 @@ void CL_CalcViewValues(void)
LerpAngles(ops->viewangles, ps->viewangles, lerp, cl.refdef.viewangles);
}

#if USE_SMOOTH_DELTA_ANGLES
cl.delta_angles[0] = LerpShort(ops->pmove.delta_angles[0], ps->pmove.delta_angles[0], lerp);
cl.delta_angles[1] = LerpShort(ops->pmove.delta_angles[1], ps->pmove.delta_angles[1], lerp);
cl.delta_angles[2] = LerpShort(ops->pmove.delta_angles[2], ps->pmove.delta_angles[2], lerp);
#endif

// don't interpolate blend color
Vector4Copy(ps->blend, cl.refdef.blend);

Expand Down
4 changes: 1 addition & 3 deletions src/client/keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,7 @@ void Key_SetBinding(int keynum, const char *binding)
return;

// free old binding
if (keybindings[keynum]) {
Z_Free(keybindings[keynum]);
}
Z_Free(keybindings[keynum]);

// allocate memory for new binding
keybindings[keynum] = Z_CopyString(binding);
Expand Down
4 changes: 0 additions & 4 deletions src/client/predict.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,7 @@ void CL_PredictMovement(void)
memset(&pm, 0, sizeof(pm));
pm.trace = CL_PMTrace;
pm.pointcontents = CL_PointContents;

pm.s = cl.frame.ps.pmove;
#if USE_SMOOTH_DELTA_ANGLES
VectorCopy(cl.delta_angles, pm.s.delta_angles);
#endif

// run frames
while (++ack <= current) {
Expand Down
6 changes: 2 additions & 4 deletions src/client/sound/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ static void S_FreeSound(sfx_t *sfx)
{
if (s_api.delete_sfx)
s_api.delete_sfx(sfx);
if (sfx->cache)
Z_Free(sfx->cache);
if (sfx->truename)
Z_Free(sfx->truename);
Z_Free(sfx->cache);
Z_Free(sfx->truename);
memset(sfx, 0, sizeof(*sfx));
}

Expand Down
141 changes: 0 additions & 141 deletions src/client/sound/qal/dynamic.c

This file was deleted.

Loading
Loading