Fixes by Black's directive.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@560 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-05 08:20:40 +00:00
parent e9ae3fdb03
commit d4033f5dca

View file

@ -354,6 +354,7 @@ void PF_print (progfuncs_t *prinst, struct globalvars_s *pr_globals)
static void PF_cvar (progfuncs_t *prinst, struct globalvars_s *pr_globals) static void PF_cvar (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
cvar_t *var;
char *str; char *str;
str = PR_GetStringOfs(prinst, OFS_PARM0); str = PR_GetStringOfs(prinst, OFS_PARM0);
@ -362,13 +363,23 @@ static void PF_cvar (progfuncs_t *prinst, struct globalvars_s *pr_globals)
else if (!strcmp("vid_conheight", str)) else if (!strcmp("vid_conheight", str))
G_FLOAT(OFS_RETURN) = vid.conheight; G_FLOAT(OFS_RETURN) = vid.conheight;
else else
G_FLOAT(OFS_RETURN) = Cvar_VariableValue (str); {
var = Cvar_Get(str, "", 0, "menu cvars");
if (var)
{
if (var->latched_string)
G_FLOAT(OFS_RETURN) = atof(var->latched_string); else
G_FLOAT(OFS_RETURN) = var->value;
}
else
G_FLOAT(OFS_RETURN) = 0;
}
} }
void PF_getresolution (progfuncs_t *prinst, struct globalvars_s *pr_globals) void PF_getresolution (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{ {
float mode = G_FLOAT(OFS_PARM0); float mode = G_FLOAT(OFS_PARM0);
float *ret = G_VECTOR(OFS_RETURN); float *ret = G_VECTOR(OFS_RETURN);
#pragma message("fixme: PF_getresolution should return other modes")
if (mode > 0) if (mode > 0)
{ {
ret[0] = 0; ret[0] = 0;
@ -377,8 +388,8 @@ void PF_getresolution (progfuncs_t *prinst, struct globalvars_s *pr_globals)
} }
else else
{ {
ret[0] = vid.conwidth; ret[0] = vid.width;
ret[1] = vid.conheight; ret[1] = vid.height;
ret[2] = 0; ret[2] = 0;
} }
} }