mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
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:
parent
e9ae3fdb03
commit
d4033f5dca
1 changed files with 15 additions and 4 deletions
|
@ -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)
|
||||
{
|
||||
cvar_t *var;
|
||||
char *str;
|
||||
|
||||
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))
|
||||
G_FLOAT(OFS_RETURN) = vid.conheight;
|
||||
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)
|
||||
{
|
||||
float mode = G_FLOAT(OFS_PARM0);
|
||||
float *ret = G_VECTOR(OFS_RETURN);
|
||||
|
||||
#pragma message("fixme: PF_getresolution should return other modes")
|
||||
if (mode > 0)
|
||||
{
|
||||
ret[0] = 0;
|
||||
|
@ -377,8 +388,8 @@ void PF_getresolution (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
}
|
||||
else
|
||||
{
|
||||
ret[0] = vid.conwidth;
|
||||
ret[1] = vid.conheight;
|
||||
ret[0] = vid.width;
|
||||
ret[1] = vid.height;
|
||||
ret[2] = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue