diff --git a/include/client.h b/include/client.h index 96c9f07..907bf7b 100644 --- a/include/client.h +++ b/include/client.h @@ -321,80 +321,36 @@ typedef struct // // cvars // -/* extern cvar_t cl_warncmd; - CVAR_FIXME */ extern cvar_t *cl_warncmd; -/* extern cvar_t cl_upspeed; - CVAR_FIXME */ extern cvar_t *cl_upspeed; -/* extern cvar_t cl_forwardspeed; - CVAR_FIXME */ extern cvar_t *cl_forwardspeed; -/* extern cvar_t cl_backspeed; - CVAR_FIXME */ extern cvar_t *cl_backspeed; -/* extern cvar_t cl_sidespeed; - CVAR_FIXME */ extern cvar_t *cl_sidespeed; -/* extern cvar_t cl_movespeedkey; - CVAR_FIXME */ extern cvar_t *cl_movespeedkey; -/* extern cvar_t cl_yawspeed; - CVAR_FIXME */ extern cvar_t *cl_yawspeed; -/* extern cvar_t cl_pitchspeed; - CVAR_FIXME */ extern cvar_t *cl_pitchspeed; -/* extern cvar_t cl_anglespeedkey; - CVAR_FIXME */ extern cvar_t *cl_anglespeedkey; -/* extern cvar_t cl_shownet; - CVAR_FIXME */ extern cvar_t *cl_shownet; -/* extern cvar_t cl_sbar; - CVAR_FIXME */ extern cvar_t *cl_sbar; -/* extern cvar_t cl_hudswap; - CVAR_FIXME */ extern cvar_t *cl_hudswap; -/* extern cvar_t cl_pitchdriftspeed; - CVAR_FIXME */ extern cvar_t *cl_pitchdriftspeed; -/* extern cvar_t lookspring; - CVAR_FIXME */ extern cvar_t *lookspring; -/* extern cvar_t lookstrafe; - CVAR_FIXME */ extern cvar_t *lookstrafe; -/* extern cvar_t sensitivity; - CVAR_FIXME */ extern cvar_t *sensitivity; extern cvar_t *cl_freelook; -/* extern cvar_t m_pitch; - CVAR_FIXME */ extern cvar_t *m_pitch; -/* extern cvar_t m_yaw; - CVAR_FIXME */ extern cvar_t *m_yaw; -/* extern cvar_t m_forward; - CVAR_FIXME */ extern cvar_t *m_forward; -/* extern cvar_t m_side; - CVAR_FIXME */ extern cvar_t *m_side; -/* extern cvar_t _windowed_mouse; - CVAR_FIXME */ extern cvar_t *_windowed_mouse; -/* extern cvar_t name; - CVAR_FIXME */ extern cvar_t *name; diff --git a/include/d_iface.h b/include/d_iface.h index 9c24da5..5578161 100644 --- a/include/d_iface.h +++ b/include/d_iface.h @@ -122,8 +122,6 @@ typedef struct int color; } zpointdesc_t; -/* extern cvar_t r_drawflat; - CVAR_FIXME */ extern cvar_t *r_drawflat; extern int d_spanpixcount; extern int r_framecount; // sequence # of current frame since Quake diff --git a/include/d_local.h b/include/d_local.h index 77f950f..8022905 100644 --- a/include/d_local.h +++ b/include/d_local.h @@ -64,8 +64,6 @@ typedef struct sspan_s int u, v, count; } sspan_t; -/* extern cvar_t d_subdiv16; - CVAR_FIXME */ extern cvar_t *d_subdiv16; extern float scale_for_mip; diff --git a/include/r_local.h b/include/r_local.h index 7b96db2..fc472f7 100644 --- a/include/r_local.h +++ b/include/r_local.h @@ -68,59 +68,23 @@ typedef struct { //=========================================================================== -/* extern cvar_t r_draworder; - CVAR_FIXME */ extern cvar_t *r_draworder; -/* extern cvar_t r_speeds; - CVAR_FIXME */ extern cvar_t *r_speeds; -/* extern cvar_t r_timegraph; - CVAR_FIXME */ extern cvar_t *r_timegraph; -/* extern cvar_t r_graphheight; - CVAR_FIXME */ extern cvar_t *r_graphheight; -/* extern cvar_t r_clearcolor; - CVAR_FIXME */ extern cvar_t *r_clearcolor; -/* extern cvar_t r_waterwarp; - CVAR_FIXME */ extern cvar_t *r_waterwarp; -/* extern cvar_t r_fullbright; - CVAR_FIXME */ extern cvar_t *r_fullbright; -/* extern cvar_t r_drawentities; - CVAR_FIXME */ extern cvar_t *r_drawentities; -/* extern cvar_t r_aliasstats; - CVAR_FIXME */ extern cvar_t *r_aliasstats; -/* extern cvar_t r_dspeeds; - CVAR_FIXME */ extern cvar_t *r_dspeeds; -/* extern cvar_t r_drawflat; - CVAR_FIXME */ extern cvar_t *r_drawflat; -/* extern cvar_t r_ambient; - CVAR_FIXME */ extern cvar_t *r_ambient; -/* extern cvar_t r_reportsurfout; - CVAR_FIXME */ extern cvar_t *r_reportsurfout; -/* extern cvar_t r_maxsurfs; - CVAR_FIXME */ extern cvar_t *r_maxsurfs; -/* extern cvar_t r_numsurfs; - CVAR_FIXME */ extern cvar_t *r_numsurfs; -/* extern cvar_t r_reportedgeout; - CVAR_FIXME */ extern cvar_t *r_reportedgeout; -/* extern cvar_t r_maxedges; - CVAR_FIXME */ extern cvar_t *r_maxedges; -/* extern cvar_t r_numedges; - CVAR_FIXME */ extern cvar_t *r_numedges; extern cvar_t *crosshair; diff --git a/include/r_shared.h b/include/r_shared.h index 7100e80..e0d2286 100644 --- a/include/r_shared.h +++ b/include/r_shared.h @@ -59,8 +59,6 @@ extern float pixelAspect; extern int r_drawnpolycount; -/* extern cvar_t r_clearcolor; - CVAR_FIXME */ extern cvar_t *r_clearcolor; extern int sintable[1280]; diff --git a/include/screen.h b/include/screen.h index 97cbbf2..00d8b59 100644 --- a/include/screen.h +++ b/include/screen.h @@ -54,13 +54,7 @@ extern int sb_lines; extern int clearnotify; // set to 0 whenever notify text is drawn extern qboolean scr_disabled_for_loading; -/* extern cvar_t scr_viewsize; - CVAR_FIXME */ -extern cvar_t *scr_viewsize; - -/* extern cvar_t scr_viewsize; - CVAR_FIXME */ -extern cvar_t *scr_viewsize; +extern cvar_t *scr_viewsize; // only the refresh window will be updated unless these variables are flagged extern int scr_copytop; diff --git a/source/cd_audio.c b/source/cd_audio.c index 04a8a67..04f2ced 100644 --- a/source/cd_audio.c +++ b/source/cd_audio.c @@ -33,9 +33,7 @@ #include "quakedef.h" #include "dosisms.h" -/* extern cvar_t bgmvolume; - CVAR_FIXME */ -extern cvar_t *bgmvolume; +extern cvar_t *bgmvolume; #define ADDRESS_MODE_HSG 0 #define ADDRESS_MODE_RED_BOOK 1 @@ -759,8 +757,6 @@ void CDAudio_Update(void) } } -/* newVolume = (int)(bgmvolume.value * 255.0); - CVAR_FIXME */ newVolume = (int)(bgmvolume->value * 255.0); if (newVolume < 0) { diff --git a/source/cd_linux.c b/source/cd_linux.c index e064897..1102359 100644 --- a/source/cd_linux.c +++ b/source/cd_linux.c @@ -346,23 +346,17 @@ void CDAudio_Update(void) if (!enabled) return; -/* if (bgmvolume.value != cdvolume) - CVAR_FIXME */ if (bgmvolume->value != cdvolume) { if (cdvolume) { - bgmvolume->value = 0.0; -/* cdvolume = bgmvolume.value; - CVAR_FIXME */ + Cvar_SetValue (bgmvolume, 0.0); cdvolume = bgmvolume->value; CDAudio_Pause (); } else { bgmvolume->value = 1.0; -/* cdvolume = bgmvolume.value; - CVAR_FIXME */ cdvolume = bgmvolume->value; CDAudio_Resume (); } diff --git a/source/cd_win.c b/source/cd_win.c index fbd63c5..c413969 100644 --- a/source/cd_win.c +++ b/source/cd_win.c @@ -37,8 +37,6 @@ #include "cmd.h" extern HWND mainwindow; -/* extern cvar_t bgmvolume; - CVAR_FIXME */ extern cvar_t *bgmvolume; static qboolean cdValid = false; @@ -423,23 +421,17 @@ void CDAudio_Update(void) if (!enabled) return; -/* if (bgmvolume.value != cdvolume) - CVAR_FIXME */ if (bgmvolume->value != cdvolume) { if (cdvolume) { Cvar_SetValue (bgmvolume, 0.0); -/* cdvolume = bgmvolume.value; - CVAR_FIXME */ cdvolume = bgmvolume->value; CDAudio_Pause (); } else { Cvar_SetValue (bgmvolume, 1.0); -/* cdvolume = bgmvolume.value; - CVAR_FIXME */ cdvolume = bgmvolume->value; CDAudio_Resume (); } diff --git a/source/cl_cam.c b/source/cl_cam.c index 9315c85..b37bd69 100644 --- a/source/cl_cam.c +++ b/source/cl_cam.c @@ -56,19 +56,11 @@ static qboolean locked = false; static int oldbuttons; // track high fragger -/* cvar_t cl_hightrack = {"cl_hightrack", "0" }; - CVAR_FIXME */ cvar_t *cl_hightrack; -/* cvar_t cl_chasecam = {"cl_chasecam", "0"}; - CVAR_FIXME */ cvar_t *cl_chasecam; -/* //cvar_t cl_camera_maxpitch = {"cl_camera_maxpitch", "10" }; - CVAR_FIXME */ cvar_t *cl_camera_maxpitch; -/* //cvar_t cl_camera_maxyaw = {"cl_camera_maxyaw", "30" }; - CVAR_FIXME */ cvar_t *cl_camera_maxyaw; qboolean cam_forceview; @@ -119,8 +111,6 @@ qboolean Cam_DrawViewModel(void) if (!cl.spectator) return true; -/* if (autocam && locked && cl_chasecam.value) - CVAR_FIXME */ if (autocam && locked && cl_chasecam->value) return true; return false; @@ -129,8 +119,6 @@ qboolean Cam_DrawViewModel(void) // returns true if we should draw this player, we don't if we are chase camming qboolean Cam_DrawPlayer(int playernum) { -/* if (cl.spectator && autocam && locked && cl_chasecam.value && - CVAR_FIXME */ if (cl.spectator && autocam && locked && cl_chasecam->value && spec_track == playernum) return false; @@ -350,8 +338,6 @@ void Cam_Track(usercmd_t *cmd) if (!cl.spectator) return; -/* if (cl_hightrack.value && !locked) - CVAR_FIXME */ if (cl_hightrack->value && !locked) Cam_CheckHighTarget(); @@ -360,8 +346,6 @@ void Cam_Track(usercmd_t *cmd) if (locked && (!cl.players[spec_track].name[0] || cl.players[spec_track].spectator)) { locked = false; -/* if (cl_hightrack.value) - CVAR_FIXME */ if (cl_hightrack->value) Cam_CheckHighTarget(); else @@ -386,8 +370,6 @@ void Cam_Track(usercmd_t *cmd) if (!locked || !autocam) return; -/* if (cl_chasecam.value) { - CVAR_FIXME */ if (cl_chasecam->value) { cmd->forwardmove = cmd->sidemove = cmd->upmove = 0; @@ -488,11 +470,7 @@ void Cam_SetView(void) vectoangles(vec, vec2); vec2[PITCH] = -vec2[PITCH]; -/* cam_viewangles[PITCH] = adjustang(cam_viewangles[PITCH], vec2[PITCH], cl_camera_maxpitch.value); - CVAR_FIXME */ cam_viewangles[PITCH] = adjustang(cam_viewangles[PITCH], vec2[PITCH], cl_camera_maxpitch->value); -/* cam_viewangles[YAW] = adjustang(cam_viewangles[YAW], vec2[YAW], cl_camera_maxyaw.value); - CVAR_FIXME */ cam_viewangles[YAW] = adjustang(cam_viewangles[YAW], vec2[YAW], cl_camera_maxyaw->value); } VectorCopy(cam_viewangles, cl.viewangles); @@ -527,11 +505,7 @@ void Cam_FinishMove(usercmd_t *cmd) vectoangles(vec, vec2); vec2[PITCH] = -vec2[PITCH]; -/* cam_viewangles[PITCH] = adjustang(cam_viewangles[PITCH], vec2[PITCH], cl_camera_maxpitch.value); - CVAR_FIXME */ cam_viewangles[PITCH] = adjustang(cam_viewangles[PITCH], vec2[PITCH], cl_camera_maxpitch->value); -/* cam_viewangles[YAW] = adjustang(cam_viewangles[YAW], vec2[YAW], cl_camera_maxyaw.value); - CVAR_FIXME */ cam_viewangles[YAW] = adjustang(cam_viewangles[YAW], vec2[YAW], cl_camera_maxyaw->value); } VectorCopy(cam_viewangles, cl.viewangles); @@ -557,8 +531,6 @@ void Cam_FinishMove(usercmd_t *cmd) return; } -/* if (autocam && cl_hightrack.value) { - CVAR_FIXME */ if (autocam && cl_hightrack->value) { Cam_CheckHighTarget(); return; @@ -609,17 +581,9 @@ void Cam_Reset(void) void CL_InitCam(void) { -/* Cvar_RegisterVariable (&cl_hightrack); - CVAR_FIXME */ cl_hightrack = Cvar_Get("cl_hightrack", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_chasecam); - CVAR_FIXME */ cl_chasecam = Cvar_Get("cl_chasecam", "0", CVAR_NONE, "None"); -/* // Cvar_RegisterVariable (&cl_camera_maxpitch); - CVAR_FIXME */ cl_camera_maxpitch = Cvar_Get("cl_camera_maxpitch", "10", CVAR_NONE, "None"); -/* // Cvar_RegisterVariable (&cl_camera_maxyaw); - CVAR_FIXME */ cl_camera_maxyaw = Cvar_Get("cl_camera_maxyaw", "30", CVAR_NONE, "None"); } diff --git a/source/cl_ents.c b/source/cl_ents.c index 4942c78..50385ec 100644 --- a/source/cl_ents.c +++ b/source/cl_ents.c @@ -44,18 +44,10 @@ #include "pmove.h" #include "view.h" -/* extern cvar_t cl_predict_players; - CVAR_FIXME */ extern cvar_t *cl_predict_players; -/* extern cvar_t cl_predict_players2; - CVAR_FIXME */ extern cvar_t *cl_predict_players2; -/* extern cvar_t cl_solid_players; - CVAR_FIXME */ extern cvar_t *cl_solid_players; -/* extern cvar_t gl_flashblend; - CVAR_FIXME */ extern cvar_t *gl_flashblend; static struct predicted_player { @@ -903,8 +895,6 @@ void CL_LinkPlayers (void) // only predict half the move to minimize overruns msec = 500*(playertime - state->state_time); -/* if (msec <= 0 || (!cl_predict_players.value && !cl_predict_players2.value)) - CVAR_FIXME */ if (msec <= 0 || (!cl_predict_players->value && !cl_predict_players2->value)) { VectorCopy (state->origin, ent->origin); @@ -1026,8 +1016,6 @@ void CL_SetUpPlayerPrediction(qboolean dopred) // only predict half the move to minimize overruns msec = 500*(playertime - state->state_time); if (msec <= 0 || -/* (!cl_predict_players.value && !cl_predict_players2.value) || - CVAR_FIXME */ (!cl_predict_players->value && !cl_predict_players2->value) || !dopred) { @@ -1067,8 +1055,6 @@ void CL_SetSolidPlayers (int playernum) struct predicted_player *pplayer; physent_t *pent; -/* if (!cl_solid_players.value) - CVAR_FIXME */ if (!cl_solid_players->value) return; diff --git a/source/cl_input.c b/source/cl_input.c index abf3afa..1ea58d8 100644 --- a/source/cl_input.c +++ b/source/cl_input.c @@ -238,32 +238,16 @@ float CL_KeyState (kbutton_t *key) //========================================================================== -/* cvar_t cl_upspeed = {"cl_upspeed","200"}; - CVAR_FIXME */ cvar_t *cl_upspeed; -/* cvar_t cl_forwardspeed = {"cl_forwardspeed","200", true}; - CVAR_FIXME */ cvar_t *cl_forwardspeed; -/* cvar_t cl_backspeed = {"cl_backspeed","200", true}; - CVAR_FIXME */ cvar_t *cl_backspeed; -/* cvar_t cl_sidespeed = {"cl_sidespeed","350"}; - CVAR_FIXME */ cvar_t *cl_sidespeed; -/* cvar_t cl_movespeedkey = {"cl_movespeedkey","2.0"}; - CVAR_FIXME */ cvar_t *cl_movespeedkey; -/* cvar_t cl_yawspeed = {"cl_yawspeed","140"}; - CVAR_FIXME */ cvar_t *cl_yawspeed; -/* cvar_t cl_pitchspeed = {"cl_pitchspeed","150"}; - CVAR_FIXME */ cvar_t *cl_pitchspeed; -/* cvar_t cl_anglespeedkey = {"cl_anglespeedkey","1.5"}; - CVAR_FIXME */ cvar_t *cl_anglespeedkey; @@ -280,41 +264,27 @@ void CL_AdjustAngles (void) float up, down; if (in_speed.state & 1) -/* speed = host_frametime * cl_anglespeedkey.value; - CVAR_FIXME */ speed = host_frametime * cl_anglespeedkey->value; else speed = host_frametime; if (!(in_strafe.state & 1)) { -/* cl.viewangles[YAW] -= speed*cl_yawspeed.value*CL_KeyState (&in_right); - CVAR_FIXME */ cl.viewangles[YAW] -= speed*cl_yawspeed->value*CL_KeyState (&in_right); -/* cl.viewangles[YAW] += speed*cl_yawspeed.value*CL_KeyState (&in_left); - CVAR_FIXME */ cl.viewangles[YAW] += speed*cl_yawspeed->value*CL_KeyState (&in_left); cl.viewangles[YAW] = anglemod(cl.viewangles[YAW]); } if (in_klook.state & 1) { V_StopPitchDrift (); -/* cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * CL_KeyState (&in_forward); - CVAR_FIXME */ cl.viewangles[PITCH] -= speed*cl_pitchspeed->value * CL_KeyState (&in_forward); -/* cl.viewangles[PITCH] += speed*cl_pitchspeed.value * CL_KeyState (&in_back); - CVAR_FIXME */ cl.viewangles[PITCH] += speed*cl_pitchspeed->value * CL_KeyState (&in_back); } up = CL_KeyState (&in_lookup); down = CL_KeyState(&in_lookdown); -/* cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * up; - CVAR_FIXME */ cl.viewangles[PITCH] -= speed*cl_pitchspeed->value * up; -/* cl.viewangles[PITCH] += speed*cl_pitchspeed.value * down; - CVAR_FIXME */ cl.viewangles[PITCH] += speed*cl_pitchspeed->value * down; if (up || down) @@ -348,35 +318,19 @@ void CL_BaseMove (usercmd_t *cmd) VectorCopy (cl.viewangles, cmd->angles); if (in_strafe.state & 1) { -/* cmd->sidemove += cl_sidespeed.value * CL_KeyState (&in_right); - CVAR_FIXME */ cmd->sidemove += cl_sidespeed->value * CL_KeyState (&in_right); -/* cmd->sidemove -= cl_sidespeed.value * CL_KeyState (&in_left); - CVAR_FIXME */ cmd->sidemove -= cl_sidespeed->value * CL_KeyState (&in_left); } -/* cmd->sidemove += cl_sidespeed.value * CL_KeyState (&in_moveright); - CVAR_FIXME */ cmd->sidemove += cl_sidespeed->value * CL_KeyState (&in_moveright); -/* cmd->sidemove -= cl_sidespeed.value * CL_KeyState (&in_moveleft); - CVAR_FIXME */ cmd->sidemove -= cl_sidespeed->value * CL_KeyState (&in_moveleft); -/* cmd->upmove += cl_upspeed.value * CL_KeyState (&in_up); - CVAR_FIXME */ cmd->upmove += cl_upspeed->value * CL_KeyState (&in_up); -/* cmd->upmove -= cl_upspeed.value * CL_KeyState (&in_down); - CVAR_FIXME */ cmd->upmove -= cl_upspeed->value * CL_KeyState (&in_down); if (! (in_klook.state & 1) ) { -/* cmd->forwardmove += cl_forwardspeed.value * CL_KeyState (&in_forward); - CVAR_FIXME */ cmd->forwardmove += cl_forwardspeed->value * CL_KeyState (&in_forward); -/* cmd->forwardmove -= cl_backspeed.value * CL_KeyState (&in_back); - CVAR_FIXME */ cmd->forwardmove -= cl_backspeed->value * CL_KeyState (&in_back); } @@ -385,14 +339,8 @@ void CL_BaseMove (usercmd_t *cmd) // if (in_speed.state & 1) { -/* cmd->forwardmove *= cl_movespeedkey.value; - CVAR_FIXME */ cmd->forwardmove *= cl_movespeedkey->value; -/* cmd->sidemove *= cl_movespeedkey.value; - CVAR_FIXME */ cmd->sidemove *= cl_movespeedkey->value; -/* cmd->upmove *= cl_movespeedkey.value; - CVAR_FIXME */ cmd->upmove *= cl_movespeedkey->value; } } @@ -537,8 +485,6 @@ void CL_SendCmd (void) if (cls.netchan.outgoing_sequence - cl.validsequence >= UPDATE_BACKUP-1) cl.validsequence = 0; -/* if (cl.validsequence && !cl_nodelta.value && cls.state == ca_active && - CVAR_FIXME */ if (cl.validsequence && !cl_nodelta->value && cls.state == ca_active && !cls.demorecording) { diff --git a/source/cl_main.c b/source/cl_main.c index 2f72b1c..8798b80 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -75,71 +75,33 @@ qboolean noclip_anglehack; // remnant from old quake cvar_t *fs_globalcfg; -/* cvar_t rcon_password = {"rcon_password", "", false}; - CVAR_FIXME */ cvar_t *rcon_password; -/* cvar_t rcon_address = {"rcon_address", ""}; - CVAR_FIXME */ cvar_t *rcon_address; -/* cvar_t cl_timeout = {"cl_timeout", "60"}; - CVAR_FIXME */ cvar_t *cl_timeout; -/* cvar_t cl_shownet = {"cl_shownet","0"}; // can be 0, 1, or 2 - CVAR_FIXME */ cvar_t *cl_shownet; // can be 0, 1, or 2 cvar_t *cl_autoexec; -/* cvar_t cl_sbar = {"cl_sbar", "0", true}; - CVAR_FIXME */ cvar_t *cl_sbar; -/* cvar_t cl_hudswap = {"cl_hudswap", "0", true}; - CVAR_FIXME */ cvar_t *cl_hudswap; -/* cvar_t cl_maxfps = {"cl_maxfps", "0", true}; - CVAR_FIXME */ cvar_t *cl_maxfps; -/* cvar_t lookspring = {"lookspring","0", true}; - CVAR_FIXME */ cvar_t *lookspring; -/* cvar_t lookstrafe = {"lookstrafe","0", true}; - CVAR_FIXME */ cvar_t *lookstrafe; -/* cvar_t sensitivity = {"sensitivity","3", true}; - CVAR_FIXME */ cvar_t *sensitivity; cvar_t *cl_freelook; -/* cvar_t m_pitch = {"m_pitch","0.022", true}; - CVAR_FIXME */ cvar_t *m_pitch; -/* cvar_t m_yaw = {"m_yaw","0.022"}; - CVAR_FIXME */ cvar_t *m_yaw; -/* cvar_t m_forward = {"m_forward","1"}; - CVAR_FIXME */ cvar_t *m_forward; -/* cvar_t m_side = {"m_side","0.8"}; - CVAR_FIXME */ cvar_t *m_side; -/* cvar_t entlatency = {"entlatency", "20"}; - CVAR_FIXME */ cvar_t *entlatency; -/* cvar_t cl_predict_players = {"cl_predict_players", "1"}; - CVAR_FIXME */ cvar_t *cl_predict_players; -/* cvar_t cl_predict_players2 = {"cl_predict_players2", "1"}; - CVAR_FIXME */ cvar_t *cl_predict_players2; -/* cvar_t cl_solid_players = {"cl_solid_players", "1"}; - CVAR_FIXME */ cvar_t *cl_solid_players; -/* cvar_t localid = {"localid", ""}; - CVAR_FIXME */ cvar_t *localid; static qboolean allowremotecmd = true; @@ -147,39 +109,17 @@ static qboolean allowremotecmd = true; // // info mirrors // -/* cvar_t password = {"password", "", false, true}; - CVAR_FIXME */ cvar_t *password; -/* cvar_t spectator = {"spectator", "", false, true}; - CVAR_FIXME */ cvar_t *spectator; -/* cvar_t name = {"name","unnamed", true, true}; - CVAR_FIXME */ cvar_t *name; -/* cvar_t team = {"team","", true, true}; - CVAR_FIXME */ cvar_t *team; -/* cvar_t skin = {"skin","", true, true}; - CVAR_FIXME */ cvar_t *skin; -/* cvar_t topcolor = {"topcolor","0", true, true}; - CVAR_FIXME */ cvar_t *topcolor; -/* cvar_t bottomcolor = {"bottomcolor","0", true, true}; - CVAR_FIXME */ cvar_t *bottomcolor; -/* cvar_t rate = {"rate","2500", true, true}; - CVAR_FIXME */ cvar_t *rate; -/* cvar_t noaim = {"noaim","0", true, true}; - CVAR_FIXME */ cvar_t *noaim; -/* cvar_t msg = {"msg","1", true, true}; - CVAR_FIXME */ cvar_t *msg; -/* extern cvar_t cl_hightrack; - CVAR_FIXME */ extern cvar_t *cl_hightrack; client_static_t cls; @@ -217,14 +157,8 @@ byte *host_colormap; netadr_t master_adr; // address of the master server -/* cvar_t host_speeds = {"host_speeds","0"}; // set for running times - CVAR_FIXME */ cvar_t *host_speeds; // set for running times -/* cvar_t show_fps = {"show_fps","0"}; // set for running times - CVAR_FIXME */ cvar_t *show_fps; // set for running times -/* cvar_t developer = {"developer","0"}; - CVAR_FIXME */ cvar_t *developer; int fps_count; @@ -1110,8 +1044,6 @@ void CL_ReadPackets (void) // check timeout // if (cls.state >= ca_connected -/* && realtime - cls.netchan.last_received > cl_timeout.value) - CVAR_FIXME */ && realtime - cls.netchan.last_received > cl_timeout->value) { Con_Printf ("\nServer connection timed out.\n"); @@ -1270,152 +1202,64 @@ void CL_Init (void) void CL_InitCvars (void) { -/* extern cvar_t baseskin; - CVAR_FIXME */ extern cvar_t *baseskin; -/* extern cvar_t noskins; - CVAR_FIXME */ extern cvar_t *noskins; -/* Cvar_RegisterVariable (&show_fps); - CVAR_FIXME */ show_fps = Cvar_Get("show_fps", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&host_speeds); - CVAR_FIXME */ host_speeds = Cvar_Get("host_speeds", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&developer); - CVAR_FIXME */ developer = Cvar_Get("developer", "0", CVAR_NONE, "None"); cl_autoexec = Cvar_Get ("cl_autoexec","0",CVAR_ROM,"exec autoexec.cfg on gamedir change"); cl_warncmd = Cvar_Get("cl_warncmd", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_upspeed); - CVAR_FIXME */ cl_upspeed = Cvar_Get("cl_upspeed", "200", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_forwardspeed); - CVAR_FIXME */ cl_forwardspeed = Cvar_Get("cl_forwardspeed", "200", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&cl_backspeed); - CVAR_FIXME */ cl_backspeed = Cvar_Get("cl_backspeed", "200", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&cl_sidespeed); - CVAR_FIXME */ cl_sidespeed = Cvar_Get("cl_sidespeed", "350", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_movespeedkey); - CVAR_FIXME */ cl_movespeedkey = Cvar_Get("cl_movespeedkey", "2.0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_yawspeed); - CVAR_FIXME */ cl_yawspeed = Cvar_Get("cl_yawspeed", "140", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_pitchspeed); - CVAR_FIXME */ cl_pitchspeed = Cvar_Get("cl_pitchspeed", "150", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_anglespeedkey); - CVAR_FIXME */ cl_anglespeedkey = Cvar_Get("cl_anglespeedkey", "1.5", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_shownet); - CVAR_FIXME */ cl_shownet = Cvar_Get("cl_shownet", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_sbar); - CVAR_FIXME */ cl_sbar = Cvar_Get("cl_sbar", "0", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&cl_hudswap); - CVAR_FIXME */ cl_hudswap = Cvar_Get("cl_hudswap", "0", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&cl_maxfps); - CVAR_FIXME */ cl_maxfps = Cvar_Get("cl_maxfps", "0", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&cl_timeout); - CVAR_FIXME */ cl_timeout = Cvar_Get("cl_timeout", "60", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&lookspring); - CVAR_FIXME */ lookspring = Cvar_Get("lookspring", "0", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&lookstrafe); - CVAR_FIXME */ lookstrafe = Cvar_Get("lookstrafe", "0", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&sensitivity); - CVAR_FIXME */ sensitivity = Cvar_Get("sensitivity", "3", CVAR_ARCHIVE, "None"); cl_freelook = Cvar_Get("freelook", "0", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&m_pitch); - CVAR_FIXME */ m_pitch = Cvar_Get("m_pitch", "0.022", CVAR_ARCHIVE, "None"); -/* Cvar_RegisterVariable (&m_yaw); - CVAR_FIXME */ m_yaw = Cvar_Get("m_yaw", "0.022", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&m_forward); - CVAR_FIXME */ m_forward = Cvar_Get("m_forward", "1", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&m_side); - CVAR_FIXME */ m_side = Cvar_Get("m_side", "0.8", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&rcon_password); - CVAR_FIXME */ rcon_password = Cvar_Get("rcon_password", "", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&rcon_address); - CVAR_FIXME */ rcon_address = Cvar_Get("rcon_address", "", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&entlatency); - CVAR_FIXME */ entlatency = Cvar_Get("entlatency", "20", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_predict_players2); - CVAR_FIXME */ cl_predict_players2 = Cvar_Get("cl_predict_players2", "1", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_predict_players); - CVAR_FIXME */ cl_predict_players = Cvar_Get("cl_predict_players", "1", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_solid_players); - CVAR_FIXME */ cl_solid_players = Cvar_Get("cl_solid_players", "1", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&localid); - CVAR_FIXME */ localid = Cvar_Get("localid", "", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&baseskin); - CVAR_FIXME */ baseskin = Cvar_Get("baseskin", "base", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&noskins); - CVAR_FIXME */ noskins = Cvar_Get("noskins", "0", CVAR_NONE, "None"); // // info mirrors // -/* Cvar_RegisterVariable (&name); - CVAR_FIXME */ name = Cvar_Get("name", "unnamed", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&password); - CVAR_FIXME */ password = Cvar_Get("password", "", CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&spectator); - CVAR_FIXME */ spectator = Cvar_Get("spectator", "", CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&skin); - CVAR_FIXME */ skin = Cvar_Get("skin", "", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&team); - CVAR_FIXME */ team = Cvar_Get("team", "", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&topcolor); - CVAR_FIXME */ topcolor = Cvar_Get("topcolor", "0", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&bottomcolor); - CVAR_FIXME */ bottomcolor = Cvar_Get("bottomcolor", "0", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&rate); - CVAR_FIXME */ rate = Cvar_Get("rate", "2500", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&msg); - CVAR_FIXME */ msg = Cvar_Get("msg", "1", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); -/* Cvar_RegisterVariable (&noaim); - CVAR_FIXME */ noaim = Cvar_Get("noaim", "0", CVAR_ARCHIVE|CVAR_SERVERINFO|CVAR_USERINFO, "None"); } @@ -1520,15 +1364,9 @@ qboolean Host_SimulationTime(float time) if (oldrealtime > realtime) oldrealtime = 0; -/* if (cl_maxfps.value) - CVAR_FIXME */ if (cl_maxfps->value) -/* fps = max(30.0, min(cl_maxfps.value, 72.0)); - CVAR_FIXME */ fps = max(30.0, min(cl_maxfps->value, 72.0)); else -/* fps = max(30.0, min(rate.value/80.0, 72.0)); - CVAR_FIXME */ fps = max(30.0, min(rate->value/80.0, 72.0)); if (!cls.timedemo && (realtime + time) - oldrealtime < 1.0/fps) @@ -1561,15 +1399,9 @@ void Host_Frame (float time) if (oldrealtime > realtime) oldrealtime = 0; -/* if (cl_maxfps.value) - CVAR_FIXME */ if (cl_maxfps->value) -/* fps = max(30.0, min(cl_maxfps.value, 72.0)); - CVAR_FIXME */ fps = max(30.0, min(cl_maxfps->value, 72.0)); else -/* fps = max(30.0, min(rate.value/80.0, 72.0)); - CVAR_FIXME */ fps = max(30.0, min(rate->value/80.0, 72.0)); if (!cls.timedemo && realtime - oldrealtime < 1.0/fps) @@ -1612,15 +1444,11 @@ void Host_Frame (float time) CL_EmitEntities (); // update video -/* if (host_speeds.value) - CVAR_FIXME */ if (host_speeds->value) time1 = Sys_DoubleTime (); SCR_UpdateScreen (); -/* if (host_speeds.value) - CVAR_FIXME */ if (host_speeds->value) time2 = Sys_DoubleTime (); @@ -1635,8 +1463,6 @@ void Host_Frame (float time) CDAudio_Update(); -/* if (host_speeds.value) - CVAR_FIXME */ if (host_speeds->value) { pass1 = (time1 - time3)*1000; diff --git a/source/cl_parse.c b/source/cl_parse.c index 36e7fde..cb7ee12 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -41,8 +41,6 @@ #include "pmove.h" #include "sbar.h" -/* extern cvar_t gl_flashblend; - CVAR_FIXME */ extern cvar_t *gl_flashblend; extern cvar_t *cl_autoexec; @@ -1037,8 +1035,6 @@ void CL_MuzzleFlash (void) return; // don't draw our own muzzle flash in gl if flashblending -/* if (i-1 == cl.playernum && gl_flashblend.value) - CVAR_FIXME */ if (i-1 == cl.playernum && gl_flashblend->value) return; @@ -1059,8 +1055,6 @@ void CL_MuzzleFlash (void) } -/* #define SHOWNET(x) if(cl_shownet.value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x); - CVAR_FIXME */ #define SHOWNET(x) if(cl_shownet->value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x); /* ===================== @@ -1081,12 +1075,8 @@ void CL_ParseServerMessage (void) // // if recording demos, copy the message out // -/* if (cl_shownet.value == 1) - CVAR_FIXME */ if (cl_shownet->value == 1) Con_Printf ("%i ",net_message.cursize); -/* else if (cl_shownet.value == 2) - CVAR_FIXME */ else if (cl_shownet->value == 2) Con_Printf ("------------------\n"); diff --git a/source/cl_sys_unix.c b/source/cl_sys_unix.c index 0209806..8ee79bb 100644 --- a/source/cl_sys_unix.c +++ b/source/cl_sys_unix.c @@ -53,8 +53,6 @@ qboolean is_server = false; #define BASEDIR "." -/* cvar_t sys_linerefresh = {"sys_linerefresh","0"};// set for entity display - CVAR_FIXME */ cvar_t *sys_linerefresh;// set for entity display @@ -237,7 +235,7 @@ int main (int c, char **v) parms.memsize = (int) (atof(com_argv[j+1]) * 1024 * 1024); parms.membase = malloc (parms.memsize); if (!parms.membase) { - printf("Can't allocate memroy for zone.\n"); + printf("Can't allocate memory for zone.\n"); return 1; } diff --git a/source/com.c b/source/com.c index cade9ea..b8a5807 100644 --- a/source/com.c +++ b/source/com.c @@ -106,8 +106,6 @@ void COM_Init (void) LittleFloat = FloatSwap; #endif -/* Cvar_RegisterVariable (®istered); - CVAR_FIXME */ registered = Cvar_Get("registered", "0", CVAR_NONE, "None"); Cmd_AddCommand ("path", COM_Path_f); diff --git a/source/console.c b/source/console.c index 35887c9..cc2aa49 100644 --- a/source/console.c +++ b/source/console.c @@ -54,8 +54,6 @@ int con_totallines; // total lines in console scrollback float con_cursorspeed = 4; -/* cvar_t con_notifytime = {"con_notifytime","3"}; //seconds - CVAR_FIXME */ cvar_t *con_notifytime; //seconds #define NUM_CON_TIMES 4 @@ -268,8 +266,6 @@ void Con_Init (void) // // register our commands // -/* Cvar_RegisterVariable (&con_notifytime); - CVAR_FIXME */ con_notifytime = Cvar_Get("con_notifytime", "3", CVAR_NONE, "None"); Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f); @@ -433,8 +429,6 @@ void Con_DPrintf (char *fmt, ...) va_list argptr; char msg[MAXPRINTMSG]; -/* if (!developer.value) - CVAR_FIXME */ if (!developer->value) return; // don't confuse non-developers with techie stuff... @@ -518,8 +512,6 @@ void Con_DrawNotify (void) if (time == 0) continue; time = realtime - time; -/* if (time > con_notifytime.value) - CVAR_FIXME */ if (time > con_notifytime->value) continue; text = con->text + (i % con_totallines)*con_linewidth; diff --git a/source/d_edge.c b/source/d_edge.c index 08a53f4..b54fe8c 100644 --- a/source/d_edge.c +++ b/source/d_edge.c @@ -194,8 +194,6 @@ void D_DrawSurfaces (void) VectorCopy (transformed_modelorg, world_transformed_modelorg); // TODO: could preset a lot of this at mode set time -/* if (r_drawflat.value) - CVAR_FIXME */ if (r_drawflat->value) { for (s = &surfaces[1] ; svalue & 0xFF); D_DrawZSpans (s->spans); } diff --git a/source/d_init.c b/source/d_init.c index eee0629..18d7c01 100644 --- a/source/d_init.c +++ b/source/d_init.c @@ -34,14 +34,8 @@ #define NUM_MIPS 4 -/* cvar_t d_subdiv16 = {"d_subdiv16", "1"}; - CVAR_FIXME */ cvar_t *d_subdiv16; -/* cvar_t d_mipcap = {"d_mipcap", "0"}; - CVAR_FIXME */ cvar_t *d_mipcap; -/* cvar_t d_mipscale = {"d_mipscale", "1"}; - CVAR_FIXME */ cvar_t *d_mipscale; surfcache_t *d_initial_rover; @@ -66,14 +60,8 @@ void D_Init (void) r_skydirect = 1; -/* Cvar_RegisterVariable (&d_subdiv16); - CVAR_FIXME */ d_subdiv16 = Cvar_Get("d_subdiv16", "1", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&d_mipcap); - CVAR_FIXME */ d_mipcap = Cvar_Get("d_mipcap", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&d_mipscale); - CVAR_FIXME */ d_mipscale = Cvar_Get("d_mipscale", "1", CVAR_NONE, "None"); r_drawpolys = false; @@ -159,22 +147,12 @@ void D_SetupFrame (void) d_roverwrapped = false; d_initial_rover = sc_rover; -/* d_minmip = d_mipcap.value; - CVAR_FIXME */ - d_minmip = d_mipcap->value; - if (d_minmip > 3) - d_minmip = 3; - else if (d_minmip < 0) - d_minmip = 0; + d_minmip = bound(0, d_mipcap->value, 3); for (i=0 ; i<(NUM_MIPS-1) ; i++) -/* d_scalemip[i] = basemip[i] * d_mipscale.value; - CVAR_FIXME */ d_scalemip[i] = basemip[i] * d_mipscale->value; #ifdef USE_INTEL_ASM -/* if (d_subdiv16.value) - CVAR_FIXME */ if (d_subdiv16->value) d_drawspans = D_DrawSpans16; else diff --git a/source/draw.c b/source/draw.c index 3321ffd..cbba3df 100644 --- a/source/draw.c +++ b/source/draw.c @@ -51,8 +51,6 @@ byte *draw_chars; // 8*8 graphic characters qpic_t *draw_disc; qpic_t *draw_backtile; -/* cvar_t cl_verstring = {"cl_verstring", "QuakeForge " QF_VERSION}; - CVAR_FIXME */ cvar_t *cl_verstring; //============================================================================= @@ -136,8 +134,6 @@ void Draw_Init (void) r_rectdesc.ptexbytes = draw_backtile->data; r_rectdesc.rowbytes = draw_backtile->width; -/* Cvar_RegisterVariable (&cl_verstring); - CVAR_FIXME */ cl_verstring = Cvar_Get("cl_verstring", PROGRAM " " VERSION, CVAR_NONE, "None"); } @@ -293,22 +289,12 @@ void Draw_Pixel(int x, int y, byte color) void Draw_Crosshair(void) { int x, y; -/* extern cvar_t crosshair, cl_crossx, cl_crossy, crosshaircolor; - CVAR_FIXME */ extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor; extern vrect_t scr_vrect; -/* byte c = (byte)crosshaircolor.value; - CVAR_FIXME */ byte c = (byte)crosshaircolor->value; -/* if (crosshair.value == 2) { - CVAR_FIXME */ if (crosshair->value == 2) { -/* x = scr_vrect.x + scr_vrect.width/2 + cl_crossx.value; - CVAR_FIXME */ x = scr_vrect.x + scr_vrect.width/2 + cl_crossx->value; -/* y = scr_vrect.y + scr_vrect.height/2 + cl_crossy.value; - CVAR_FIXME */ y = scr_vrect.y + scr_vrect.height/2 + cl_crossy->value; Draw_Pixel(x - 1, y, c); Draw_Pixel(x - 3, y, c); @@ -318,15 +304,9 @@ void Draw_Crosshair(void) Draw_Pixel(x, y - 3, c); Draw_Pixel(x, y + 1, c); Draw_Pixel(x, y + 3, c); -/* } else if (crosshair.value) - CVAR_FIXME */ } else if (crosshair->value) Draw_Character ( -/* scr_vrect.x + scr_vrect.width/2-4 + cl_crossx.value, - CVAR_FIXME */ scr_vrect.x + scr_vrect.width/2-4 + cl_crossx->value, -/* scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value, - CVAR_FIXME */ scr_vrect.y + scr_vrect.height/2-4 + cl_crossy->value, '+'); }