From e4c9ccff8feaef37beee3fa6a664ffbce8dda2c2 Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Sat, 30 Sep 2000 04:08:40 +0000 Subject: [PATCH] Cvar audit 1, all unused cvars are gone, with the exception of software rendering, and the server. --- include/glquake.h | 3 --- include/r_local.h | 1 - include/view.h | 1 - source/cl_main.c | 2 -- source/cl_sys_sdl.c | 1 - source/cl_sys_unix.c | 2 -- source/gl_draw.c | 3 --- source/gl_rmain.c | 5 ----- source/gl_rmisc.c | 3 --- source/gl_screen.c | 4 ---- source/in_svgalib.c | 4 ---- source/qargs.c | 1 - source/r_main.c | 2 -- source/r_misc.c | 10 ---------- source/r_surf.c | 2 +- source/r_view.c | 2 -- source/snd_dma.c | 2 -- source/vid_3dfxsvga.c | 11 ----------- source/vid_glx.c | 2 -- source/vid_mgl.c | 13 ------------- source/vid_sgl.c | 7 ------- source/vid_wgl.c | 22 ---------------------- 22 files changed, 1 insertion(+), 102 deletions(-) diff --git a/include/glquake.h b/include/glquake.h index 18eaf59..e7eeadc 100644 --- a/include/glquake.h +++ b/include/glquake.h @@ -192,8 +192,6 @@ extern cvar_t *r_drawworld; extern cvar_t *r_drawviewmodel; extern cvar_t *r_speeds; extern cvar_t *r_waterwarp; -extern cvar_t *r_fullbright; -extern cvar_t *r_lightmap; extern cvar_t *r_shadows; extern cvar_t *r_wateralpha; extern cvar_t *r_waterripple; @@ -210,7 +208,6 @@ extern cvar_t *gl_smoothdlights; extern cvar_t *gl_affinemodels; extern cvar_t *gl_polyblend; extern cvar_t *gl_keeptjunctions; -extern cvar_t *gl_reporttjunctions; extern cvar_t *gl_flashblend; extern cvar_t *gl_nocolors; extern cvar_t *gl_particles; diff --git a/include/r_local.h b/include/r_local.h index 94f0e25..1efaac6 100644 --- a/include/r_local.h +++ b/include/r_local.h @@ -74,7 +74,6 @@ extern cvar_t *r_timegraph; extern cvar_t *r_graphheight; extern cvar_t *r_clearcolor; extern cvar_t *r_waterwarp; -extern cvar_t *r_fullbright; extern cvar_t *r_drawentities; extern cvar_t *r_aliasstats; extern cvar_t *r_dspeeds; diff --git a/include/view.h b/include/view.h index 1028ac7..9789c06 100644 --- a/include/view.h +++ b/include/view.h @@ -35,7 +35,6 @@ extern cvar_t *brightness; extern cvar_t *contrast; -extern cvar_t *lcd_x; void V_Init (void); void V_RenderView (void); diff --git a/source/cl_main.c b/source/cl_main.c index 9eb213d..415e6a9 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -112,7 +112,6 @@ cvar_t *m_yaw; cvar_t *m_forward; cvar_t *m_side; -cvar_t *entlatency; cvar_t *cl_predict_players; cvar_t *cl_predict_players2; cvar_t *cl_solid_players; @@ -1256,7 +1255,6 @@ void CL_InitCvars (void) rcon_password = Cvar_Get("rcon_password", "", CVAR_NONE, "None"); rcon_address = Cvar_Get("rcon_address", "", CVAR_NONE, "None"); - entlatency = Cvar_Get("entlatency", "20", CVAR_NONE, "None"); cl_predict_players2 = Cvar_Get("cl_predict_players2", "1", CVAR_NONE, "None"); cl_predict_players = Cvar_Get("cl_predict_players", "1", CVAR_NONE, "None"); cl_solid_players = Cvar_Get("cl_solid_players", "1", CVAR_NONE, "None"); diff --git a/source/cl_sys_sdl.c b/source/cl_sys_sdl.c index 29fc81d..9f17b52 100644 --- a/source/cl_sys_sdl.c +++ b/source/cl_sys_sdl.c @@ -63,7 +63,6 @@ #include "client.h" qboolean is_server = false; -extern cvar_t *sys_nostd_out; int starttime; diff --git a/source/cl_sys_unix.c b/source/cl_sys_unix.c index 8386ba1..c57c162 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;// set for entity display - // ======================================================================= // General routines diff --git a/source/gl_draw.c b/source/gl_draw.c index dedc02f..de230b1 100644 --- a/source/gl_draw.c +++ b/source/gl_draw.c @@ -63,7 +63,6 @@ extern byte *host_basepal; extern unsigned char d_15to8table[65536]; extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor; -cvar_t *gl_nobind; cvar_t *gl_max_size; cvar_t *gl_picmip; @@ -403,8 +402,6 @@ void Draw_Init (void) // LordHavoc: lighting mode gl_lightmode = Cvar_Get("gl_lightmode", "1", CVAR_ARCHIVE, "Lighting mode (0 = GLQuake style, 1 = new style)"); - gl_nobind = Cvar_Get("gl_nobind", "0", CVAR_NONE, - "whether or not to inhibit texture binding"); gl_max_size = Cvar_Get("gl_max_size", "1024", CVAR_NONE, "None"); // CVAR_FIXME - set a description gl_picmip = Cvar_Get("gl_picmip", "0", CVAR_NONE, diff --git a/source/gl_rmain.c b/source/gl_rmain.c index 081a432..932e218 100644 --- a/source/gl_rmain.c +++ b/source/gl_rmain.c @@ -92,8 +92,6 @@ cvar_t *r_norefresh; cvar_t *r_drawentities; cvar_t *r_drawviewmodel; cvar_t *r_speeds; -cvar_t *r_fullbright; -cvar_t *r_lightmap; cvar_t *r_shadows; cvar_t *r_wateralpha; cvar_t *r_waterripple; @@ -112,7 +110,6 @@ cvar_t *gl_flashblend; cvar_t *gl_playermip; cvar_t *gl_nocolors; cvar_t *gl_keeptjunctions; -cvar_t *gl_reporttjunctions; cvar_t *gl_particles; cvar_t *r_skyname; @@ -799,8 +796,6 @@ R_SetupFrame static void R_SetupFrame (void) { // don't allow cheats in multiplayer - Cvar_SetValue (r_fullbright, 0); - Cvar_SetValue (r_lightmap, 0); if (!atoi(Info_ValueForKey(cl.serverinfo, "watervis"))) Cvar_SetValue(r_wateralpha, 1); diff --git a/source/gl_rmisc.c b/source/gl_rmisc.c index 331384d..b457ff3 100644 --- a/source/gl_rmisc.c +++ b/source/gl_rmisc.c @@ -232,8 +232,6 @@ void R_Init (void) Cmd_AddCommand ("r_firecolor", R_FireColor_f); r_norefresh = Cvar_Get("r_norefresh", "0", CVAR_NONE, "None"); - r_lightmap = Cvar_Get("r_lightmap", "0", CVAR_NONE, "None"); - r_fullbright = Cvar_Get("r_fullbright", "0", CVAR_NONE, "None"); r_drawentities = Cvar_Get("r_drawentities", "1", CVAR_NONE, "None"); r_drawviewmodel = Cvar_Get("r_drawviewmodel", "1", CVAR_NONE, "None"); r_shadows = Cvar_Get("r_shadows", "0", CVAR_NONE, "None"); @@ -272,7 +270,6 @@ void R_Init (void) "Toggles fullbright color support for bmodels"); gl_keeptjunctions = Cvar_Get("gl_keeptjunctions", "1", CVAR_NONE, "None"); - gl_reporttjunctions = Cvar_Get("gl_reporttjunctions", "0", CVAR_NONE, "None"); r_skyname = Cvar_Get("r_skyname", "none", CVAR_NONE, "name of the current skybox"); diff --git a/source/gl_screen.c b/source/gl_screen.c index afe44ba..e4c0ddf 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -125,11 +125,9 @@ cvar_t *scr_viewsize; cvar_t *scr_fov; // 10 - 170 cvar_t *scr_conspeed; cvar_t *scr_centertime; -cvar_t *scr_showram; cvar_t *scr_showturtle; cvar_t *scr_showpause; cvar_t *scr_printspeed; -cvar_t *scr_allowsnap; cvar_t *gl_triplebuffer; extern cvar_t *crosshair; @@ -411,12 +409,10 @@ void SCR_InitCvars (void) scr_fov = Cvar_Get("fov", "90", CVAR_NONE, "None"); scr_viewsize = Cvar_Get("viewsize", "100", CVAR_ARCHIVE, "None"); scr_conspeed = Cvar_Get("scr_conspeed", "300", CVAR_NONE, "None"); - scr_showram = Cvar_Get("showram", "1", CVAR_NONE, "None"); scr_showturtle = Cvar_Get("showturtle", "0", CVAR_NONE, "None"); scr_showpause = Cvar_Get("showpause", "1", CVAR_NONE, "None"); scr_centertime = Cvar_Get("scr_centertime", "2", CVAR_NONE, "None"); scr_printspeed = Cvar_Get("scr_printspeed", "8", CVAR_NONE, "None"); - scr_allowsnap = Cvar_Get("scr_allowsnap", "1", CVAR_NONE, "None"); gl_triplebuffer = Cvar_Get("gl_triplebuffer", "1", CVAR_ARCHIVE, "None"); } diff --git a/source/in_svgalib.c b/source/in_svgalib.c index c1f9efc..0b8165a 100644 --- a/source/in_svgalib.c +++ b/source/in_svgalib.c @@ -68,7 +68,6 @@ static void IN_init_mouse(); cvar_t *_windowed_mouse; cvar_t *m_filter; -static cvar_t *mouse_button_commands[3]; static void keyhandler(int scancode, int state) { @@ -245,9 +244,6 @@ static void IN_init_mouse() char *mousedev; int mouserate = MOUSE_DEFAULTSAMPLERATE; - mouse_button_commands[0] = Cvar_Get ("mouse1","+attack",0,"None"); - mouse_button_commands[1] = Cvar_Get ("mouse2","+strafe",0,"None"); - mouse_button_commands[2] = Cvar_Get ("mouse2","+forward",0,"None"); m_filter = Cvar_Get ("m_filter","0",0,"None"); Cmd_AddCommand("force_centerview", Force_CenterView_f); diff --git a/source/qargs.c b/source/qargs.c index 480b198..2bb884d 100644 --- a/source/qargs.c +++ b/source/qargs.c @@ -59,7 +59,6 @@ static char *safeargvs[] = int com_argc; char **com_argv; char *com_cmdline; -cvar_t *cmdline; qboolean nouse = false; // 1999-10-29 +USE fix by Maddes diff --git a/source/r_main.c b/source/r_main.c index d326cc2..64133fa 100644 --- a/source/r_main.c +++ b/source/r_main.c @@ -140,7 +140,6 @@ cvar_t *r_zgraph; cvar_t *r_graphheight; cvar_t *r_clearcolor; cvar_t *r_waterwarp; -cvar_t *r_fullbright; cvar_t *r_drawentities; cvar_t *r_drawviewmodel; cvar_t *r_aliasstats; @@ -231,7 +230,6 @@ void R_Init (void) r_ambient = Cvar_Get("r_ambient", "0", CVAR_NONE, "None"); r_clearcolor = Cvar_Get("r_clearcolor", "2", CVAR_NONE, "None"); r_waterwarp = Cvar_Get("r_waterwarp", "1", CVAR_NONE, "None"); - r_fullbright = Cvar_Get("r_fullbright", "0", CVAR_NONE, "None"); r_drawentities = Cvar_Get("r_drawentities", "1", CVAR_NONE, "None"); r_drawviewmodel = Cvar_Get("r_drawviewmodel", "1", CVAR_NONE, "None"); r_aliasstats = Cvar_Get("r_polymodelstats", "0", CVAR_NONE, "None"); diff --git a/source/r_misc.c b/source/r_misc.c index 2bdccf8..c034080 100644 --- a/source/r_misc.c +++ b/source/r_misc.c @@ -47,15 +47,6 @@ R_CheckVariables */ void R_CheckVariables (void) { -#if 0 - static float oldbright; - - if (r_fullbright->value != oldbright) - { - oldbright = r_fullbright->value; - D_FlushCaches (); // so all lighting changes - } -#endif } @@ -481,7 +472,6 @@ void R_SetupFrame (void) // don't allow cheats in multiplayer Cvar_SetValue(r_draworder, 0); - Cvar_SetValue(r_fullbright, 0); Cvar_SetValue(r_ambient, 0); Cvar_SetValue(r_drawflat, 0); diff --git a/source/r_surf.c b/source/r_surf.c index 411dc02..ccb1120 100644 --- a/source/r_surf.c +++ b/source/r_surf.c @@ -155,7 +155,7 @@ void R_BuildLightMap (void) size = smax*tmax; lightmap = surf->samples; - if (/* r_fullbright->value || */ !cl.worldmodel->lightdata) + if (!cl.worldmodel->lightdata) { for (i=0 ; ivalue) - screenwidth <<= 1; - */ - } @@ -2123,10 +2113,7 @@ void VID_Init (unsigned char *palette) byte *ptmp; vid_mode = Cvar_Get("vid_mode", "0", CVAR_NONE, "None"); - vid_wait = Cvar_Get("vid_wait", "0", CVAR_NONE, "None"); vid_nopageflip = Cvar_Get("vid_nopageflip", "0", CVAR_ARCHIVE, "None"); - _vid_wait_override = Cvar_Get("_vid_wait_override", "0", CVAR_ARCHIVE, "None"); - _vid_default_mode = Cvar_Get("_vid_default_mode", "0", CVAR_ARCHIVE, "None"); _vid_default_mode_win = Cvar_Get("_vid_default_mode_win", "3", CVAR_ARCHIVE, "None"); vid_config_x = Cvar_Get("vid_config_x", "800", CVAR_ARCHIVE, "None"); vid_config_y = Cvar_Get("vid_config_y", "600", CVAR_ARCHIVE, "None"); diff --git a/source/vid_sgl.c b/source/vid_sgl.c index ac0ca5d..f946dae 100644 --- a/source/vid_sgl.c +++ b/source/vid_sgl.c @@ -55,9 +55,7 @@ static qboolean vid_initialized = false; -cvar_t *vid_mode; cvar_t *vid_fullscreen; -extern cvar_t *gl_triplebuffer; extern cvar_t *in_dga_mouseaccel; cvar_t *_windowed_mouse; cvar_t *m_filter; @@ -81,8 +79,6 @@ int texture_extension_number = 1; float gldepthmin, gldepthmax; -cvar_t *gl_ztrick; - const char *gl_vendor; const char *gl_renderer; const char *gl_version; @@ -335,8 +331,6 @@ VID_Init (unsigned char *palette) char gldir[MAX_OSPATH]; int width = 640, height = 480; - vid_mode = Cvar_Get ("vid_mode","0",0,"None"); - gl_ztrick = Cvar_Get ("gl_ztrick","0",CVAR_ARCHIVE,"None"); vid_fullscreen = Cvar_Get ("vid_fullscreen","0",0,"None"); vid.maxwarpwidth = WARP_WIDTH; @@ -437,7 +431,6 @@ VID_Init (unsigned char *palette) void VID_InitCvars() { - gl_triplebuffer = Cvar_Get("gl_triplebuffer","1",CVAR_ARCHIVE,"None"); } /* diff --git a/source/vid_wgl.c b/source/vid_wgl.c index 817f32e..66c1a90 100644 --- a/source/vid_wgl.c +++ b/source/vid_wgl.c @@ -159,15 +159,6 @@ qboolean gl_mtexable = false; //==================================== -cvar_t *vid_mode; -cvar_t *_vid_default_mode; -cvar_t *_vid_default_mode_win; -cvar_t *vid_wait; -cvar_t *vid_nopageflip; -cvar_t *_vid_wait_override; -cvar_t *vid_config_x; -cvar_t *vid_config_y; -cvar_t *vid_stretch_by_2; cvar_t *_windowed_mouse; int window_center_x, window_center_y, window_x, window_y, window_width, window_height; @@ -469,7 +460,6 @@ int VID_SetMode (int modenum, unsigned char *palette) SetForegroundWindow (mainwindow); VID_SetPalette (palette); vid_modenum = modenum; - Cvar_SetValue (vid_mode, (float)vid_modenum); while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { @@ -1591,18 +1581,6 @@ void VID_Init (unsigned char *palette) memset(&devmode, 0, sizeof(devmode)); -// Note that 0 is MODE_WINDOWED - vid_mode = Cvar_Get("vid_mode", "0", CVAR_NONE, "None"); - _vid_default_mode = Cvar_Get("_vid_default_mode", "0", CVAR_ARCHIVE, "None"); -// Note that 3 is MODE_FULLSCREEN_DEFAULT - _vid_default_mode_win = Cvar_Get("_vid_default_mode_win", "3", CVAR_ARCHIVE, "None"); - - vid_wait = Cvar_Get("vid_wait", "0", CVAR_NONE, "None"); - vid_nopageflip = Cvar_Get("vid_nopageflip", "0", CVAR_ARCHIVE, "None"); - _vid_wait_override = Cvar_Get("_vid_wait_override", "0", CVAR_ARCHIVE, "None"); - vid_config_x = Cvar_Get("vid_config_x", "800", CVAR_ARCHIVE, "None"); - vid_config_y = Cvar_Get("vid_config_y", "600", CVAR_ARCHIVE, "None"); - vid_stretch_by_2 = Cvar_Get("vid_stretch_by_2", "1", CVAR_ARCHIVE, "None"); _windowed_mouse = Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE, "None"); Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);