CVAR_FIXME cleanup.

This commit is contained in:
Anton E. Gavrilov 2000-06-10 00:23:56 +00:00
parent df980b44a1
commit a1982a0f75
6 changed files with 5 additions and 151 deletions

View file

@ -50,12 +50,8 @@ void R_CheckVariables (void)
#if 0
static float oldbright;
/* if (r_fullbright.value != oldbright)
CVAR_FIXME */
if (r_fullbright->value != oldbright)
{
/* oldbright = r_fullbright.value;
CVAR_FIXME */
oldbright = r_fullbright->value;
D_FlushCaches (); // so all lighting changes
}
@ -160,8 +156,6 @@ void R_LineGraph (int x, int y, int h)
dest = vid.buffer + vid.rowbytes*y + x;
/* s = r_graphheight.value;
CVAR_FIXME */
s = r_graphheight->value;
if (h == 10000)
@ -212,8 +206,6 @@ void R_TimeGraph (void)
a = (r_time2-r_time1)/0.01;
//a = fabs(mouse_y * 0.05);
/* //a = (int)((r_refdef.vieworg[2] + 1024)/1)%(int)r_graphheight.value;
CVAR_FIXME */
//a = (int)((r_refdef.vieworg[2] + 1024)/1)%(int)r_graphheight->value;
//a = (int)((pmove.velocity[2] + 500)/10);
//a = fabs(velocity[0])/20;
@ -261,12 +253,8 @@ void R_NetGraph (void)
w = NET_TIMINGS;
x = w - ((vid.width - 320)>>1);
/* y = vid.height - sb_lines - 24 - (int)r_graphheight.value*2 - 2;
CVAR_FIXME */
y = vid.height - sb_lines - 24 - (int)r_graphheight->value*2 - 2;
/* M_DrawTextBox (x, y, (w+7)/8, ((int)r_graphheight.value*2+7)/8 + 1);
CVAR_FIXME */
M_DrawTextBox (x, y, (w+7)/8, ((int)r_graphheight->value*2+7)/8 + 1);
y2 = y + 8;
y = vid.height - sb_lines - 8 - 2;
@ -492,21 +480,11 @@ void R_SetupFrame (void)
float w, h;
// don't allow cheats in multiplayer
/* r_draworder.value = 0;
CVAR_FIXME */
r_draworder->value = 0;
/* r_fullbright.value = 0;
CVAR_FIXME */
r_fullbright->value = 0;
/* r_ambient.value = 0;
CVAR_FIXME */
r_ambient->value = 0;
/* r_drawflat.value = 0;
CVAR_FIXME */
r_drawflat->value = 0;
/* if (r_numsurfs.value)
CVAR_FIXME */
if (r_numsurfs->value)
{
if ((surface_p - surfaces) > r_maxsurfsseen)
@ -516,8 +494,6 @@ r_drawflat->value = 0;
surf_max - surfaces, r_maxsurfsseen);
}
/* if (r_numedges.value)
CVAR_FIXME */
if (r_numedges->value)
{
edgecount = edge_p - r_edges;
@ -529,16 +505,12 @@ r_drawflat->value = 0;
r_numallocatededges, r_maxedgesseen);
}
/* r_refdef.ambientlight = r_ambient.value;
CVAR_FIXME */
r_refdef.ambientlight = r_ambient->value;
if (r_refdef.ambientlight < 0)
r_refdef.ambientlight = 0;
// if (!sv.active)
/* r_draworder.value = 0; // don't let cheaters look behind walls
CVAR_FIXME */
r_draworder->value = 0; // don't let cheaters look behind walls
R_CheckVariables ();
@ -570,8 +542,6 @@ r_refdef.viewangles[2]= 0;
r_viewleaf = Mod_PointInLeaf (r_origin, cl.worldmodel);
r_dowarpold = r_dowarp;
/* r_dowarp = r_waterwarp.value && (r_viewleaf->contents <= CONTENTS_WATER);
CVAR_FIXME */
r_dowarp = r_waterwarp->value && (r_viewleaf->contents <= CONTENTS_WATER);
if ((r_dowarp != r_dowarpold) || r_viewchanged)

View file

@ -105,32 +105,14 @@ float scr_conlines; // lines of console to display
float oldscreensize, oldfov;
float oldsbar;
/* cvar_t scr_viewsize = {"viewsize","100", true};
CVAR_FIXME */
cvar_t *scr_viewsize;
/* cvar_t scr_fov = {"fov","90"}; // 10 - 170
CVAR_FIXME */
cvar_t *scr_fov; // 10 - 170
/* cvar_t scr_conspeed = {"scr_conspeed","300"};
CVAR_FIXME */
cvar_t *scr_conspeed;
/* cvar_t scr_centertime = {"scr_centertime","2"};
CVAR_FIXME */
cvar_t *scr_centertime;
/* cvar_t scr_showram = {"showram","1"};
CVAR_FIXME */
cvar_t *scr_showram;
/* cvar_t scr_showturtle = {"showturtle","0"};
CVAR_FIXME */
cvar_t *scr_showturtle;
/* cvar_t scr_showpause = {"showpause","1"};
CVAR_FIXME */
cvar_t *scr_showpause;
/* cvar_t scr_printspeed = {"scr_printspeed","8"};
CVAR_FIXME */
cvar_t *scr_printspeed;
/* cvar_t scr_allowsnap = {"scr_allowsnap", "1"};
CVAR_FIXME */
cvar_t *scr_allowsnap;
qboolean scr_initialized; // ready to draw
@ -186,8 +168,6 @@ for a few moments
void SCR_CenterPrint (char *str)
{
strncpy (scr_centerstring, str, sizeof(scr_centerstring)-1);
/* scr_centertime_off = scr_centertime.value;
CVAR_FIXME */
scr_centertime_off = scr_centertime->value;
scr_centertime_start = cl.time;
@ -230,8 +210,6 @@ void SCR_DrawCenterString (void)
// the finale prints the characters one at a time
if (cl.intermission)
/* remaining = scr_printspeed.value * (cl.time - scr_centertime_start);
CVAR_FIXME */
remaining = scr_printspeed->value * (cl.time - scr_centertime_start);
else
remaining = 9999;
@ -331,12 +309,8 @@ static void SCR_CalcRefdef (void)
//========================================
// bound viewsize
/* if (scr_viewsize.value < 30)
CVAR_FIXME */
if (scr_viewsize->value < 30)
Cvar_Set (scr_viewsize,"30");
/* if (scr_viewsize.value > 120)
CVAR_FIXME */
if (scr_viewsize->value > 120)
Cvar_Set (scr_viewsize,"120");
@ -344,8 +318,6 @@ static void SCR_CalcRefdef (void)
if (cl.intermission)
size = 120;
else
/* size = scr_viewsize.value;
CVAR_FIXME */
size = scr_viewsize->value;
if (size >= 120)
@ -357,17 +329,11 @@ static void SCR_CalcRefdef (void)
r_refdef.vrect.height = vid.height * size;
// bound field of view
/* if (scr_fov.value < 10)
CVAR_FIXME */
if (scr_fov->value < 10)
Cvar_Set (scr_fov,"10");
/* if (scr_fov.value > 170)
CVAR_FIXME */
if (scr_fov->value > 170)
Cvar_Set (scr_fov,"170");
/* r_refdef.fov_x = scr_fov.value;
CVAR_FIXME */
r_refdef.fov_x = scr_fov->value;
r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height);
@ -399,13 +365,9 @@ Keybinding command
*/
void SCR_SizeUp_f (void)
{
/* if (scr_viewsize.value < 120) {
CVAR_FIXME */
if (scr_viewsize->value < 120) {
/* Cvar_SetValue ("viewsize",scr_viewsize.value+10);
CVAR_FIXME */
Cvar_SetValue (scr_viewsize,scr_viewsize->value+10);
vid.recalc_refdef = 1;
Cvar_SetValue (scr_viewsize, scr_viewsize->value+10);
vid.recalc_refdef = 1;
}
}
@ -419,9 +381,7 @@ Keybinding command
*/
void SCR_SizeDown_f (void)
{
/* Cvar_SetValue ("viewsize",scr_viewsize.value-10);
CVAR_FIXME */
Cvar_SetValue (scr_viewsize,scr_viewsize->value-10);
Cvar_SetValue (scr_viewsize, scr_viewsize->value-10);
vid.recalc_refdef = 1;
}
@ -434,32 +394,14 @@ SCR_Init
*/
void SCR_InitCvars (void)
{
/* Cvar_RegisterVariable (&scr_fov);
CVAR_FIXME */
scr_fov = Cvar_Get("fov", "90", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_viewsize);
CVAR_FIXME */
scr_viewsize = Cvar_Get("viewsize", "100", CVAR_ARCHIVE, "None");
/* Cvar_RegisterVariable (&scr_conspeed);
CVAR_FIXME */
scr_conspeed = Cvar_Get("scr_conspeed", "300", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_showram);
CVAR_FIXME */
scr_showram = Cvar_Get("showram", "1", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_showturtle);
CVAR_FIXME */
scr_showturtle = Cvar_Get("showturtle", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_showpause);
CVAR_FIXME */
scr_showpause = Cvar_Get("showpause", "1", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_centertime);
CVAR_FIXME */
scr_centertime = Cvar_Get("scr_centertime", "2", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_printspeed);
CVAR_FIXME */
scr_printspeed = Cvar_Get("scr_printspeed", "8", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&scr_allowsnap);
CVAR_FIXME */
scr_allowsnap = Cvar_Get("scr_allowsnap", "1", CVAR_NONE, "None");
}
@ -490,8 +432,6 @@ SCR_DrawRam
*/
void SCR_DrawRam (void)
{
/* if (!scr_showram.value)
CVAR_FIXME */
if (!scr_showram->value)
return;
@ -510,8 +450,6 @@ void SCR_DrawTurtle (void)
{
static int count;
/* if (!scr_showturtle.value)
CVAR_FIXME */
if (!scr_showturtle->value)
return;
@ -545,8 +483,6 @@ void SCR_DrawNet (void)
void SCR_DrawFPS (void)
{
/* extern cvar_t show_fps;
CVAR_FIXME */
extern cvar_t *show_fps;
static double lastframetime;
double t;
@ -555,8 +491,6 @@ void SCR_DrawFPS (void)
int x, y;
char st[80];
/* if (!show_fps.value)
CVAR_FIXME */
if (!show_fps->value)
return;
@ -582,8 +516,6 @@ void SCR_DrawPause (void)
{
qpic_t *pic;
/* if (!scr_showpause.value) // turn off for screenshots
CVAR_FIXME */
if (!scr_showpause->value) // turn off for screenshots
return;
@ -621,8 +553,6 @@ void SCR_SetUpToDrawConsole (void)
if (scr_conlines < scr_con_current)
{
/* scr_con_current -= scr_conspeed.value*host_frametime;
CVAR_FIXME */
scr_con_current -= scr_conspeed->value*host_frametime;
if (scr_conlines > scr_con_current)
scr_con_current = scr_conlines;
@ -630,9 +560,7 @@ void SCR_SetUpToDrawConsole (void)
}
else if (scr_conlines > scr_con_current)
{
/* scr_con_current += scr_conspeed.value*host_frametime;
CVAR_FIXME */
scr_con_current += scr_conspeed->value*host_frametime;
/ scr_con_current += scr_conspeed->value*host_frametime;
if (scr_conlines < scr_con_current)
scr_con_current = scr_conlines;
}
@ -898,8 +826,6 @@ void SCR_RSShot_f (void)
if (cls.state < ca_onserver)
return; // gotta be connected
/* if (!scr_allowsnap.value) {
CVAR_FIXME */
if (!scr_allowsnap->value) {
MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
SZ_Print (&cls.netchan.message, "snap\n");
@ -1130,12 +1056,8 @@ void SCR_UpdateScreen (void)
if (!scr_initialized || !con_initialized)
return; // not initialized yet
/* if (scr_viewsize.value != oldscr_viewsize)
CVAR_FIXME */
if (scr_viewsize->value != oldscr_viewsize)
{
/* oldscr_viewsize = scr_viewsize.value;
CVAR_FIXME */
oldscr_viewsize = scr_viewsize->value;
vid.recalc_refdef = 1;
}
@ -1143,32 +1065,20 @@ void SCR_UpdateScreen (void)
//
// check for vid changes
//
/* if (oldfov != scr_fov.value)
CVAR_FIXME */
if (oldfov != scr_fov->value)
{
/* oldfov = scr_fov.value;
CVAR_FIXME */
oldfov = scr_fov->value;
vid.recalc_refdef = true;
}
/* if (oldscreensize != scr_viewsize.value)
CVAR_FIXME */
if (oldscreensize != scr_viewsize->value)
{
/* oldscreensize = scr_viewsize.value;
CVAR_FIXME */
oldscreensize = scr_viewsize->value;
vid.recalc_refdef = true;
}
/* if (oldsbar != cl_sbar.value)
CVAR_FIXME */
if (oldsbar != cl_sbar->value)
{
/* oldsbar = cl_sbar.value;
CVAR_FIXME */
oldsbar = cl_sbar->value;
vid.recalc_refdef = true;
}

View file

@ -38,11 +38,7 @@
#include <string.h>
/* cvar_t baseskin = {"baseskin", "base"};
CVAR_FIXME */
cvar_t *baseskin;
/* cvar_t noskins = {"noskins", "0"};
CVAR_FIXME */
cvar_t *noskins;
char allskins[128];
@ -126,8 +122,6 @@ byte *Skin_Cache (skin_t *skin)
if (cls.downloadtype == dl_skin)
return NULL; // use base until downloaded
/* if (noskins.value==1) // JACK: So NOSKINS > 1 will show skins, but
CVAR_FIXME */
if (noskins->value==1) // JACK: So NOSKINS > 1 will show skins, but
return NULL; // not download new ones.
@ -257,8 +251,6 @@ void Skin_NextDownload (void)
if (!sc->name[0])
continue;
Skin_Find (sc);
/* if (noskins.value)
CVAR_FIXME */
if (noskins->value)
continue;
if (!CL_CheckOrDownloadFile(va("skins/%s.pcx", sc->skin->name)))

View file

@ -53,10 +53,8 @@ qboolean sv_allow_cheats;
int fp_messages=4, fp_persecond=4, fp_secondsdead=10;
char fp_msg[255] = { 0 };
/* extern cvar_t cl_warncmd;
CVAR_FIXME */
extern cvar_t *cl_warncmd;
extern redirect_t sv_redirected;
extern redirect_t sv_redirected;
/*

View file

@ -61,8 +61,6 @@ char outputbuf[8000];
redirect_t sv_redirected;
/* extern cvar_t sv_phs;
CVAR_FIXME */
extern cvar_t *sv_phs;
/*
@ -162,8 +160,6 @@ void Con_DPrintf (char *fmt, ...)
va_list argptr;
char msg[MAXPRINTMSG];
/* if (!developer.value)
CVAR_FIXME */
if (!developer->value)
return;
@ -406,8 +402,6 @@ void SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
ent = NUM_FOR_EDICT(entity);
/* if ((channel & 8) || !sv_phs.value) // no PHS flag
CVAR_FIXME */
if ((channel & 8) || !sv_phs->value) // no PHS flag
{
if (channel & 8)

View file

@ -54,8 +54,6 @@
#endif
/* cvar_t sys_extrasleep = {"sys_extrasleep","0"};
CVAR_FIXME */
cvar_t *sys_extrasleep;
qboolean is_server = true;
@ -143,11 +141,7 @@ is marked
*/
void Sys_Init (void)
{
/* Cvar_RegisterVariable (&sys_nostdout);
CVAR_FIXME */
sys_nostdout = Cvar_Get("sys_nostdout", "0", CVAR_NONE, "None");
/* Cvar_RegisterVariable (&sys_extrasleep);
CVAR_FIXME */
sys_extrasleep = Cvar_Get("sys_extrasleep", "0", CVAR_NONE, "None");
}
@ -214,11 +208,7 @@ int main(int argc, char *argv[])
SV_Frame (time);
// extrasleep is just a way to generate a fucked up connection on purpose
/* if (sys_extrasleep.value)
CVAR_FIXME */
if (sys_extrasleep->value)
/* usleep (sys_extrasleep.value);
CVAR_FIXME */
usleep (sys_extrasleep->value);
}
return 1;