most of scr_viewsize value to int_val. r_main causes segs atm

This commit is contained in:
Bill Currie 2000-10-21 00:09:27 +00:00
parent 4c3d4b4dcb
commit e698713185
6 changed files with 29 additions and 28 deletions

View file

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

View file

@ -297,7 +297,7 @@ Internal use only
*/
static void SCR_CalcRefdef (void)
{
float size;
int size;
int h;
qboolean full = false;
@ -311,7 +311,7 @@ static void SCR_CalcRefdef (void)
//========================================
// bound viewsize
Cvar_SetValue (scr_viewsize, bound (30, scr_viewsize->value, 120));
Cvar_SetValue (scr_viewsize, bound (30, scr_viewsize->int_val, 120));
// bound field of view
Cvar_SetValue (scr_fov, bound (10, scr_fov->value, 170));
@ -320,7 +320,7 @@ static void SCR_CalcRefdef (void)
if (cl.intermission)
size = 120;
else
size = scr_viewsize->value;
size = scr_viewsize->int_val;
if (size >= 120)
sb_lines = 0; // no status bar at all
@ -329,11 +329,11 @@ static void SCR_CalcRefdef (void)
else
sb_lines = 24+16+8;
if (scr_viewsize->value >= 100.0) {
if (scr_viewsize->int_val >= 100) {
full = true;
size = 100.0;
size = 100;
} else {
size = scr_viewsize->value;
size = scr_viewsize->int_val;
}
if (cl.intermission) {
@ -384,7 +384,7 @@ Keybinding command
*/
void SCR_SizeUp_f (void)
{
Cvar_SetValue (scr_viewsize,scr_viewsize->value+10);
Cvar_SetValue (scr_viewsize,scr_viewsize->int_val+10);
vid.recalc_refdef = 1;
}
@ -398,7 +398,7 @@ Keybinding command
*/
void SCR_SizeDown_f (void)
{
Cvar_SetValue (scr_viewsize,scr_viewsize->value-10);
Cvar_SetValue (scr_viewsize,scr_viewsize->int_val-10);
vid.recalc_refdef = 1;
}

View file

@ -1195,7 +1195,7 @@ void M_Options_Draw (void)
M_Print (16, 48, " Reset to defaults");
M_Print (16, 56, " Screen size");
r = (scr_viewsize->value - 30) / (120 - 30);
r = (scr_viewsize->int_val - 30) / (120.0 - 30.0);
M_DrawSlider (220, 56, r);
M_Print (16, 64, " Brightness");

View file

@ -696,13 +696,13 @@ void V_CalcRefdef (void)
#if 0
if (cl.model_precache[cl.stats[STAT_WEAPON]] && strcmp (cl.model_precache[cl.stats[STAT_WEAPON]]->name, "progs/v_shot2.mdl"))
#endif
if (scr_viewsize->value == 110)
if (scr_viewsize->int_val == 110)
view->origin[2] += 1;
else if (scr_viewsize->value == 100)
else if (scr_viewsize->int_val == 100)
view->origin[2] += 2;
else if (scr_viewsize->value == 90)
else if (scr_viewsize->int_val == 90)
view->origin[2] += 1;
else if (scr_viewsize->value == 80)
else if (scr_viewsize->int_val == 80)
view->origin[2] += 0.5;
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];

View file

@ -961,7 +961,7 @@ void Sbar_Draw (void)
}
}
headsup = !(cl_sbar->int_val || scr_viewsize->value < 100);
headsup = !(cl_sbar->int_val || scr_viewsize->int_val < 100);
sbar_centered = (!headsup && !cl.gametype == GAME_DEATHMATCH);
if ((sb_updates >= vid.numpages) && !headsup)

View file

@ -50,8 +50,9 @@ int scr_copyeverything;
float scr_con_current;
float scr_conlines; // lines of console to display
float oldscreensize, oldfov;
float oldsbar;
int oldscreensize;
float oldfov;
int oldsbar;
cvar_t *scr_viewsize;
cvar_t *scr_fov;
@ -248,7 +249,7 @@ Internal use only
static void SCR_CalcRefdef (void)
{
vrect_t vrect;
float size;
int size;
scr_fullupdate = 0; // force a background redraw
vid.recalc_refdef = 0;
@ -259,9 +260,9 @@ static void SCR_CalcRefdef (void)
//========================================
// bound viewsize
if (scr_viewsize->value < 30)
if (scr_viewsize->int_val < 30)
Cvar_Set (scr_viewsize,"30");
if (scr_viewsize->value > 120)
if (scr_viewsize->int_val > 120)
Cvar_Set (scr_viewsize,"120");
// bound field of view
@ -277,7 +278,7 @@ static void SCR_CalcRefdef (void)
if (cl.intermission)
size = 120;
else
size = scr_viewsize->value;
size = scr_viewsize->int_val;
if (size >= 120)
sb_lines = 0; // no status bar at all
@ -314,7 +315,7 @@ Keybinding command
*/
void SCR_SizeUp_f (void)
{
Cvar_SetValue (scr_viewsize,scr_viewsize->value+10);
Cvar_SetValue (scr_viewsize,scr_viewsize->int_val+10);
vid.recalc_refdef = 1;
}
@ -328,7 +329,7 @@ Keybinding command
*/
void SCR_SizeDown_f (void)
{
Cvar_SetValue (scr_viewsize,scr_viewsize->value-10);
Cvar_SetValue (scr_viewsize,scr_viewsize->int_val-10);
vid.recalc_refdef = 1;
}
@ -863,7 +864,7 @@ needs almost the entire 256k of stack space!
*/
void SCR_UpdateScreen (void)
{
static float oldscr_viewsize;
static int oldscr_viewsize;
static float oldlcd_x;
vrect_t vrect;
@ -890,9 +891,9 @@ void SCR_UpdateScreen (void)
if (!scr_initialized || !con_initialized)
return; // not initialized yet
if (scr_viewsize->value != oldscr_viewsize)
if (scr_viewsize->int_val != oldscr_viewsize)
{
oldscr_viewsize = scr_viewsize->value;
oldscr_viewsize = scr_viewsize->int_val;
vid.recalc_refdef = 1;
}
@ -911,9 +912,9 @@ void SCR_UpdateScreen (void)
vid.recalc_refdef = true;
}
if (oldscreensize != scr_viewsize->value)
if (oldscreensize != scr_viewsize->int_val)
{
oldscreensize = scr_viewsize->value;
oldscreensize = scr_viewsize->int_val;
vid.recalc_refdef = true;
}