mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-11 18:20:47 +00:00
Whitespace, plus comment out unused code.
This commit is contained in:
parent
72f91dc9bc
commit
6e73ba0e7a
1 changed files with 40 additions and 38 deletions
|
@ -32,17 +32,21 @@
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_STRINGS_H
|
||||||
|
# include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "QF/clip_hull.h"
|
#include "QF/clip_hull.h"
|
||||||
#include "QF/cmd.h"
|
#include "QF/cmd.h"
|
||||||
#include "QF/cvar.h"
|
|
||||||
#include "QF/msg.h"
|
|
||||||
#include "QF/va.h"
|
|
||||||
#include "QF/progs.h"
|
|
||||||
#include "QF/zone.h"
|
|
||||||
#include "QF/mathlib.h"
|
|
||||||
#include "QF/console.h"
|
#include "QF/console.h"
|
||||||
|
#include "QF/cvar.h"
|
||||||
|
#include "QF/mathlib.h"
|
||||||
|
#include "QF/msg.h"
|
||||||
|
#include "QF/progs.h"
|
||||||
|
#include "QF/va.h"
|
||||||
|
#include "QF/zone.h"
|
||||||
|
|
||||||
#define RETURN_EDICT(p, e) ((p)->pr_globals[OFS_RETURN].integer_var = EDICT_TO_PROG(p, e))
|
#define RETURN_EDICT(p, e) ((p)->pr_globals[OFS_RETURN].integer_var = EDICT_TO_PROG(p, e))
|
||||||
#define RETURN_STRING(p, s) ((p)->pr_globals[OFS_RETURN].integer_var = PR_SetString((p), s))
|
#define RETURN_STRING(p, s) ((p)->pr_globals[OFS_RETURN].integer_var = PR_SetString((p), s))
|
||||||
|
@ -53,6 +57,7 @@
|
||||||
|
|
||||||
// FIXME: Hunk_TempAlloc, Con_Printf, Cvar_*, PR_SetString, PR_RunError, ED_PrintEdicts, PF_traceon, PF_traceoff, ED_PrintNum, PR_FindBuiltin isn't threadsafe/reentrant
|
// FIXME: Hunk_TempAlloc, Con_Printf, Cvar_*, PR_SetString, PR_RunError, ED_PrintEdicts, PF_traceon, PF_traceoff, ED_PrintNum, PR_FindBuiltin isn't threadsafe/reentrant
|
||||||
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
PF_VarString (progs_t *pr, int first)
|
PF_VarString (progs_t *pr, int first)
|
||||||
{
|
{
|
||||||
|
@ -68,7 +73,6 @@ PF_VarString (progs_t *pr, int first)
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PF_normalize
|
PF_normalize
|
||||||
|
|
||||||
|
@ -83,7 +87,8 @@ PF_normalize (progs_t *pr)
|
||||||
|
|
||||||
value1 = G_VECTOR (pr, OFS_PARM0);
|
value1 = G_VECTOR (pr, OFS_PARM0);
|
||||||
|
|
||||||
new = value1[0] * value1[0] + value1[1] * value1[1] + value1[2] * value1[2];
|
new = value1[0] * value1[0] + value1[1] * value1[1] + value1[2] *
|
||||||
|
value1[2];
|
||||||
new = sqrt (new);
|
new = sqrt (new);
|
||||||
|
|
||||||
if (new == 0)
|
if (new == 0)
|
||||||
|
@ -111,7 +116,8 @@ PF_vlen (progs_t *pr)
|
||||||
|
|
||||||
value1 = G_VECTOR (pr, OFS_PARM0);
|
value1 = G_VECTOR (pr, OFS_PARM0);
|
||||||
|
|
||||||
new = value1[0] * value1[0] + value1[1] * value1[1] + value1[2] * value1[2];
|
new = value1[0] * value1[0] + value1[1] * value1[1] + value1[2] *
|
||||||
|
value1[2];
|
||||||
new = sqrt (new);
|
new = sqrt (new);
|
||||||
|
|
||||||
G_FLOAT (pr, OFS_RETURN) = new;
|
G_FLOAT (pr, OFS_RETURN) = new;
|
||||||
|
@ -141,7 +147,6 @@ PF_vectoyaw (progs_t *pr)
|
||||||
G_FLOAT (pr, OFS_RETURN) = yaw;
|
G_FLOAT (pr, OFS_RETURN) = yaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PF_vectoangles
|
PF_vectoangles
|
||||||
|
|
||||||
|
@ -372,9 +377,6 @@ PF_eprint (progs_t *pr)
|
||||||
ED_PrintNum (pr, G_EDICTNUM (pr, OFS_PARM0));
|
ED_PrintNum (pr, G_EDICTNUM (pr, OFS_PARM0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
PF_dprint
|
|
||||||
*/
|
|
||||||
void
|
void
|
||||||
PF_dprint (progs_t *pr)
|
PF_dprint (progs_t *pr)
|
||||||
{
|
{
|
||||||
|
@ -539,5 +541,5 @@ PR_Cmds_Init (progs_t *pr)
|
||||||
PR_AddBuiltin (pr, "stof", PF_stof, 81); // float (string s) stof
|
PR_AddBuiltin (pr, "stof", PF_stof, 81); // float (string s) stof
|
||||||
PR_AddBuiltin (pr, "strlen", PF_strlen, 100); // float (string s) strlen
|
PR_AddBuiltin (pr, "strlen", PF_strlen, 100); // float (string s) strlen
|
||||||
PR_AddBuiltin (pr, "charcount", PF_charcount, 101); // float (string goal, string s) charcount
|
PR_AddBuiltin (pr, "charcount", PF_charcount, 101); // float (string goal, string s) charcount
|
||||||
PR_AddBuiltin (pr, "sprintf", PF_sprintf, 109); // string (...) sprintf
|
// PR_AddBuiltin (pr, "sprintf", PF_sprintf, 109); // string (...) sprintf
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue