예제 #1
0
파일: tr_init.c 프로젝트: jite/jquake
void OnChange_vid_wideaspect (cvar_t *var, char *string, qbool *cancel) 
{
	// FIXME conheight
	extern int nonwideconheight;
	extern cvar_t r_conheight;

	if ( (Q_atoi(string) == vid_wideaspect.value) || (Q_atoi(string) > 1)  || (Q_atoi(string) < 0))
	{
		*cancel = true;
		return;
	}

	Cvar_Set (&vid_wideaspect, string);

	if(!host_everything_loaded)
		return;

	if (nonwideconheight != 0)
	{
		if (vid_wideaspect.integer == 0)
			r_conheight.OnChange(&r_conheight, Q_ftos(nonwideconheight), cancel);
		else
			r_conheight.OnChange(&r_conheight, Q_ftos(r_conheight.value), cancel);
	}
}
예제 #2
0
void OnChange_vid_wideaspect (cvar_t *var, char *string, qbool *cancel) 
{
	extern float nonwidefov;
	extern int nonwideconheight;
	extern cvar_t scr_fov, r_conheight;

	if ( (Q_atoi(string) == vid_wideaspect.value) || (Q_atoi(string) > 1)  || (Q_atoi(string) < 0))
	{
		*cancel = true;
		return;
	}

	Cvar_Set (&vid_wideaspect, string);

	if(!host_everything_loaded)
		return;

	if (nonwidefov != 0 && nonwideconheight != 0)
	{
		if (vid_wideaspect.integer == 0)
		{
			scr_fov.OnChange(&scr_fov, Q_ftos(nonwidefov), cancel);
			r_conheight.OnChange(&r_conheight, Q_ftos(nonwideconheight), cancel);

		}
		else
		{
			scr_fov.OnChange(&scr_fov, Q_ftos(scr_fov.value), cancel);
			r_conheight.OnChange(&r_conheight, Q_ftos(r_conheight.value), cancel);
		}
	}
}