cvar usage audit. value -> int_val where appropriate. tested with x11 glx and

svga.
This commit is contained in:
Bill Currie 2000-09-27 06:07:10 +00:00
parent 2c1968e79e
commit 111791e0f6
58 changed files with 378 additions and 378 deletions

View file

@ -1 +1 @@
set args -nodga -nosound +set _windowed_mouse 0
set args -nodga +set _windowed_mouse 0

View file

@ -132,7 +132,7 @@ void IN_KLookUp (void) {KeyUp(&in_klook);}
void IN_MLookDown (void) {KeyDown(&in_mlook);}
void IN_MLookUp (void) {
KeyUp(&in_mlook);
if ( !(in_mlook.state&1) && lookspring->value)
if ( !(in_mlook.state&1) && lookspring->int_val)
V_StartPitchDrift();
}
void IN_UpDown(void) {KeyDown(&in_up);}

View file

@ -248,7 +248,7 @@ Con_DPrintf ("CL_SignonReply: %i\n", cls.signon);
MSG_WriteString (&cls.message, va("name \"%s\"\n", cl_name->string));
MSG_WriteByte (&cls.message, clc_stringcmd);
MSG_WriteString (&cls.message, va("color %i %i\n", ((int)cl_color->value)>>4, ((int)cl_color->value)&15));
MSG_WriteString (&cls.message, va("color %i %i\n", (cl_color->int_val)>>4, (cl_color->int_val)&15));
MSG_WriteByte (&cls.message, clc_stringcmd);
snprintf (str, sizeof(str), "spawn %s", cls.spawnparms);
@ -496,7 +496,7 @@ float CL_LerpPoint (void)
f = cl.mtime[0] - cl.mtime[1];
if (!f || cl_nolerp->value || cls.timedemo || sv.active)
if (!f || cl_nolerp->int_val || cls.timedemo || sv.active)
{
cl.time = cl.mtime[0];
return 1;
@ -707,7 +707,7 @@ void CL_RelinkEntities (void)
ent->forcelink = false;
if (i == cl.viewentity && !chase_active->value)
if (i == cl.viewentity && !chase_active->int_val)
continue;
#ifdef QUAKE2
@ -750,7 +750,7 @@ int CL_ReadFromServer (void)
CL_ParseServerMessage ();
} while (ret && cls.state == ca_connected);
if (cl_shownet->value)
if (cl_shownet->int_val)
Con_Printf ("\n");
CL_RelinkEntities ();

View file

@ -721,7 +721,7 @@ void CL_ParseStaticSound (void)
}
#define SHOWNET(x) if(cl_shownet->value==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
#define SHOWNET(x) if(cl_shownet->int_val==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
/*
=====================
@ -736,9 +736,9 @@ void CL_ParseServerMessage (void)
//
// if recording demos, copy the message out
//
if (cl_shownet->value == 1)
if (cl_shownet->int_val == 1)
Con_Printf ("%i ",net_message.cursize);
else if (cl_shownet->value == 2)
else if (cl_shownet->int_val == 2)
Con_Printf ("------------------\n");
cl.onground = false; // unless the server says otherwise

View file

@ -384,7 +384,7 @@ void Cmd_Exec_f (void)
Con_Printf ("couldn't exec %s\n",Cmd_Argv(1));
return;
}
if (!Cvar_Command () && (cl_warncmd->value || developer->value))
if (!Cvar_Command () && (cl_warncmd->int_val || developer->int_val))
Con_Printf ("execing %s\n",Cmd_Argv(1));
Cbuf_InsertText (f);
@ -862,7 +862,7 @@ void Cmd_ExecuteString (char *text, cmd_source_t src)
}
}
if (cl_warncmd->value || developer->value)
if (cl_warncmd->int_val || developer->int_val)
Con_Printf ("Unknown command \"%s\"\n", Cmd_Argv(0));
}

View file

@ -445,7 +445,7 @@ void Con_DPrintf (char *fmt, ...)
va_list argptr;
char msg[MAXPRINTMSG];
if (!developer->value)
if (!developer->int_val)
return; // don't confuse non-developers with techie stuff...
va_start (argptr,fmt);

View file

@ -268,7 +268,7 @@ x11_set_vidmode(int width, int height)
}
Con_SafePrintf ("hasvidmode = %i\nnummodes = %i\n", hasvidmode, nummodes);
if (hasvidmode && vid_fullscreen->value) {
if (hasvidmode && vid_fullscreen->int_val) {
int smallest_mode=0, x=MAXINT, y=MAXINT;
// FIXME: does this depend on mode line order in XF86Config?
@ -311,7 +311,7 @@ x11_create_window(int width, int height)
attr.event_mask = X_MASK;
mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
if (hasvidmode && vid_fullscreen->value) {
if (hasvidmode && vid_fullscreen->int_val) {
attr.override_redirect=1;
mask|=CWOverrideRedirect;
}
@ -349,7 +349,7 @@ void
x11_grab_keyboard(void)
{
#ifdef HAVE_VIDMODE
if (hasvidmode && vid_fullscreen->value) {
if (hasvidmode && vid_fullscreen->int_val) {
XGrabKeyboard(x_disp, x_win, 1, GrabModeAsync, GrabModeAsync,
CurrentTime);
}

View file

@ -371,7 +371,7 @@ void Cvar_Toggle_f (void)
return;
}
Cvar_Set (var, var->value ? "0" : "1");
Cvar_Set (var, var->value ? "0" : "1"); //XXX should be int or float?
}
void Cvar_Help_f (void)

View file

@ -195,7 +195,7 @@ 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)
if (r_drawflat->int_val)
{
for (s = &surfaces[1] ; s<surface_p ; s++)
{
@ -241,7 +241,7 @@ void D_DrawSurfaces (void)
d_zistepv = 0;
d_ziorigin = -0.9;
D_DrawSolidSurface (s, (int)r_clearcolor->value & 0xFF);
D_DrawSolidSurface (s, r_clearcolor->int_val & 0xFF);
D_DrawZSpans (s->spans);
}
else if (s->flags & SURF_DRAWTURB)

View file

@ -145,7 +145,7 @@ void D_SetupFrame (void)
d_roverwrapped = false;
d_initial_rover = sc_rover;
d_minmip = d_mipcap->value;
d_minmip = d_mipcap->int_val;
if (d_minmip > 3)
d_minmip = 3;
else if (d_minmip < 0)
@ -155,7 +155,7 @@ void D_SetupFrame (void)
d_scalemip[i] = basemip[i] * d_mipscale->value;
#ifdef USE_INTEL_ASM
if (d_subdiv16->value)
if (d_subdiv16->int_val)
d_drawspans = D_DrawSpans16;
else
d_drawspans = D_DrawSpans8;

View file

@ -438,7 +438,7 @@ void Draw_Init (void)
// LordHavoc: 3DFX's dithering has terrible artifacting when using lightmode 1
if (!strncasecmp ((char *)gl_renderer, "3dfx",4))
Cvar_Set (gl_lightmode, "0");
lighthalf = gl_lightmode->value != 0; // to avoid re-rendering all lightmaps on first frame
lighthalf = gl_lightmode->int_val != 0; // to avoid re-rendering all lightmaps on first frame
Cmd_AddCommand ("gl_texturemode", &Draw_TextureMode_f);
@ -565,12 +565,12 @@ void Draw_Crosshair(void)
extern vrect_t scr_vrect;
unsigned char *pColor;
if (crosshair->value == 2)
if (crosshair->int_val == 2)
{
x = scr_vrect.x + scr_vrect.width/2 - 3 + cl_crossx->value;
y = scr_vrect.y + scr_vrect.height/2 - 3 + cl_crossy->value;
x = scr_vrect.x + scr_vrect.width/2 - 3 + cl_crossx->int_val;
y = scr_vrect.y + scr_vrect.height/2 - 3 + cl_crossy->int_val;
pColor = (unsigned char *) &d_8to24table[(byte) crosshaircolor->value];
pColor = (unsigned char *) &d_8to24table[(byte) crosshaircolor->int_val];
if (lighthalf)
glColor4ub((byte) ((int) pColor[0] >> 1),(byte) ((int) pColor[1] >> 1), (byte) ((int) pColor[2] >> 1), pColor[3]);
else
@ -588,9 +588,9 @@ void Draw_Crosshair(void)
glVertex2f (x - 4, y+12);
glEnd ();
}
else if (crosshair->value)
Draw_Character8 (scr_vrect.x + scr_vrect.width/2-4 + cl_crossx->value,
scr_vrect.y + scr_vrect.height/2-4 + cl_crossy->value, '+');
else if (crosshair->int_val)
Draw_Character8 (scr_vrect.x + scr_vrect.width/2-4 + cl_crossx->int_val,
scr_vrect.y + scr_vrect.height/2-4 + cl_crossy->int_val, '+');
}
/*
@ -1104,11 +1104,11 @@ static unsigned scaled[1024*512]; // [512*256];
for (scaled_height = 1 ; scaled_height < height ; scaled_height<<=1)
;
scaled_width >>= (int)gl_picmip->value;
scaled_height >>= (int)gl_picmip->value;
scaled_width >>= gl_picmip->int_val;
scaled_height >>= gl_picmip->int_val;
scaled_width = min(scaled_width, gl_max_size->value);
scaled_height = min(scaled_height, gl_max_size->value);
scaled_width = min(scaled_width, gl_max_size->int_val);
scaled_height = min(scaled_height, gl_max_size->int_val);
if (scaled_width * scaled_height > sizeof(scaled)/4)
Sys_Error ("GL_LoadTexture: too big");
@ -1203,11 +1203,11 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole
for (scaled_height = 1 ; scaled_height < height ; scaled_height<<=1)
;
scaled_width >>= (int)gl_picmip->value;
scaled_height >>= (int)gl_picmip->value;
scaled_width >>= gl_picmip->int_val;
scaled_height >>= gl_picmip->int_val;
scaled_width = min(scaled_width, gl_max_size->value);
scaled_height = min(scaled_height, gl_max_size->value);
scaled_width = min(scaled_width, gl_max_size->int_val);
scaled_height = min(scaled_height, gl_max_size->int_val);
if (scaled_width * scaled_height > sizeof(scaled))
Sys_Error ("GL_LoadTexture: too big");

View file

@ -226,7 +226,7 @@ R_AddFire (vec3_t start, vec3_t end, entity_t *ent)
vec3_t vec;
int key;
if (!gl_fires->value)
if (!gl_fires->int_val)
return;
VectorSubtract (end, start, vec);
@ -359,7 +359,7 @@ R_UpdateFires (void)
int i;
fire_t *f;
if (!gl_fires->value)
if (!gl_fires->int_val)
return;
glDepthMask (0);

View file

@ -158,7 +158,7 @@ void R_RenderDlights (void)
int i;
dlight_t *l;
if (!gl_flashblend->value)
if (!gl_flashblend->int_val)
return;
r_dlightframecount = r_framecount + 1; // because the count hasn't
@ -303,7 +303,7 @@ void R_PushDlights (vec3_t entorigin)
dlight_t *l;
vec3_t lightorigin;
if (gl_flashblend->value)
if (gl_flashblend->int_val)
return;
r_dlightframecount = r_framecount + 1; // because the count hasn't

View file

@ -579,7 +579,7 @@ static void R_DrawAliasModel (entity_t *e)
if (shadelight < 8)
shadelight = 8;
}
else if (!gl_fb_models->value && (!strcmp (clmodel->name, "progs/flame.mdl") || !strcmp (clmodel->name, "progs/flame2.mdl")))
else if (!gl_fb_models->int_val && (!strcmp (clmodel->name, "progs/flame.mdl") || !strcmp (clmodel->name, "progs/flame2.mdl")))
{
// HACK HACK HACK -- no fullbright colors, so make torches full light
shadelight = 200;
@ -628,23 +628,23 @@ static void R_DrawAliasModel (entity_t *e)
// we can't dynamically colormap textures, so they are cached
// seperately for the players. Heads are just uncolored.
if (currententity->colormap != vid.colormap && !gl_nocolors->value)
if (currententity->colormap != vid.colormap && !gl_nocolors->int_val)
{
i = currententity - cl_entities;
if (i >= 1 && i<=cl.maxclients /* && !strcmp (currententity->model->name, "progs/player.mdl") */)
glBindTexture (GL_TEXTURE_2D, playertextures - 1 + i);
}
if (gl_smoothmodels->value)
if (gl_smoothmodels->int_val)
glShadeModel (GL_SMOOTH);
if (gl_affinemodels->value)
if (gl_affinemodels->int_val)
glHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
R_SetupAliasFrame (currententity->frame, paliashdr, false);
// This block is GL fullbright support for objects...
if (clmodel->hasfullbrights && gl_fb_models->value && paliashdr->gl_fb_texturenum[currententity->skinnum][anim])
if (clmodel->hasfullbrights && gl_fb_models->int_val && paliashdr->gl_fb_texturenum[currententity->skinnum][anim])
{
glBlendFunc(GL_ONE, GL_ONE);
glEnable (GL_BLEND);
@ -657,12 +657,12 @@ static void R_DrawAliasModel (entity_t *e)
}
glShadeModel (GL_FLAT);
if (gl_affinemodels->value)
if (gl_affinemodels->int_val)
glHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glPopMatrix ();
if (r_shadows->value)
if (r_shadows->int_val)
{
glPushMatrix ();
R_RotateForEntity (e);
@ -687,7 +687,7 @@ static void R_DrawEntitiesOnList (void)
{
int i;
if (!r_drawentities->value)
if (!r_drawentities->int_val)
return;
// LordHavoc: split into 3 loops to simplify state changes
@ -727,10 +727,10 @@ R_DrawViewModel
static void R_DrawViewModel (void)
{
currententity = &cl.viewent;
if (!r_drawviewmodel->value
|| chase_active->value
if (!r_drawviewmodel->int_val
|| chase_active->int_val
|| envmap
|| !r_drawentities->value
|| !r_drawentities->int_val
|| (cl.items & IT_INVISIBILITY)
|| cl.stats[STAT_HEALTH] <= 0
|| !currententity->model)
@ -803,8 +803,8 @@ R_SetupFrame
static void R_SetupFrame (void)
{
// don't allow cheats in multiplayer
r_fullbright->value = 0;
r_lightmap->value = 0;
Cvar_SetValue (r_fullbright, 0);
Cvar_SetValue (r_lightmap, 0);
R_AnimateLight ();
@ -918,7 +918,7 @@ static void R_SetupGL (void)
//
// set drawing parms
//
if (gl_cull->value)
if (gl_cull->int_val)
glEnable (GL_CULL_FACE);
else
glDisable (GL_CULL_FACE);
@ -966,7 +966,7 @@ R_Clear
*/
static void R_Clear (void)
{
if (gl_clear->value)
if (gl_clear->int_val)
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
else
glClear (GL_DEPTH_BUFFER_BIT);
@ -1054,7 +1054,7 @@ r_refdef must be set before the first call
*/
void R_RenderView (void)
{
if (r_norefresh->value)
if (r_norefresh->int_val)
return;
if (!r_worldentity.model || !cl.worldmodel)

View file

@ -373,12 +373,12 @@ void R_TranslatePlayerSkin (int playernum)
// don't mipmap these, because it takes too long
GL_Upload8 (translated, paliashdr->skinwidth, paliashdr->skinheight, false, false, true);
#else
scaled_width = gl_max_size->value < 512 ? gl_max_size->value : 512;
scaled_height = gl_max_size->value < 256 ? gl_max_size->value : 256;
scaled_width = gl_max_size->int_val < 512 ? gl_max_size->int_val : 512;
scaled_height = gl_max_size->int_val < 256 ? gl_max_size->int_val : 256;
// allow users to crunch sizes down even more if they want
scaled_width >>= (int)gl_playermip->value;
scaled_height >>= (int)gl_playermip->value;
scaled_width >>= gl_playermip->int_val;
scaled_height >>= gl_playermip->int_val;
if (VID_Is8bit()) { // 8bit texture upload
byte *out2;

View file

@ -252,7 +252,7 @@ R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
lightmap = surf->samples;
// set to full bright if no light data
if (/*r_fullbright->value ||*/ !cl.worldmodel->lightdata)
if (/*r_fullbright->int_val ||*/ !cl.worldmodel->lightdata)
{
bl = blocklights;
for (i=0 ; i<size ; i++)
@ -297,7 +297,7 @@ R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
store:
// bound and shift
if (gl_colorlights->value)
if (gl_colorlights->int_val)
{
stride -= smax * 3;
bl = blocklights;
@ -455,7 +455,7 @@ void R_DrawMultitexturePoly (msurface_t *s)
glEnable(GL_TEXTURE_2D);
// check for lightmap modification
if (r_dynamic->value)
if (r_dynamic->int_val)
{
for (maps = 0;maps < MAXLIGHTMAPS && s->styles[maps] != 255;maps++)
if (d_lightstylevalue[s->styles[maps]] != s->cached_light[maps])
@ -620,7 +620,7 @@ void R_RenderBrushPoly (msurface_t *fa)
|| fa->cached_dlight) // dynamic previously
{
dynamic:
if (r_dynamic->value)
if (r_dynamic->int_val)
{
lightmap_modified[fa->lightmaptexturenum] = true;
theRect = &lightmap_rectchange[fa->lightmaptexturenum];
@ -793,7 +793,7 @@ void R_DrawBrushModel (entity_t *e)
// calculate dynamic lighting for bmodel if it's not an
// instanced model
if (clmodel->firstmodelsurface != 0 && !gl_flashblend->value)
if (clmodel->firstmodelsurface != 0 && !gl_flashblend->int_val)
{
vec3_t lightorigin;
for (k=0 ; k<MAX_DLIGHTS ; k++)
@ -815,7 +815,7 @@ void R_DrawBrushModel (entity_t *e)
// LordHavoc: anyone without multitexture won't want texsort 0 anyway...
if (!gl_mtexable)
gl_texsort->value = 1;
Cvar_SetValue (gl_texsort, 1);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
@ -838,14 +838,14 @@ void R_DrawBrushModel (entity_t *e)
{
if (psurf->flags & SURF_DRAWTURB)
GL_WaterSurface(psurf);
else if (gl_texsort->value)
else if (gl_texsort->int_val)
R_RenderBrushPoly (psurf);
else
R_DrawMultitexturePoly (psurf);
}
}
if (gl_texsort->value)
if (gl_texsort->int_val)
R_BlendLightmaps ();
if (gl_fb_bmodels->int_val)
@ -963,7 +963,7 @@ void R_RecursiveWorldNode (mnode_t *node)
surf->texturechain = waterchain;
waterchain = surf;
}
else if (gl_texsort->value)
else if (gl_texsort->int_val)
{
surf->texturechain = surf->texinfo->texture->texturechain;
surf->texinfo->texture->texturechain = surf;
@ -1000,7 +1000,7 @@ void R_DrawWorld (void)
// LordHavoc: anyone without multitexture won't want texsort 0 anyway...
if (!gl_mtexable)
gl_texsort->value = 1;
Cvar_SetValue (gl_texsort, 1);
glColor3f (1.0, 1.0, 1.0);
memset (lightmap_polys, 0, sizeof(lightmap_polys));
@ -1015,7 +1015,7 @@ void R_DrawWorld (void)
DrawTextureChains ();
if (gl_texsort->value)
if (gl_texsort->int_val)
R_BlendLightmaps ();
if (gl_fb_bmodels->int_val)
@ -1039,7 +1039,7 @@ void R_MarkLeaves (void)
int i;
byte solid[4096];
if (r_oldviewleaf == r_viewleaf && !r_novis->value)
if (r_oldviewleaf == r_viewleaf && !r_novis->int_val)
return;
if (mirror)
@ -1048,7 +1048,7 @@ void R_MarkLeaves (void)
r_visframecount++;
r_oldviewleaf = r_viewleaf;
if (r_novis->value)
if (r_novis->int_val)
{
vis = solid;
memset (solid, 0xff, (cl.worldmodel->numleafs+7)>>3);
@ -1209,7 +1209,7 @@ void BuildSurfaceDisplayList (msurface_t *fa)
//
// remove co-linear points - Ed
//
if (!gl_keeptjunctions->value && !(fa->flags & SURF_UNDERWATER) )
if (!gl_keeptjunctions->int_val && !(fa->flags & SURF_UNDERWATER) )
{
for (i = 0 ; i < lnumverts ; ++i)
{
@ -1297,7 +1297,7 @@ void GL_BuildLightmaps (void)
gl_colorlights = Cvar_Get ("gl_colorlights", "1", CVAR_ROM,
"Whether to use RGB lightmaps or not");
if (gl_colorlights->value)
if (gl_colorlights->int_val)
{
gl_lightmap_format = GL_RGB;
lightmap_bytes = 3;
@ -1328,7 +1328,7 @@ void GL_BuildLightmaps (void)
}
}
if (gl_mtexable && !gl_texsort->value)
if (gl_mtexable && !gl_texsort->int_val)
qglSelectTexture (gl_mtex_enum+1);
//
@ -1351,7 +1351,7 @@ void GL_BuildLightmaps (void)
GL_UNSIGNED_BYTE, lightmaps[i]);
}
if (gl_mtexable && !gl_texsort->value)
if (gl_mtexable && !gl_texsort->int_val)
qglSelectTexture (gl_mtex_enum+0);
}

View file

@ -343,7 +343,7 @@ static void SCR_CalcRefdef (void)
}
size /= 100.0;
if (!cl_sbar->value && full)
if (!cl_sbar->int_val && full)
h = vid.height;
else
h = vid.height - sb_lines;
@ -355,7 +355,7 @@ static void SCR_CalcRefdef (void)
}
r_refdef.vrect.height = vid.height * size;
if (cl_sbar->value || !full) {
if (cl_sbar->int_val || !full) {
if (r_refdef.vrect.height > vid.height - sb_lines)
r_refdef.vrect.height = vid.height - sb_lines;
} else {
@ -449,7 +449,7 @@ SCR_DrawRam
*/
void SCR_DrawRam (void)
{
if (!scr_showram->value)
if (!scr_showram->int_val)
return;
if (!r_cache_thrash)
@ -467,7 +467,7 @@ void SCR_DrawTurtle (void)
{
static int count;
if (!scr_showturtle->value)
if (!scr_showturtle->int_val)
return;
if (host_frametime < 0.1)
@ -499,7 +499,7 @@ void SCR_DrawFPS (void)
int x, y;
char st[80];
if (!show_fps->value)
if (!show_fps->int_val)
return;
t = Sys_DoubleTime();
@ -525,7 +525,7 @@ void SCR_DrawPause (void)
{
qpic_t *pic;
if (!scr_showpause->value) // turn off for screenshots
if (!scr_showpause->int_val) // turn off for screenshots
return;
if (!cl.paused)
@ -896,7 +896,7 @@ void SCR_UpdateScreen (void)
if (block_drawing)
return;
vid.numpages = 2 + (int) gl_triplebuffer->value;
vid.numpages = 2 + gl_triplebuffer->int_val;
scr_copytop = 0;
scr_copyeverything = 0;
@ -917,7 +917,7 @@ void SCR_UpdateScreen (void)
GL_BeginRendering (&glx, &gly, &glwidth, &glheight);
if (r_speeds->value)
if (r_speeds->int_val)
{
time1 = Sys_DoubleTime ();
c_brush_polys = 0;
@ -941,9 +941,9 @@ void SCR_UpdateScreen (void)
//
// LordHavoc: set lighthalf based on gl_lightmode cvar
if (lighthalf != (gl_lightmode->value != 0))
if (lighthalf != (gl_lightmode->int_val != 0))
{
lighthalf = gl_lightmode->value != 0;
lighthalf = gl_lightmode->int_val != 0;
R_ForceLightUpdate();
}
@ -981,7 +981,7 @@ void SCR_UpdateScreen (void)
}
else
{
if (crosshair->value)
if (crosshair->int_val)
Draw_Crosshair();
SCR_DrawRam ();
@ -998,7 +998,7 @@ void SCR_UpdateScreen (void)
// also makes polyblend apply to whole screen
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
brightness->value = bound(1, brightness->value, 5);
Cvar_SetValue (brightness, bound(1, brightness->value, 5));
if (lighthalf) // LordHavoc: render was done at half brightness
f = brightness->value * 2;
else
@ -1022,8 +1022,8 @@ void SCR_UpdateScreen (void)
glEnd ();
}
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
contrast->value = bound(0.2, contrast->value, 1.0);
if ((gl_polyblend->value && v_blend[3]) || contrast->value < 1)
Cvar_SetValue (contrast, bound(0.2, contrast->value, 1.0));
if ((gl_polyblend->int_val && v_blend[3]) || contrast->value < 1)
{
glBegin (GL_QUADS);
if (contrast->value < 1)
@ -1034,7 +1034,7 @@ void SCR_UpdateScreen (void)
glVertex2f (vid.width, vid.height);
glVertex2f (0, vid.height);
}
if (gl_polyblend->value && v_blend[3])
if (gl_polyblend->int_val && v_blend[3])
{
glColor4fv (v_blend);
glVertex2f (0,0);
@ -1050,7 +1050,7 @@ void SCR_UpdateScreen (void)
V_UpdatePalette ();
if (r_speeds->value)
if (r_speeds->int_val)
{
// glFinish ();
time2 = Sys_DoubleTime ();

View file

@ -676,7 +676,7 @@ R_DrawSkyDome (void)
glEnable (GL_BLEND);
// clouds
if (gl_skymultipass->value) {
if (gl_skymultipass->int_val) {
glBindTexture (GL_TEXTURE_2D, alphaskytexture);
domescale[0] = 512;
domescale[1] = 512;

View file

@ -725,12 +725,12 @@ void _Host_Frame (float time)
}
// update video
if (host_speeds->value)
if (host_speeds->int_val)
time1 = Sys_DoubleTime ();
SCR_UpdateScreen ();
if (host_speeds->value)
if (host_speeds->int_val)
time2 = Sys_DoubleTime ();
// update audio
@ -744,7 +744,7 @@ void _Host_Frame (float time)
CDAudio_Update();
if (host_speeds->value)
if (host_speeds->int_val)
{
pass1 = (time1 - time3)*1000;
time3 = Sys_DoubleTime ();
@ -765,7 +765,7 @@ void Host_Frame (float time)
static int timecount;
int i, c, m;
if (!serverprofile->value)
if (!serverprofile->int_val)
{
_Host_Frame (time);
return;

View file

@ -1095,7 +1095,7 @@ void Host_Say(qboolean teamonly)
{
if (!client || !client->active || !client->spawned)
continue;
if (teamplay->value && teamonly && client->edict->v.team != save->edict->v.team)
if (teamplay->int_val && teamonly && client->edict->v.team != save->edict->v.team)
continue;
host_client = client;
SV_ClientPrintf("%s", text);
@ -1182,7 +1182,7 @@ void Host_Color_f(void)
if (Cmd_Argc() == 1)
{
Con_Printf ("\"color\" is \"%i %i\"\n", ((int)cl_color->value) >> 4, ((int)cl_color->value) & 0x0f);
Con_Printf ("\"color\" is \"%i %i\"\n", (cl_color->int_val) >> 4, (cl_color->int_val) & 0x0f);
Con_Printf ("color <0-13> [0-13]\n");
return;
}
@ -1259,7 +1259,7 @@ void Host_Pause_f (void)
Cmd_ForwardToServer ();
return;
}
if (!pausable->value)
if (!pausable->int_val)
SV_ClientPrintf ("Pause not allowed.\n");
else
{

View file

@ -122,7 +122,7 @@ qboolean IN_ReadJoystick (void);
void Toggle_AuxLook_f (void)
{
if (aux_look->value)
if (aux_look->int_val)
Cvar_Set ("auxlook","0");
else
Cvar_Set ("auxlook","1");
@ -236,7 +236,7 @@ void IN_Commands (void)
{
joy_buttonstate = ((dos_inportb(0x201) >> 4)&15)^15;
// perform button actions
for (i=0 ; i<joy_numbuttons->value ; i++)
for (i=0 ; i<joy_numbuttons->int_val ; i++)
{
if ( (joy_buttonstate & (1<<i)) &&
!(joy_oldbuttonstate & (1<<i)) )
@ -295,7 +295,7 @@ void IN_MouseMove (usercmd_t *cmd)
mx = (short)regs.x.cx;
my = (short)regs.x.dx;
if (m_filter->value)
if (m_filter->int_val)
{
mouse_x = (mx + old_mouse_x) * 0.5;
mouse_y = (my + old_mouse_y) * 0.5;
@ -312,7 +312,7 @@ void IN_MouseMove (usercmd_t *cmd)
mouse_y *= sensitivity->value;
// add mouse X/Y movement to cmd
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;
@ -346,7 +346,7 @@ void IN_JoyMove (usercmd_t *cmd)
{
float speed, aspeed;
if (!joy_avail || !in_joystick->value)
if (!joy_avail || !in_joystick->int_val)
return;
IN_ReadJoystick ();
@ -617,7 +617,7 @@ Con_DPrintf("OUT: y:%f p:%f r:%f f:%f s:%f u:%f\n", extern_control->viewangles[Y
if (cl.viewangles[PITCH] < -70)
cl.viewangles[PITCH] = -70;
freelook = (extern_control->flags & AUX_FLAG_FREELOOK || aux_look->value || in_mlook.state & 1);
freelook = (extern_control->flags & AUX_FLAG_FREELOOK || aux_look->int_val || in_mlook.state & 1);
if (freelook)
V_StopPitchDrift ();

View file

@ -103,7 +103,7 @@ void IN_CenterMouse( void )
//
static void CheckMouseState(void)
{
if (x_focus && _windowed_mouse->value && !x_grabbed) {
if (x_focus && _windowed_mouse->int_val && !x_grabbed) {
x_grabbed = true;
printf("fooling with mouse!\n");
if (XGetPointerControl( x_disp, &x_mouse_num, &x_mouse_denom, &x_mouse_thresh ))
@ -125,7 +125,7 @@ static void CheckMouseState(void)
// safe initial values
x_root = x_root_old = vid.width >> 1;
y_root = y_root_old = vid.height >> 1;
} else if (x_grabbed && (!_windowed_mouse->value || !x_focus)) {
} else if (x_grabbed && (!_windowed_mouse->int_val || !x_focus)) {
printf("fooling with mouse!\n");
x_grabbed = false;
// undo mouse warp
@ -235,7 +235,7 @@ IN_Move (usercmd_t *cmd)
}
// add mouse X/Y movement to cmd
if ((in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1)))
if ((in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1)))
cmd->sidemove += m_side->value * dx;
else
cl.viewangles[YAW] -= m_yaw->value * dx;

View file

@ -347,7 +347,7 @@ void IN_Move(usercmd_t *cmd)
while (mouse_update())
;
if (m_filter->value) {
if (m_filter->int_val) {
mouse_x = (mx + old_mouse_x) * 0.5;
mouse_y = (my + old_mouse_y) * 0.5;
} else {
@ -364,7 +364,7 @@ void IN_Move(usercmd_t *cmd)
/* Add mouse X/Y movement to cmd */
if ( (in_strafe.state & 1) ||
(lookstrafe->value && (in_mlook.state & 1) )) {
(lookstrafe->int_val && (in_mlook.state & 1) )) {
cmd->sidemove += m_side->value * mouse_x;
} else {
cl.viewangles[YAW] -= m_yaw->value * mouse_x;

View file

@ -689,7 +689,7 @@ void IN_MouseMove (usercmd_t *cmd)
//if (mx || my)
// Con_DPrintf("mx=%d, my=%d\n", mx, my);
if (m_filter->value)
if (m_filter->int_val)
{
mouse_x = (mx + old_mouse_x) * 0.5;
mouse_y = (my + old_mouse_y) * 0.5;
@ -707,7 +707,7 @@ void IN_MouseMove (usercmd_t *cmd)
mouse_y *= sensitivity->value;
// add mouse X/Y movement to cmd
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;
@ -913,7 +913,7 @@ void Joy_AdvancedUpdate_f (void)
pdwRawValue[i] = RawValuePointer(i);
}
if( joy_advanced->value == 0.0)
if( joy_advanced->int_val == 0.0)
{
// default joystick initialization
// 2 axes only with joystick control
@ -932,22 +932,22 @@ void Joy_AdvancedUpdate_f (void)
// advanced initialization here
// data supplied by user via joy_axisn cvars
dwTemp = (DWORD) joy_advaxisx->value;
dwTemp = joy_advaxisx->int_val;
dwAxisMap[JOY_AXIS_X] = dwTemp & 0x0000000f;
dwControlMap[JOY_AXIS_X] = dwTemp & JOY_RELATIVE_AXIS;
dwTemp = (DWORD) joy_advaxisy->value;
dwTemp = joy_advaxisy->int_val;
dwAxisMap[JOY_AXIS_Y] = dwTemp & 0x0000000f;
dwControlMap[JOY_AXIS_Y] = dwTemp & JOY_RELATIVE_AXIS;
dwTemp = (DWORD) joy_advaxisz->value;
dwTemp = joy_advaxisz->int_val;
dwAxisMap[JOY_AXIS_Z] = dwTemp & 0x0000000f;
dwControlMap[JOY_AXIS_Z] = dwTemp & JOY_RELATIVE_AXIS;
dwTemp = (DWORD) joy_advaxisr->value;
dwTemp = joy_advaxisr->int_val;
dwAxisMap[JOY_AXIS_R] = dwTemp & 0x0000000f;
dwControlMap[JOY_AXIS_R] = dwTemp & JOY_RELATIVE_AXIS;
dwTemp = (DWORD) joy_advaxisu->value;
dwTemp = joy_advaxisu->int_val;
dwAxisMap[JOY_AXIS_U] = dwTemp & 0x0000000f;
dwControlMap[JOY_AXIS_U] = dwTemp & JOY_RELATIVE_AXIS;
dwTemp = (DWORD) joy_advaxisv->value;
dwTemp = joy_advaxisv->int_val;
dwAxisMap[JOY_AXIS_V] = dwTemp & 0x0000000f;
dwControlMap[JOY_AXIS_V] = dwTemp & JOY_RELATIVE_AXIS;
}
@ -1051,7 +1051,7 @@ qboolean IN_ReadJoystick (void)
// this is a hack -- there is a bug in the Logitech WingMan Warrior DirectInput Driver
// rather than having 32768 be the zero point, they have the zero point at 32668
// go figure -- anyway, now we get the full resolution out of the device
if (joy_wwhack1->value != 0.0)
if (joy_wwhack1->int_val)
{
ji.dwUpos += 100;
}
@ -1089,7 +1089,7 @@ void IN_JoyMove (usercmd_t *cmd)
}
// verify joystick is available and that the user wants to use it
if (!joy_avail || !in_joystick->value)
if (!joy_avail || !in_joystick->int_val)
{
return;
}
@ -1114,7 +1114,7 @@ void IN_JoyMove (usercmd_t *cmd)
// move centerpoint to zero
fAxisValue -= 32768.0;
if (joy_wwhack2->value != 0.0)
if (joy_wwhack2->int_val)
{
if (dwAxisMap[i] == AxisTurn)
{
@ -1136,7 +1136,7 @@ void IN_JoyMove (usercmd_t *cmd)
switch (dwAxisMap[i])
{
case AxisForward:
if ((joy_advanced->value == 0.0) && (in_mlook.state & 1))
if ((!joy_advanced->int_val) && (in_mlook.state & 1))
{
// user wants forward control to become look control
if (fabs(fAxisValue) > joy_pitchthreshold->value)
@ -1159,7 +1159,7 @@ void IN_JoyMove (usercmd_t *cmd)
// disable pitch return-to-center unless requested by user
// *** this code can be removed when the lookspring bug is fixed
// *** the bug always has the lookspring feature on
if(lookspring->value == 0.0)
if(lookspring->int_val)
V_StopPitchDrift();
}
}
@ -1181,7 +1181,7 @@ void IN_JoyMove (usercmd_t *cmd)
break;
case AxisTurn:
if ((in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1)))
if ((in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1)))
{
// user wants turn control to become side control
if (fabs(fAxisValue) > joy_sidethreshold->value)
@ -1229,7 +1229,7 @@ void IN_JoyMove (usercmd_t *cmd)
// disable pitch return-to-center unless requested by user
// *** this code can be removed when the lookspring bug is fixed
// *** the bug always has the lookspring feature on
if(lookspring->value == 0.0)
if(lookspring->int_val)
V_StopPitchDrift();
}
}

View file

@ -267,15 +267,15 @@ static void
event_motion(XEvent *event)
{
#ifdef HAVE_DGA
if (in_dgamouse->value) {
if (in_dgamouse->int_val) {
mouse_x += event->xmotion.x_root * in_dga_mouseaccel->value;
mouse_y += event->xmotion.y_root * in_dga_mouseaccel->value;
} else
#endif
{
//printf("_windowed_mouse: %f\n", _windowed_mouse->value);
//printf("_windowed_mouse: %s\n", _windowed_mouse->int_val);
//printf("CurrentTime: %ld\n", CurrentTime);
if (_windowed_mouse->value) {
if (_windowed_mouse->int_val) {
if (!event->xmotion.send_event) {
mouse_x += (event->xmotion.x - p_mouse_x);
mouse_y += (event->xmotion.y - p_mouse_y);
@ -303,10 +303,10 @@ void
IN_Commands (void)
{
JOY_Command ();
if (old__windowed_mouse != _windowed_mouse->value) {
old__windowed_mouse = _windowed_mouse->value;
if (old__windowed_mouse != _windowed_mouse->int_val) {
old__windowed_mouse = _windowed_mouse->int_val;
if (!_windowed_mouse->value) {
if (!_windowed_mouse->int_val) {
/* ungrab the pointer */
XUngrabPointer(x_disp,CurrentTime);
} else {
@ -336,7 +336,7 @@ IN_Move (usercmd_t *cmd)
if (!mouse_avail)
return;
if (m_filter->value) {
if (m_filter->int_val) {
mouse_x = (mouse_x + old_mouse_x) * 0.5;
mouse_y = (mouse_y + old_mouse_y) * 0.5;
}
@ -347,7 +347,7 @@ IN_Move (usercmd_t *cmd)
mouse_x *= sensitivity->value;
mouse_y *= sensitivity->value;
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;
@ -371,14 +371,14 @@ static void IN_ExtraOptionDraw(unsigned int options_draw_cursor)
{
// Windowed Mouse
M_Print(16, options_draw_cursor+=8, " Use Mouse");
M_DrawCheckbox(220, options_draw_cursor, _windowed_mouse->value);
M_DrawCheckbox(220, options_draw_cursor, _windowed_mouse->int_val);
}
static void IN_ExtraOptionCmd(int option_cursor)
{
switch (option_cursor) {
case 1: // _windowed_mouse
_windowed_mouse->value = !_windowed_mouse->value;
Cvar_SetValue (_windowed_mouse, !_windowed_mouse->int_val);
break;
}
}
@ -444,7 +444,7 @@ IN_Init (void)
"grab keyboard and mouse input when using -nodga");
if (COM_CheckParm ("-nodga")) {
if (in_nodga_grab->value) {
if (in_nodga_grab->int_val) {
XGrabKeyboard (x_disp, x_win, True, GrabModeAsync,
GrabModeAsync, CurrentTime);

View file

@ -731,8 +731,8 @@ void M_Menu_Setup_f (void)
m_entersound = true;
strcpy(setup_myname, cl_name->string);
strcpy(setup_hostname, hostname->string);
setup_top = setup_oldtop = ((int)cl_color->value) >> 4;
setup_bottom = setup_oldbottom = ((int)cl_color->value) & 15;
setup_top = setup_oldtop = (cl_color->int_val) >> 4;
setup_bottom = setup_oldbottom = (cl_color->int_val) & 15;
}
@ -1099,7 +1099,7 @@ void M_AdjustSliders (int dir)
switch (options_cursor) {
case 3: // screen size
Cvar_SetValue (scr_viewsize, bound (30, (int)scr_viewsize->value + (dir * 10), 120));
Cvar_SetValue (scr_viewsize, bound (30, scr_viewsize->int_val + (dir * 10), 120));
break;
case 4: // Brightness
@ -1141,15 +1141,15 @@ void M_AdjustSliders (int dir)
break;
case 11: // lookspring
Cvar_SetValue (lookspring, !lookspring->value);
Cvar_SetValue (lookspring, !lookspring->int_val);
break;
case 12: // lookstrafe
Cvar_SetValue (lookstrafe, !lookstrafe->value);
Cvar_SetValue (lookstrafe, !lookstrafe->int_val);
break;
case 14: // _windowed_mouse
Cvar_SetValue(_windowed_mouse, !_windowed_mouse->value);
Cvar_SetValue(_windowed_mouse, !_windowed_mouse->int_val);
break;
}
}
@ -1238,7 +1238,7 @@ void M_Options_Draw (void)
#endif
if (_windowed_mouse) {
M_Print (16, 144, " Use Mouse");
M_DrawCheckbox (220, 144, _windowed_mouse->value);
M_DrawCheckbox (220, 144, _windowed_mouse->int_val);
}
#ifdef _WIN32
}
@ -2572,7 +2572,7 @@ void M_GameOptions_Draw (void)
M_Print (160, 56, va("%i", maxplayers) );
M_Print (0, 64, " Game Type");
if (coop->value)
if (coop->int_val)
M_Print (160, 64, "Cooperative");
else
M_Print (160, 64, "Deathmatch");
@ -2582,7 +2582,7 @@ void M_GameOptions_Draw (void)
{
char *msg;
switch((int)teamplay->value)
switch(teamplay->int_val)
{
case 1: msg = "No Friendly Fire"; break;
case 2: msg = "Friendly Fire"; break;
@ -2598,7 +2598,7 @@ void M_GameOptions_Draw (void)
{
char *msg;
switch((int)teamplay->value)
switch(teamplay->int_val)
{
case 1: msg = "No Friendly Fire"; break;
case 2: msg = "Friendly Fire"; break;
@ -2608,26 +2608,26 @@ void M_GameOptions_Draw (void)
}
M_Print (0, 80, " Skill");
if (skill->value == 0)
if (skill->int_val == 0)
M_Print (160, 80, "Easy difficulty");
else if (skill->value == 1)
else if (skill->int_val == 1)
M_Print (160, 80, "Normal difficulty");
else if (skill->value == 2)
else if (skill->int_val == 2)
M_Print (160, 80, "Hard difficulty");
else
M_Print (160, 80, "Nightmare difficulty");
M_Print (0, 88, " Frag Limit");
if (fraglimit->value == 0)
if (fraglimit->int_val == 0)
M_Print (160, 88, "none");
else
M_Print (160, 88, va("%i frags", (int)fraglimit->value));
M_Print (160, 88, va("%i frags", fraglimit->int_val));
M_Print (0, 96, " Time Limit");
if (timelimit->value == 0)
if (timelimit->int_val == 0)
M_Print (160, 96, "none");
else
M_Print (160, 96, va("%i minutes", (int)timelimit->value));
M_Print (160, 96, va("%i minutes", timelimit->int_val));
M_Print (0, 112, " Episode");
//MED 01/06/97 added hipnotic episodes
@ -2700,7 +2700,7 @@ void M_NetStart_Change (int dir)
break;
case 2:
Cvar_SetValue(coop, coop->value ? 0 : 1);
Cvar_SetValue(coop, coop->int_val ? 0 : 1);
break;
case 3:
@ -2709,34 +2709,34 @@ void M_NetStart_Change (int dir)
else
count = 2;
Cvar_SetValue(teamplay, teamplay->value + dir);
if (teamplay->value > count)
Cvar_SetValue(teamplay, teamplay->int_val + dir);
if (teamplay->int_val > count)
Cvar_SetValue(teamplay, 0);
else if (teamplay->value < 0)
else if (teamplay->int_val < 0)
Cvar_SetValue(teamplay, count);
break;
case 4:
Cvar_SetValue(skill, skill->value + dir);
if (skill->value > 3)
Cvar_SetValue(skill, skill->int_val + dir);
if (skill->int_val > 3)
Cvar_SetValue(skill, 0);
if (skill->value < 0)
if (skill->int_val < 0)
Cvar_SetValue(skill, 3);
break;
case 5:
Cvar_SetValue(fraglimit, fraglimit->value + dir*10);
if (fraglimit->value > 100)
Cvar_SetValue(fraglimit, fraglimit->int_val + dir*10);
if (fraglimit->int_val > 100)
Cvar_SetValue(fraglimit, 0);
if (fraglimit->value < 0)
if (fraglimit->int_val < 0)
Cvar_SetValue(fraglimit, 100);
break;
case 6:
Cvar_SetValue(timelimit, timelimit->value + dir*5);
if (timelimit->value > 60)
Cvar_SetValue(timelimit, timelimit->int_val + dir*5);
if (timelimit->int_val > 60)
Cvar_SetValue(timelimit, 0);
if (timelimit->value < 0)
if (timelimit->int_val < 0)
Cvar_SetValue(timelimit, 60);
break;
@ -2749,7 +2749,7 @@ void M_NetStart_Change (int dir)
//PGM 03/02/97 added 1 for dmatch episode
else if (rogue)
count = 4;
else if (registered->value)
else if (registered->int_val)
count = 7;
else
count = 2;

View file

@ -951,11 +951,11 @@ void NET_Poll(void)
{
if (serialAvailable)
{
if (config_com_modem->value == 1.0)
if (config_com_modem->int_val)
useModem = true;
else
useModem = false;
SetComPortConfig (0, (int)config_com_port->value, (int)config_com_irq->value, (int)config_com_baud->value, useModem);
SetComPortConfig (0, config_com_port->int_val, config_com_irq->int_val, config_com_baud->int_val, useModem);
SetModemConfig (0, config_modem_dialtype->string, config_modem_clear->string, config_modem_init->string, config_modem_hangup->string);
}
configRestored = true;
@ -1002,7 +1002,7 @@ void SchedulePollProcedure(PollProcedure *proc, double timeOffset)
qboolean IsID(struct qsockaddr *addr)
{
if (idgods->value == 0.0)
if (!idgods->int_val)
return false;
if (addr->sa_family != 2)

View file

@ -1380,7 +1380,7 @@ void PF_aim (void)
VectorMA (start, 2048, dir, end);
tr = SV_Move (start, vec3_origin, vec3_origin, end, false, ent);
if (tr.ent && tr.ent->v.takedamage == DAMAGE_AIM
&& (!teamplay->value || ent->v.team <=0 || ent->v.team != tr.ent->v.team) )
&& (!teamplay->int_val || ent->v.team <=0 || ent->v.team != tr.ent->v.team) )
{
VectorCopy (pr_global_struct->v_forward, G_VECTOR(OFS_RETURN));
return;
@ -1399,7 +1399,7 @@ void PF_aim (void)
continue;
if (check == ent)
continue;
if (teamplay->value && ent->v.team > 0 && ent->v.team == check->v.team)
if (teamplay->int_val && ent->v.team > 0 && ent->v.team == check->v.team)
continue; // don't aim at teammate
for (j=0 ; j<3 ; j++)
end[j] = check->v.origin[j]

View file

@ -948,7 +948,7 @@ void ED_LoadFromFile (char *data)
data = ED_ParseEdict (data, ent);
// remove things from different skill levels or deathmatch
if (deathmatch->value)
if (deathmatch->int_val)
{
if (((int)ent->v.spawnflags & SPAWNFLAG_NOT_DEATHMATCH))
{

View file

@ -460,7 +460,7 @@ COM_FOpenFile (char *filename, QFile **gzfile)
#endif
if (fn)
{ // found it!
if (developer->value)
if (developer->int_val)
Sys_Printf ("PackFile: %s : %s\n",pak->filename, fn);
// open a new file on the pakfile
*gzfile=COM_OpenRead(pak->filename,pak->files[i].filepos,
@ -487,7 +487,7 @@ COM_FOpenFile (char *filename, QFile **gzfile)
continue;
}
if(developer->value)
if(developer->int_val)
Sys_Printf ("FindFile: %s\n",netpath);
*gzfile=COM_OpenRead(netpath,-1,-1);

View file

@ -147,7 +147,7 @@ void R_BeginEdgeFrame (void)
surfaces[1].flags = SURF_DRAWBACKGROUND;
// put the background behind everything in the world
if (r_draworder->value)
if (r_draworder->int_val)
{
pdrawfunc = R_GenerateSpansBackward;
surfaces[1].key = 0;

View file

@ -271,7 +271,7 @@ void R_NewMap (void)
r_viewleaf = NULL;
R_ClearParticles ();
r_cnumsurfs = r_maxsurfs->value;
r_cnumsurfs = r_maxsurfs->int_val;
if (r_cnumsurfs <= MINSURFACES)
r_cnumsurfs = MINSURFACES;
@ -295,7 +295,7 @@ void R_NewMap (void)
r_maxedgesseen = 0;
r_maxsurfsseen = 0;
r_numallocatededges = r_maxedges->value;
r_numallocatededges = r_maxedges->int_val;
if (r_numallocatededges < MINEDGES)
r_numallocatededges = MINEDGES;
@ -343,7 +343,7 @@ void R_SetVrect (vrect_t *pvrectin, vrect_t *pvrect, int lineadj)
}
size /= 100;
if (!cl_sbar->value && full)
if (!cl_sbar->int_val && full)
h = pvrectin->height;
else
h = pvrectin->height - lineadj;
@ -362,7 +362,7 @@ void R_SetVrect (vrect_t *pvrectin, vrect_t *pvrect, int lineadj)
pvrect->width &= ~7;
pvrect->height = pvrectin->height * size;
if (cl_sbar->value || !full) {
if (cl_sbar->int_val || !full) {
if (pvrect->height > pvrectin->height - lineadj)
pvrect->height = pvrectin->height - lineadj;
} else {
@ -574,7 +574,7 @@ void R_DrawEntitiesOnList (void)
vec3_t dist;
float add;
if (!r_drawentities->value)
if (!r_drawentities->int_val)
return;
for (i=0 ; i<cl_numvisedicts ; i++)
@ -653,7 +653,7 @@ void R_DrawViewModel (void)
float add;
dlight_t *dl;
if (!r_drawviewmodel->value || r_fov_greater_than_90)
if (!r_drawviewmodel->int_val || r_fov_greater_than_90)
return;
if (cl.items & IT_INVISIBILITY)
@ -788,7 +788,7 @@ void R_DrawBEntitiesOnList (void)
model_t *clmodel;
float minmaxs[6];
if (!r_drawentities->value)
if (!r_drawentities->int_val)
return;
VectorCopy (modelorg, oldorigin);
@ -945,7 +945,7 @@ void R_EdgeDrawing (void)
R_BeginEdgeFrame ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
{
rw_time1 = Sys_DoubleTime ();
}
@ -959,7 +959,7 @@ void R_EdgeDrawing (void)
// z writes, so have the driver turn z compares on now
D_TurnZOn ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
{
rw_time2 = Sys_DoubleTime ();
db_time1 = rw_time2;
@ -967,13 +967,13 @@ void R_EdgeDrawing (void)
R_DrawBEntitiesOnList ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
{
db_time2 = Sys_DoubleTime ();
se_time1 = db_time2;
}
if (!r_dspeeds->value)
if (!r_dspeeds->int_val)
{
VID_UnlockBuffer ();
S_ExtraUpdate (); // don't let sound get messed up if going slow
@ -998,7 +998,7 @@ void R_RenderView_ (void)
r_warpbuffer = warpbuffer;
if (r_timegraph->value || r_speeds->value || r_dspeeds->value)
if (r_timegraph->int_val || r_speeds->int_val || r_dspeeds->int_val)
r_time1 = Sys_DoubleTime ();
R_SetupFrame ();
@ -1018,7 +1018,7 @@ SetVisibilityByPassages ();
if (!cl_entities[0].model || !cl.worldmodel)
Sys_Error ("R_RenderView: NULL worldmodel");
if (!r_dspeeds->value)
if (!r_dspeeds->int_val)
{
VID_UnlockBuffer ();
S_ExtraUpdate (); // don't let sound get messed up if going slow
@ -1027,14 +1027,14 @@ SetVisibilityByPassages ();
R_EdgeDrawing ();
if (!r_dspeeds->value)
if (!r_dspeeds->int_val)
{
VID_UnlockBuffer ();
S_ExtraUpdate (); // don't let sound get messed up if going slow
VID_LockBuffer ();
}
if (r_dspeeds->value)
if (r_dspeeds->int_val)
{
se_time2 = Sys_DoubleTime ();
de_time1 = se_time2;
@ -1042,7 +1042,7 @@ SetVisibilityByPassages ();
R_DrawEntitiesOnList ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
{
de_time2 = Sys_DoubleTime ();
dv_time1 = de_time2;
@ -1050,7 +1050,7 @@ SetVisibilityByPassages ();
R_DrawViewModel ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
{
dv_time2 = Sys_DoubleTime ();
dp_time1 = Sys_DoubleTime ();
@ -1058,7 +1058,7 @@ SetVisibilityByPassages ();
R_DrawParticles ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
dp_time2 = Sys_DoubleTime ();
if (r_dowarp)
@ -1066,22 +1066,22 @@ SetVisibilityByPassages ();
V_SetContentsColor (r_viewleaf->contents);
if (r_timegraph->value)
if (r_timegraph->int_val)
R_TimeGraph ();
if (r_aliasstats->value)
if (r_aliasstats->int_val)
R_PrintAliasStats ();
if (r_speeds->value)
if (r_speeds->int_val)
R_PrintTimes ();
if (r_dspeeds->value)
if (r_dspeeds->int_val)
R_PrintDSpeeds ();
if (r_reportsurfout->value && r_outofsurfaces)
if (r_reportsurfout->int_val && r_outofsurfaces)
Con_Printf ("Short %d surfaces\n", r_outofsurfaces);
if (r_reportedgeout->value && r_outofedges)
if (r_reportedgeout->int_val && r_outofedges)
Con_Printf ("Short roughly %d edges\n", r_outofedges * 2 / 3);
// back to high floating-point precision

View file

@ -45,11 +45,11 @@ R_CheckVariables
*/
void R_CheckVariables (void)
{
static float oldbright;
static int oldbright;
if (r_fullbright->value != oldbright)
if (r_fullbright->int_val != oldbright)
{
oldbright = r_fullbright->value;
oldbright = r_fullbright->int_val;
D_FlushCaches (); // so all lighting changes
}
}
@ -136,7 +136,7 @@ void R_LineGraph (int x, int y, int h)
dest = vid.buffer + vid.rowbytes*y + x;
s = r_graphheight->value;
s = r_graphheight->int_val;
if (h>s)
h = s;
@ -394,7 +394,7 @@ void R_SetupFrame (void)
Cvar_Set(r_drawflat, "0");
}
if (r_numsurfs->value)
if (r_numsurfs->int_val)
{
if ((surface_p - surfaces) > r_maxsurfsseen)
r_maxsurfsseen = surface_p - surfaces;
@ -403,7 +403,7 @@ void R_SetupFrame (void)
surf_max - surfaces, r_maxsurfsseen);
}
if (r_numedges->value)
if (r_numedges->int_val)
{
edgecount = edge_p - r_edges;
@ -420,7 +420,7 @@ void R_SetupFrame (void)
r_refdef.ambientlight = 0;
if (!sv.active)
r_draworder->value = 0; // don't let cheaters look behind walls
Cvar_SetValue (r_draworder, 0); // don't let cheaters look behind walls
R_CheckVariables ();
@ -451,7 +451,7 @@ 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);
r_dowarp = r_waterwarp->int_val && (r_viewleaf->contents <= CONTENTS_WATER);
if ((r_dowarp != r_dowarpold) || r_viewchanged || lcd_x->value)
{

View file

@ -565,7 +565,7 @@ void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent)
if (type == 0)
R_AddFire (start, end, ent);
if (!gl_particles->value)
if (!gl_particles->int_val)
return;
VectorSubtract (end, start, vec);

View file

@ -174,7 +174,7 @@ void R_BuildLightMap (void)
size = smax*tmax;
lightmap = surf->samples;
if (r_fullbright->value || !cl.worldmodel->lightdata)
if (r_fullbright->int_val || !cl.worldmodel->lightdata)
{
for (i=0 ; i<size ; i++)
blocklights[i] = 0;

View file

@ -733,7 +733,7 @@ if (cl.onground && ent->origin[2] - oldz > 0)
else
oldz = ent->origin[2];
if (chase_active->value)
if (chase_active->int_val)
Chase_Update ();
}

View file

@ -273,7 +273,7 @@ Sbar_DrawPic
*/
void Sbar_DrawPic (int x, int y, qpic_t *pic)
{
if ((cl_sbar->value && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
if ((cl_sbar->int_val && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
Draw_Pic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
else
Draw_Pic (x, y + (vid.height-SBAR_HEIGHT), pic);
@ -288,7 +288,7 @@ JACK: Draws a portion of the picture in the status bar.
void Sbar_DrawSubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height)
{
if ((cl_sbar->value && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
if ((cl_sbar->int_val && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
Draw_SubPic (x + ((vid.width - 320)>>1), y + (vid.height - SBAR_HEIGHT), pic, srcx, srcy, width, height);
else
Draw_SubPic (x, y + (vid.height - SBAR_HEIGHT), pic, srcx, srcy, width, height);
@ -301,7 +301,7 @@ Sbar_DrawTransPic
*/
void Sbar_DrawTransPic (int x, int y, qpic_t *pic)
{
if ((cl_sbar->value && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
if ((cl_sbar->int_val && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
Draw_TransPic (x + ((vid.width - 320)>>1), y + (vid.height-SBAR_HEIGHT), pic);
else
Draw_TransPic (x, y + (vid.height-SBAR_HEIGHT), pic);
@ -316,7 +316,7 @@ Draws one solid graphics character
*/
void Sbar_DrawCharacter (int x, int y, int num)
{
if ((cl_sbar->value && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
if ((cl_sbar->int_val && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
Draw_Character8 (x + ((vid.width - 320)>>1) + 4 , y + vid.height-SBAR_HEIGHT, num);
else
Draw_Character8 (x + 4 , y + vid.height-SBAR_HEIGHT, num);
@ -329,7 +329,7 @@ Sbar_DrawString
*/
void Sbar_DrawString (int x, int y, char *str)
{
if ((cl_sbar->value && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
if ((cl_sbar->int_val && !cl.gametype == GAME_DEATHMATCH) && (hipnotic || rogue))
Draw_String8 (x + ((vid.width - 320)>>1), y+ vid.height-SBAR_HEIGHT, str);
else
Draw_String8 (x, y+ vid.height-SBAR_HEIGHT, str);
@ -529,8 +529,8 @@ void Sbar_DrawInventory (void)
qboolean headsup;
qboolean hudswap;
headsup = !(cl_sbar->value || scr_viewsize->value<100);
hudswap = cl_hudswap->value; // Get that nasty float out :)
headsup = !(cl_sbar->int_val || scr_viewsize->value<100);
hudswap = cl_hudswap->int_val;
if (hipnotic)
headsup = false;
@ -795,7 +795,7 @@ void Sbar_DrawFace (void)
// PGM 01/19/97 - team color drawing
// PGM 03/02/97 - fixed so color swatch only appears in CTF modes
if (rogue && (cl.maxclients != 1)
&& (teamplay->value > 3) && (teamplay->value < 7)) {
&& (teamplay->int_val > 3) && (teamplay->int_val < 7)) {
int top, bottom;
int xofs;
@ -882,7 +882,7 @@ Sbar_DrawNormal
*/
void Sbar_DrawNormal (void)
{
if (cl_sbar->value || scr_viewsize->value < 100)
if (cl_sbar->int_val || scr_viewsize->value < 100)
Sbar_DrawPic (0, 0, sb_sbar);
if (hipnotic) {
@ -961,7 +961,7 @@ void Sbar_Draw (void)
qboolean headsup;
// char st[512];
headsup = !(cl_sbar->value || scr_viewsize->value<100);
headsup = !(cl_sbar->int_val || scr_viewsize->value<100);
if ((sb_updates >= vid.numpages) && !headsup)
return;

View file

@ -373,7 +373,7 @@ SCR_DrawRam
*/
void SCR_DrawRam (void)
{
if (!scr_showram->value)
if (!scr_showram->int_val)
return;
if (!r_cache_thrash)
@ -391,7 +391,7 @@ void SCR_DrawTurtle (void)
{
static int count;
if (!scr_showturtle->value)
if (!scr_showturtle->int_val)
return;
if (host_frametime < 0.1)
@ -431,7 +431,7 @@ void SCR_DrawPause (void)
{
qpic_t *pic;
if (!scr_showpause->value) // turn off for screenshots
if (!scr_showpause->int_val) // turn off for screenshots
return;
if (!cl.paused)
@ -890,9 +890,9 @@ void SCR_UpdateScreen (void)
vid.recalc_refdef = true;
}
if (oldsbar != cl_sbar->value)
if (oldsbar != cl_sbar->int_val)
{
oldsbar = cl_sbar->value;
oldsbar = cl_sbar->int_val;
vid.recalc_refdef = true;
}

View file

@ -354,13 +354,13 @@ sfx_t *S_PrecacheSound (char *name)
{
sfx_t *sfx;
if (!sound_started || nosound->value)
if (!sound_started || nosound->int_val)
return NULL;
sfx = S_FindName (name);
// cache it in
if (precache->value)
if (precache->int_val)
S_LoadSound (sfx);
return sfx;
@ -485,7 +485,7 @@ void S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f
if (!sfx)
return;
if (nosound->value)
if (nosound->int_val)
return;
vol = fvol*255;
@ -812,7 +812,7 @@ void S_Update(vec3_t origin, vec3_t forward, vec3_t right, vec3_t up)
//
// debugging output
//
if (snd_show->value)
if (snd_show->int_val)
{
total = 0;
ch = channels;
@ -871,7 +871,7 @@ void S_ExtraUpdate (void)
IN_Accumulate ();
#endif
if (snd_noextraupdate->value)
if (snd_noextraupdate->int_val)
return; // don't pollute timings
S_Update_();
}
@ -1009,7 +1009,7 @@ void S_LocalSound (char *sound)
{
sfx_t *sfx;
if (nosound->value)
if (nosound->int_val)
return;
if (!sound_started)
return;

View file

@ -68,7 +68,7 @@ void ResampleSfx (sfx_t *sfx, int inrate, int inwidth, byte *data)
sc->loopstart = sc->loopstart / stepscale;
sc->speed = shm->speed;
if (loadas8bit->value)
if (loadas8bit->int_val)
sc->width = 1;
else
sc->width = inwidth;

View file

@ -205,7 +205,7 @@ void SV_SendServerinfo (client_t *client)
MSG_WriteLong (&client->message, PROTOCOL_VERSION);
MSG_WriteByte (&client->message, svs.maxclients);
if (!coop->value && deathmatch->value)
if (!coop->int_val && deathmatch->int_val)
MSG_WriteByte (&client->message, GAME_DEATHMATCH);
else
MSG_WriteByte (&client->message, GAME_COOP);
@ -1071,9 +1071,9 @@ void SV_SpawnServer (char *server)
//
// make cvars consistant
//
if (coop->value)
if (coop->int_val)
Cvar_SetValue(deathmatch, 0);
current_skill = (int)(skill->value + 0.5);
current_skill = skill->int_val;
if (current_skill < 0)
current_skill = 0;
if (current_skill > 3)
@ -1164,10 +1164,10 @@ void SV_SpawnServer (char *server)
ent->v.solid = SOLID_BSP;
ent->v.movetype = MOVETYPE_PUSH;
if (coop->value)
pr_global_struct->coop = coop->value;
if (coop->int_val)
pr_global_struct->coop = coop->int_val;
else
pr_global_struct->deathmatch = deathmatch->value;
pr_global_struct->deathmatch = deathmatch->int_val;
pr_global_struct->mapname = sv.name - pr_strings;
#ifdef QUAKE2

View file

@ -999,7 +999,7 @@ void SV_WalkMove (edict_t *ent)
if (ent->v.movetype != MOVETYPE_WALK)
return; // gibbed by a trigger
if (sv_nostep->value)
if (sv_nostep->int_val)
return;
if ( (int)sv_player->v.flags & FL_WATERJUMP )

View file

@ -181,9 +181,9 @@ void V_RenderView (void)
R_RenderView ();
}
if (crosshair->value)
Draw_Character8 (scr_vrect.x + scr_vrect.width/2 + cl_crossx->value,
scr_vrect.y + scr_vrect.height/2 + cl_crossy->value, '+');
if (crosshair->int_val)
Draw_Character8 (scr_vrect.x + scr_vrect.width/2 + cl_crossx->int_val,
scr_vrect.y + scr_vrect.height/2 + cl_crossy->int_val, '+');
}
void

View file

@ -583,7 +583,7 @@ void Sys_Quit (void)
// load the sell screen before shuting everything down
if (registered->value)
if (registered->int_val)
d = COM_LoadHunkFile ("end2.bin");
else
d = COM_LoadHunkFile ("end1.bin");

View file

@ -270,7 +270,7 @@ Sys_Printf (char *fmt, ...)
if (nostdout)
return;
if (timestamps && timeformat && timestamps->value && timeformat->string) {
if (timestamps && timeformat && timestamps->int_val && timeformat->string) {
mytime = time (NULL);
local = localtime (&mytime);
strftime (stamp, sizeof (stamp), timeformat->string, local);

View file

@ -261,7 +261,7 @@ Sys_Printf (char *fmt, ...)
if (nostdout)
return;
if (timestamps && timeformat && timestamps && timeformat && timeformat->string && timestamps->value) {
if (timestamps && timeformat && timestamps && timeformat && timeformat->string && timestamps->int_val) {
mytime = time (NULL);
local = localtime (&mytime);
strftime (stamp, sizeof (stamp), timeformat->string, local);

View file

@ -131,7 +131,7 @@ void VID_Init (unsigned char *palette)
vid_testingmode = 0;
vid_modenum = vid_mode->value;
vid_modenum = vid_mode->int_val;
VID_SetMode (vid_modenum, palette);
@ -338,13 +338,13 @@ VID_Update
*/
void VID_Update (vrect_t *rects)
{
if (firstupdate && _vid_default_mode->value)
if (firstupdate && _vid_default_mode->int_val)
{
if(_vid_default_mode->value >= numvidmodes)
if(_vid_default_mode->int_val >= numvidmodes)
Cvar_SetValue(_vid_default_mode, 0);
firstupdate = 0;
Cvar_SetValue(vid_mode, _vid_default_mode->value);
Cvar_SetValue(vid_mode, _vid_default_mode->int_val);
}
(*pcurrentmode->swapbuffers)(&vid, pcurrentmode, rects);
@ -361,9 +361,9 @@ void VID_Update (vrect_t *rects)
}
else
{
if (vid_mode->value != vid_realmode)
if (vid_mode->int_val != vid_realmode)
{
VID_SetMode ((int)vid_mode->value, vid_current_palette);
VID_SetMode (vid_mode->int_val, vid_current_palette);
Cvar_SetValue(vid_mode, (float)vid_modenum);
// so if mode set fails, we don't keep on
// trying to set that mode
@ -440,7 +440,7 @@ void VID_DescribeModes_f (void)
Con_Printf ("\n%s\n", pheader);
if (VGA_CheckAdequateMem (pv->width, pv->height, pv->rowbytes,
(pv->numpages == 1) || vid_nopageflip->value))
(pv->numpages == 1) || vid_nopageflip->int_val))
{
Con_Printf ("%2d: %s\n", i, pinfo);
}
@ -472,7 +472,7 @@ char *VID_GetModeDescription (int mode)
pinfo = VID_ModeInfo (mode, &pheader);
if (VGA_CheckAdequateMem (pv->width, pv->height, pv->rowbytes,
(pv->numpages == 1) || vid_nopageflip->value))
(pv->numpages == 1) || vid_nopageflip->int_val))
{
return pinfo;
}
@ -682,7 +682,7 @@ void VID_MenuDraw (void)
ptr = VID_GetModeDescription (vid_modenum);
snprintf (temp, sizeof(temp), "D to make %s the default", ptr);
M_Print (6*8, 36 + MAX_COLUMN_SIZE * 8 + 8*5, temp);
ptr = VID_GetModeDescription ((int)_vid_default_mode->value);
ptr = VID_GetModeDescription (_vid_default_mode->int_val);
if (ptr)
{

View file

@ -596,7 +596,7 @@ int VID_ExtraInitMode (viddef_t *lvid, vmode_t *pcurrentmode)
pextra = pcurrentmode->pextradata;
if (vid_nopageflip->value)
if (vid_nopageflip->int_val)
lvid->numpages = 1;
else
lvid->numpages = pcurrentmode->numpages;
@ -637,7 +637,7 @@ int VID_ExtraInitMode (viddef_t *lvid, vmode_t *pcurrentmode)
if (!pextra->vga_incompatible &&
(lvid->numpages == 3) &&
de_exists &&
(_vid_wait_override->value == 0.0))
!_vid_wait_override->int_val)
{
Cvar_SetValue(vid_wait, (float)VID_WAIT_DISPLAY_ENABLE);
@ -646,7 +646,7 @@ int VID_ExtraInitMode (viddef_t *lvid, vmode_t *pcurrentmode)
}
else
{
if ((lvid->numpages == 1) && (_vid_wait_override->value == 0.0))
if ((lvid->numpages == 1) && !_vid_wait_override->int_val)
{
Cvar_SetValue(vid_wait, (float)VID_WAIT_NONE);
VID_displayedpage = VID_currentpage = 0;
@ -734,9 +734,9 @@ void VID_ExtraSwapBuffers (viddef_t *lvid, vmode_t *pcurrentmode,
// page flipped
regs.x.ax = 0x4f07;
if (vid_wait->value != VID_WAIT_VSYNC)
if (vid_wait->int_val != VID_WAIT_VSYNC)
{
if ((vid_wait->value == VID_WAIT_DISPLAY_ENABLE) && de_exists)
if ((vid_wait->int_val == VID_WAIT_DISPLAY_ENABLE) && de_exists)
VID_ExtraWaitDisplayEnable ();
regs.x.bx = VESA_DONT_WAIT_VSYNC;
@ -778,7 +778,7 @@ void VID_ExtraSwapBuffers (viddef_t *lvid, vmode_t *pcurrentmode,
else
{
// non-page-flipped
if (vsync_exists && (vid_wait->value == VID_WAIT_VSYNC))
if (vsync_exists && (vid_wait->int_val == VID_WAIT_VSYNC))
{
VGA_WaitVsync ();
}

View file

@ -912,15 +912,15 @@ IN_Commands (void)
{
/* Only supported by LibGII 0.7 or later. */
#ifdef GII_CMDCODE_PREFER_RELPTR
if (old_windowed_mouse != _windowed_mouse->value) {
if (old_windowed_mouse != _windowed_mouse->int_val) {
gii_event ev;
old_windowed_mouse = _windowed_mouse->value;
old_windowed_mouse = _windowed_mouse->int_val;
ev.cmd.size = sizeof(gii_cmd_nodata_event);
ev.cmd.type = evCommand;
ev.cmd.target = GII_EV_TARGET_ALL;
ev.cmd.code = (int)_windowed_mouse->value ? GII_CMDCODE_PREFER_RELPTR
ev.cmd.code = (int)_windowed_mouse->int_val ? GII_CMDCODE_PREFER_RELPTR
: GII_CMDCODE_PREFER_ABSPTR;
ggiEventSend(ggivis, &ev);
@ -934,7 +934,7 @@ IN_Move(usercmd_t *cmd)
{
if (!mouse_avail) return;
if (m_filter->value) {
if (m_filter->int_val) {
mouse_x = (mouse_x + old_mouse_x) * 0.5;
mouse_y = (mouse_y + old_mouse_y) * 0.5;
}
@ -945,7 +945,7 @@ IN_Move(usercmd_t *cmd)
mouse_x *= sensitivity->value;
mouse_y *= sensitivity->value;
if ( (in_strafe.state & 1) || (lookstrafe->value && freelook ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && freelook ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;

View file

@ -217,10 +217,10 @@ VID_CheckWindowXY
void VID_CheckWindowXY (void)
{
if (((int)vid_window_x->value > (GetSystemMetrics (SM_CXSCREEN) - 160)) ||
((int)vid_window_y->value > (GetSystemMetrics (SM_CYSCREEN) - 120)) ||
((int)vid_window_x->value < 0) ||
((int)vid_window_y->value < 0))
if ((vid_window_x->int_val > (GetSystemMetrics (SM_CXSCREEN) - 160)) ||
(vid_window_y->int_val > (GetSystemMetrics (SM_CYSCREEN) - 120)) ||
(vid_window_x->int_val < 0) ||
(vid_window_y->int_val < 0))
{
Cvar_SetValue (vid_window_x, 0.0);
Cvar_SetValue (vid_window_y, 0.0 );
@ -381,7 +381,7 @@ int VID_Suspend (MGLDC *dc, int flags)
if (flags & MGL_DEACTIVATE)
{
// FIXME: this doesn't currently work on NT
if (block_switch->value && !WinNT)
if (block_switch->int_val && !WinNT)
{
return MGL_NO_DEACTIVATE;
}
@ -1098,17 +1098,17 @@ void VID_CheckModedescFixup (int mode)
if (mode == MODE_SETTABLE_WINDOW)
{
modelist[mode].stretched = (int)vid_stretch_by_2->value;
modelist[mode].stretched = vid_stretch_by_2->int_val;
stretch = modelist[mode].stretched;
if (vid_config_x->value < (320 << stretch))
vid_config_x->value = 320 << stretch;
if (vid_config_x->int_val < (320 << stretch))
vid_config_x->int_val = 320 << stretch;
if (vid_config_y->value < (200 << stretch))
vid_config_y->value = 200 << stretch;
if (vid_config_y->int_val < (200 << stretch))
vid_config_y->int_val = 200 << stretch;
x = (int)vid_config_x->value;
y = (int)vid_config_y->value;
x = vid_config_x->int_val;
y = vid_config_y->int_val;
snprintf (modelist[mode].modedesc, sizeof(modelist[mode].modedesc), "%dx%d", x, y);
modelist[mode].width = x;
modelist[mode].height = y;
@ -1384,8 +1384,8 @@ qboolean VID_SetWindowedMode (int modenum)
// position and show the DIB window
VID_CheckWindowXY ();
SetWindowPos (mainwindow, NULL, (int)vid_window_x->value,
(int)vid_window_y->value, 0, 0,
SetWindowPos (mainwindow, NULL, vid_window_x->int_val,
vid_window_y->int_val, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_DRAWFRAME);
if (force_minimized)
@ -1452,7 +1452,7 @@ qboolean VID_SetFullscreenMode (int modenum)
mgldc = memdc = NULL;
if ((mgldc = createDisplayDC (modelist[modenum].stretched ||
(int)vid_nopageflip->value)) == NULL)
vid_nopageflip->int_val)) == NULL)
{
return false;
}
@ -1676,7 +1676,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
// Set either the fullscreen or windowed mode
if (modelist[modenum].type == MS_WINDOWED)
{
if (_windowed_mouse->value && key_dest == key_game)
if (_windowed_mouse->int_val && key_dest == key_game)
{
stat = VID_SetWindowedMode(modenum);
IN_ActivateMouse ();
@ -2072,7 +2072,7 @@ VID_Windowed_f
void VID_Windowed_f (void)
{
VID_SetMode ((int)vid_windowed_mode->value, vid_curpal);
VID_SetMode (vid_windowed_mode->int_val, vid_curpal);
}
@ -2084,7 +2084,7 @@ VID_Fullscreen_f
void VID_Fullscreen_f (void)
{
VID_SetMode ((int)vid_fullscreen_mode->value, vid_curpal);
VID_SetMode (vid_fullscreen_mode->int_val, vid_curpal);
}
/*
@ -2386,8 +2386,8 @@ void VID_Update (vrect_t *rects)
{
GetWindowRect (mainwindow, &trect);
if ((trect.left != (int)vid_window_x->value) ||
(trect.top != (int)vid_window_y->value))
if ((trect.left != vid_window_x->int_val) ||
(trect.top != vid_window_y->int_val))
{
if (COM_CheckParm ("-resetwinpos"))
{
@ -2396,14 +2396,14 @@ void VID_Update (vrect_t *rects)
}
VID_CheckWindowXY ();
SetWindowPos (mainwindow, NULL, (int)vid_window_x->value,
(int)vid_window_y->value, 0, 0,
SetWindowPos (mainwindow, NULL, vid_window_x->int_val,
vid_window_y->int_val, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_DRAWFRAME);
}
}
if ((_vid_default_mode_win->value != vid_default) &&
(!startwindowed || (_vid_default_mode_win->value < MODE_FULLSCREEN_DEFAULT)))
if ((_vid_default_mode_win->int_val != vid_default) &&
(!startwindowed || (_vid_default_mode_win->int_val < MODE_FULLSCREEN_DEFAULT)))
{
firstupdate = 0;
@ -2413,13 +2413,13 @@ void VID_Update (vrect_t *rects)
Cvar_SetValue (vid_window_y, 0.0);
}
if ((_vid_default_mode_win->value < 0) ||
(_vid_default_mode_win->value >= nummodes))
if ((_vid_default_mode_win->int_val < 0) ||
(_vid_default_mode_win->int_val >= nummodes))
{
Cvar_SetValue (_vid_default_mode_win, windowed_default);
}
Cvar_SetValue (vid_mode, _vid_default_mode_win->value);
Cvar_SetValue (vid_mode, _vid_default_mode_win->int_val);
}
}
@ -2436,9 +2436,9 @@ void VID_Update (vrect_t *rects)
}
else
{
if ((int)vid_mode->value != vid_realmode)
if (vid_mode->int_val != vid_realmode)
{
VID_SetMode ((int)vid_mode->value, vid_curpal);
VID_SetMode (vid_mode->int_val, vid_curpal);
Cvar_SetValue (vid_mode, (float)vid_modenum);
// so if mode set fails, we don't keep on
// trying to set that mode
@ -2449,7 +2449,7 @@ void VID_Update (vrect_t *rects)
// handle the mouse state when windowed if that's changed
if (modestate == MS_WINDOWED)
{
if (!_windowed_mouse->value) {
if (!_windowed_mouse->int_val) {
if (windowed_mouse) {
IN_DeactivateMouse ();
IN_ShowMouse ();
@ -2830,7 +2830,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
IN_ActivateMouse ();
IN_HideMouse ();
}
else if ((modestate == MS_WINDOWED) && _windowed_mouse->value && key_dest == key_game)
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val && key_dest == key_game)
{
IN_ActivateMouse ();
IN_HideMouse ();
@ -2862,7 +2862,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
IN_DeactivateMouse ();
IN_ShowMouse ();
}
else if ((modestate == MS_WINDOWED) && _windowed_mouse->value /* && mouseactive */)
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val /* && mouseactive */)
{
IN_DeactivateMouse ();
IN_ShowMouse ();
@ -2880,7 +2880,7 @@ VID_HandlePause
void VID_HandlePause (qboolean pause)
{
#if 0
if ((modestate == MS_WINDOWED) && _windowed_mouse->value)
if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val)
{
if (pause)
{
@ -2946,7 +2946,7 @@ LONG WINAPI MainWndProc (
force_mode_set = false;
}
VID_SetMode ((int)vid_fullscreen_mode->value, vid_curpal);
VID_SetMode ((int)vid_fullscreen_mode->int_val, vid_curpal);
break;
case SC_SCREENSAVE:
@ -3326,7 +3326,7 @@ void VID_MenuDraw (void)
M_Print (2*8, 36 + MODE_AREA_HEIGHT * 8 + 8*5, temp);
}
ptr = VID_GetModeDescription2 ((int)_vid_default_mode_win->value);
ptr = VID_GetModeDescription2 (_vid_default_mode_win->int_val);
if (ptr)
{

View file

@ -392,7 +392,7 @@ void IN_SendKeyEvents (void)
break;
case SDL_MOUSEMOTION:
if (_windowed_mouse->value)
if (_windowed_mouse->int_val)
{
if ((event.motion.x != (vid.width/2))
|| (event.motion.y != (vid.height/2)) )
@ -427,10 +427,10 @@ void IN_SendKeyEvents (void)
void
IN_Commands (void)
{
if (old_windowed_mouse != _windowed_mouse->value)
if (old_windowed_mouse != _windowed_mouse->int_val)
{
old_windowed_mouse = _windowed_mouse->value;
if (!_windowed_mouse->value)
old_windowed_mouse = _windowed_mouse->int_val;
if (!_windowed_mouse->int_val)
SDL_WM_GrabInput (SDL_GRAB_OFF);
else
SDL_WM_GrabInput (SDL_GRAB_ON);
@ -441,7 +441,7 @@ void IN_Init (void)
{
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
if ( COM_CheckParm("-nomouse") && !_windowed_mouse->value)
if ( COM_CheckParm("-nomouse") && !_windowed_mouse->int_val)
return;
mouse_x = mouse_y = 0.0;
@ -481,7 +481,7 @@ void IN_Move (usercmd_t *cmd)
mouse_x *= sensitivity->value;
mouse_y *= sensitivity->value;
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;

View file

@ -380,7 +380,7 @@ VID_Init (unsigned char *palette)
Sys_Error ("Couldn't initialize SDL: %s\n", SDL_GetError ());
// Check if we want fullscreen
if (vid_fullscreen->value) {
if (vid_fullscreen->int_val) {
flags |= SDL_FULLSCREEN;
// Don't annoy Mesa/3dfx folks
#ifndef WIN32
@ -603,7 +603,7 @@ IN_SendKeyEvents (void)
break;
case SDL_MOUSEMOTION:
if (_windowed_mouse->value) {
if (_windowed_mouse->int_val) {
if ((event.motion.x != (vid.width/2)) ||
(event.motion.y != (vid.height/2)) ) {
mouse_x = event.motion.xrel*2;
@ -637,7 +637,7 @@ IN_Init (void)
_windowed_mouse = Cvar_Get ("_windowed_mouse", "0", CVAR_ARCHIVE, "Grab mouse and keyboard input");
m_filter = Cvar_Get ("m_filter", "0", CVAR_ARCHIVE, "None");
if (COM_CheckParm ("-nomouse") && !_windowed_mouse->value)
if (COM_CheckParm ("-nomouse") && !_windowed_mouse->int_val)
return;
mouse_x = mouse_y = 0.0;
@ -656,10 +656,10 @@ IN_Shutdown (void)
void
IN_Commands(void)
{
if (old__windowed_mouse != _windowed_mouse->value) {
old__windowed_mouse = _windowed_mouse->value;
if (old__windowed_mouse != _windowed_mouse->int_val) {
old__windowed_mouse = _windowed_mouse->int_val;
if (_windowed_mouse->value) { // grab the pointer
if (_windowed_mouse->int_val) { // grab the pointer
SDL_ShowCursor (0);
SDL_WM_GrabInput (SDL_GRAB_ON);
} else { // ungrab the pointer
@ -675,7 +675,7 @@ IN_Move(usercmd_t *cmd)
if (!mouse_avail)
return;
if (m_filter->value) {
if (m_filter->int_val) {
mouse_x = (mouse_x + old_mouse_x) * 0.5;
mouse_y = (mouse_y + old_mouse_y) * 0.5;
}
@ -686,7 +686,7 @@ IN_Move(usercmd_t *cmd)
mouse_x *= sensitivity->value;
mouse_y *= sensitivity->value;
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;

View file

@ -1236,7 +1236,7 @@ void IN_Move (usercmd_t *cmd)
if (!mouse_avail)
return;
if (m_filter->value) {
if (m_filter->int_val) {
mouse_x = (mouse_x + old_mouse_x) * 0.5;
mouse_y = (mouse_y + old_mouse_y) * 0.5;
}
@ -1247,7 +1247,7 @@ void IN_Move (usercmd_t *cmd)
mouse_x *= sensitivity->value;
mouse_y *= sensitivity->value;
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;

View file

@ -240,7 +240,7 @@ qboolean CheckPixelMultiply (void)
unsigned int value_mask;
int old_pixel;
if ((m = (int)pixel_multiply->value) != current_pixel_multiply) {
if ((m = pixel_multiply->int_val) != current_pixel_multiply) {
if (m < 1)
m = 1;
if (m > 4)
@ -519,9 +519,9 @@ void VID_Init (unsigned char *palette)
//
// See if we're going to do pixel multiply
//
if (pixel_multiply->value < 1 || pixel_multiply->value > 4)
if (pixel_multiply->int_val < 1 || pixel_multiply->int_val > 4)
Cvar_SetValue(pixel_multiply, 2);
current_pixel_multiply = pixel_multiply->value;
current_pixel_multiply = pixel_multiply->int_val;
w = 320*current_pixel_multiply; // minimum width
h = 200*current_pixel_multiply; // minimum height
@ -851,7 +851,7 @@ void GetEvent(void)
case MotionNotify:
if (_windowed_mouse->value) {
if (_windowed_mouse->int_val) {
mouse_x = (float) ((int)x_event.xmotion.x - (int)(vid.width/2));
mouse_y = (float) ((int)x_event.xmotion.y - (int)(vid.height/2));
//printf("m: x=%d,y=%d, mx=%3.2f,my=%3.2f\n",
@ -919,10 +919,10 @@ void GetEvent(void)
#endif
}
if (old_windowed_mouse != _windowed_mouse->value) {
old_windowed_mouse = _windowed_mouse->value;
if (old_windowed_mouse != _windowed_mouse->int_val) {
old_windowed_mouse = _windowed_mouse->int_val;
if (!_windowed_mouse->value) {
if (!_windowed_mouse->int_val) {
/* ungrab the pointer */
XUngrabPointer(x_disp,CurrentTime);
} else {
@ -1261,7 +1261,7 @@ void IN_Move (usercmd_t *cmd)
if (!mouse_avail)
return;
if (m_filter->value) {
if (m_filter->int_val) {
mouse_x = (mouse_x + old_mouse_x) * 0.5;
mouse_y = (mouse_y + old_mouse_y) * 0.5;
}
@ -1272,7 +1272,7 @@ void IN_Move (usercmd_t *cmd)
mouse_x *= sensitivity->value;
mouse_y *= sensitivity->value;
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->int_val && (in_mlook.state & 1) ))
cmd->sidemove += m_side->value * mouse_x;
else
cl.viewangles[YAW] -= m_yaw->value * mouse_x;

View file

@ -411,14 +411,14 @@ VID_SetMode(int modenum, unsigned char *palette)
int err;
if ((modenum >= num_modes) || (modenum < 0) || !modes[modenum].width){
vid_mode->value = (float)current_mode;
vid_mode->int_val = (float)current_mode;
Con_Printf("No such video mode: %d\n",modenum);
return 0;
}
vid_mode->value = (float)modenum;
vid_mode->int_val = modenum;
current_mode=modenum;
@ -573,13 +573,13 @@ VID_Update(vrect_t *rects)
return;
}
if (vid_waitforrefresh->value) {
if (vid_waitforrefresh->int_val) {
vga_waitretrace();
}
if (VGA_planar) {
VGA_UpdatePlanarScreen(vid.buffer);
} else if (vid_redrawfull->value) {
} else if (vid_redrawfull->int_val) {
int total = vid.rowbytes * vid.height;
int offset;
@ -625,8 +625,8 @@ VID_Update(vrect_t *rects)
}
}
if (vid_mode->value != current_mode) {
VID_SetMode ((int)vid_mode->value, vid_current_palette);
if (vid_mode->int_val != current_mode) {
VID_SetMode (vid_mode->int_val, vid_current_palette);
}
}

View file

@ -394,7 +394,7 @@ int VGA_InitMode (viddef_t *lvid, vmode_t *pcurrentmode)
VGA_ClearVideoMem (pcurrentmode->planar);
if (_vid_wait_override->value)
if (_vid_wait_override->int_val)
{
Cvar_SetValue(vid_wait, (float)VID_WAIT_VSYNC);
}
@ -476,7 +476,7 @@ void VGA_SwapBuffers (viddef_t *lvid, vmode_t *pcurrentmode, vrect_t *rects)
{
UNUSED(lvid);
if (vid_wait->value == VID_WAIT_VSYNC)
if (vid_wait->int_val == VID_WAIT_VSYNC)
VGA_WaitVsync ();
VGA_SwapBuffersCopy (lvid, pcurrentmode, rects);

View file

@ -424,7 +424,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
// Set either the fullscreen or windowed mode
if (modelist[modenum].type == MS_WINDOWED)
{
if (_windowed_mouse->value && key_dest == key_game)
if (_windowed_mouse->int_val && key_dest == key_game)
{
stat = VID_SetWindowedMode(modenum);
IN_ActivateMouse ();
@ -691,7 +691,7 @@ void GL_EndRendering (void)
// handle the mouse state when windowed if that's changed
if (modestate == MS_WINDOWED)
{
if (!_windowed_mouse->value) {
if (!_windowed_mouse->int_val) {
if (windowed_mouse) {
IN_DeactivateMouse ();
IN_ShowMouse ();
@ -1024,7 +1024,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
ShowWindow(mainwindow, SW_SHOWNORMAL);
}
}
else if ((modestate == MS_WINDOWED) && _windowed_mouse->value && key_dest == key_game)
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val && key_dest == key_game)
{
IN_ActivateMouse ();
IN_HideMouse ();
@ -1042,7 +1042,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
vid_wassuspended = true;
}
}
else if ((modestate == MS_WINDOWED) && _windowed_mouse->value)
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val)
{
IN_DeactivateMouse ();
IN_ShowMouse ();

View file

@ -192,10 +192,10 @@ VID_CheckWindowXY
void VID_CheckWindowXY (void)
{
if (((int)vid_window_x->value > (GetSystemMetrics (SM_CXSCREEN) - 160)) ||
((int)vid_window_y->value > (GetSystemMetrics (SM_CYSCREEN) - 120)) ||
((int)vid_window_x->value < 0) ||
((int)vid_window_y->value < 0))
if ((vid_window_x->int_val > (GetSystemMetrics (SM_CXSCREEN) - 160)) ||
(vid_window_y->int_val > (GetSystemMetrics (SM_CYSCREEN) - 120)) ||
(vid_window_x->int_val < 0) ||
(vid_window_y->int_val < 0))
{
Cvar_SetValue(vid_window_x, 0.0);
Cvar_SetValue(vid_window_y, 0.0 );
@ -325,7 +325,7 @@ int VID_Suspend (MGLDC *dc,m_int flags)
if (flags & MGL_DEACTIVATE)
{
// FIXME: this doesn't currently work on NT
if (block_switch->value && !WinNT)
if (block_switch->int_val && !WinNT)
{
return MGL_NO_DEACTIVATE;
}
@ -1045,17 +1045,17 @@ void VID_CheckModedescFixup (int mode)
if (mode == MODE_SETTABLE_WINDOW)
{
modelist[mode].stretched = (int)vid_stretch_by_2->value;
modelist[mode].stretched = vid_stretch_by_2->int_val;
stretch = modelist[mode].stretched;
if (vid_config_x->value < (320 << stretch))
vid_config_x->value = 320 << stretch;
if (vid_config_x->int_val < (320 << stretch))
vid_config_x->int_val = 320 << stretch;
if (vid_config_y->value < (200 << stretch))
vid_config_y->value = 200 << stretch;
if (vid_config_y->int_val < (200 << stretch))
vid_config_y->int_val = 200 << stretch;
x = (int)vid_config_x->value;
y = (int)vid_config_y->value;
x = vid_config_x->int_val;
y = vid_config_y->int_val;
snprintf (modelist[mode].modedesc, sizeof(modelist[mode].modedesc), "%dx%d", x, y);
modelist[mode].width = x;
modelist[mode].height = y;
@ -1332,8 +1332,8 @@ qboolean VID_SetWindowedMode (int modenum)
// position and show the DIB window
VID_CheckWindowXY ();
SetWindowPos (mainwindow, NULL, (int)vid_window_x->value,
(int)vid_window_y->value, 0, 0,
SetWindowPos (mainwindow, NULL, vid_window_x->int_val,
vid_window_y->int_val, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_DRAWFRAME);
if (force_minimized)
@ -1400,7 +1400,7 @@ qboolean VID_SetFullscreenMode (int modenum)
mgldc = memdc = NULL;
if ((mgldc = createDisplayDC (modelist[modenum].stretched ||
(int)vid_nopageflip->value)) == NULL)
vid_nopageflip->int_val)) == NULL)
{
return false;
}
@ -1624,7 +1624,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
// Set either the fullscreen or windowed mode
if (modelist[modenum].type == MS_WINDOWED)
{
if (_windowed_mouse->value)
if (_windowed_mouse->int_val)
{
stat = VID_SetWindowedMode(modenum);
IN_ActivateMouse ();
@ -2017,7 +2017,7 @@ VID_Windowed_f
void VID_Windowed_f (void)
{
VID_SetMode ((int)vid_windowed_mode->value, vid_curpal);
VID_SetMode (vid_windowed_mode->int_val, vid_curpal);
}
@ -2029,7 +2029,7 @@ VID_Fullscreen_f
void VID_Fullscreen_f (void)
{
VID_SetMode ((int)vid_fullscreen_mode->value, vid_curpal);
VID_SetMode (vid_fullscreen_mode->int_val, vid_curpal);
}
@ -2339,8 +2339,8 @@ void VID_Update (vrect_t *rects)
{
GetWindowRect (mainwindow, &trect);
if ((trect.left != (int)vid_window_x->value) ||
(trect.top != (int)vid_window_y->value))
if ((trect.left != vid_window_x->int_val) ||
(trect.top != vid_window_y->int_val))
{
if (COM_CheckParm ("-resetwinpos"))
{
@ -2349,14 +2349,14 @@ void VID_Update (vrect_t *rects)
}
VID_CheckWindowXY ();
SetWindowPos (mainwindow, NULL, (int)vid_window_x->value,
(int)vid_window_y->value, 0, 0,
SetWindowPos (mainwindow, NULL, vid_window_x->int_val,
vid_window_y->int_val, 0, 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_DRAWFRAME);
}
}
if ((_vid_default_mode_win->value != vid_default) &&
(!startwindowed || (_vid_default_mode_win->value < MODE_FULLSCREEN_DEFAULT)))
if ((_vid_default_mode_win->int_val != vid_default) &&
(!startwindowed || (_vid_default_mode_win->int_val < MODE_FULLSCREEN_DEFAULT)))
{
firstupdate = 0;
@ -2366,13 +2366,13 @@ void VID_Update (vrect_t *rects)
Cvar_SetValue(vid_window_y, 0.0);
}
if ((_vid_default_mode_win->value < 0) ||
(_vid_default_mode_win->value >= nummodes))
if ((_vid_default_mode_win->int_val < 0) ||
(_vid_default_mode_win->int_val >= nummodes))
{
Cvar_SetValue(_vid_default_mode_win, windowed_default);
}
Cvar_SetValue(vid_mode, _vid_default_mode_win->value);
Cvar_SetValue(vid_mode, _vid_default_mode_win->int_val);
}
}
@ -2389,9 +2389,9 @@ void VID_Update (vrect_t *rects)
}
else
{
if ((int)vid_mode->value != vid_realmode)
if (vid_mode->int_val != vid_realmode)
{
VID_SetMode ((int)vid_mode->value, vid_curpal);
VID_SetMode (vid_mode->int_val, vid_curpal);
Cvar_SetValue(vid_mode, (float)vid_modenum);
// so if mode set fails, we don't keep on
// trying to set that mode
@ -2402,9 +2402,9 @@ void VID_Update (vrect_t *rects)
// handle the mouse state when windowed if that's changed
if (modestate == MS_WINDOWED)
{
if ((int)_windowed_mouse->value != windowed_mouse)
if (_windowed_mouse->int_val != windowed_mouse)
{
if (_windowed_mouse->value)
if (_windowed_mouse->int_val)
{
IN_ActivateMouse ();
IN_HideMouse ();
@ -2415,7 +2415,7 @@ void VID_Update (vrect_t *rects)
IN_ShowMouse ();
}
windowed_mouse = (int)_windowed_mouse->value;
windowed_mouse = _windowed_mouse->int_val;
}
}
}
@ -2750,7 +2750,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
IN_ActivateMouse ();
IN_HideMouse ();
}
else if ((modestate == MS_WINDOWED) && _windowed_mouse->value)
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val)
{
IN_ActivateMouse ();
IN_HideMouse ();
@ -2782,7 +2782,7 @@ void AppActivate(BOOL fActive, BOOL minimize)
IN_DeactivateMouse ();
IN_ShowMouse ();
}
else if ((modestate == MS_WINDOWED) && _windowed_mouse->value)
else if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val)
{
IN_DeactivateMouse ();
IN_ShowMouse ();
@ -2800,7 +2800,7 @@ VID_HandlePause
void VID_HandlePause (qboolean pause)
{
if ((modestate == MS_WINDOWED) && _windowed_mouse->value)
if ((modestate == MS_WINDOWED) && _windowed_mouse->int_val)
{
if (pause)
{
@ -2859,7 +2859,7 @@ LONG WINAPI MainWndProc (
force_mode_set = false;
}
VID_SetMode ((int)vid_fullscreen_mode->value, vid_curpal);
VID_SetMode (vid_fullscreen_mode->int_val, vid_curpal);
break;
case SC_SCREENSAVE:
@ -3240,7 +3240,7 @@ void VID_MenuDraw (void)
M_Print (2*8, 36 + MODE_AREA_HEIGHT * 8 + 8*5, temp);
}
ptr = VID_GetModeDescription2 ((int)_vid_default_mode_win->value);
ptr = VID_GetModeDescription2 (_vid_default_mode_win->int_val);
if (ptr)
{