make progs related code a little more consistent with its int type usage

This commit is contained in:
Bill Currie 2007-04-06 00:47:41 +00:00 committed by Jeff Teunissen
parent 38254186da
commit 5b761bac83
15 changed files with 278 additions and 278 deletions

View file

@ -23,13 +23,13 @@
#include "QF/qtypes.h"
typedef int32_t func_t;
typedef int32_t string_t;
typedef int32_t pointer_t;
typedef int16_t pr_short_t;
typedef uint16_t pr_ushort_t;
typedef int32_t pr_int_t;
typedef uint32_t pr_uint_t;
typedef pr_int_t func_t;
typedef pr_int_t string_t;
typedef pr_int_t pointer_t;
typedef enum {
ev_void,

View file

@ -1320,7 +1320,7 @@ extern const char *pr_gametype;
typedef struct strref_s strref_t;
typedef struct {
int s;
pr_int_t s;
dfunction_t *f;
strref_t *tstr;
} prstack_t;
@ -1450,14 +1450,14 @@ struct progs_s {
/// required globals (for OP_STATE)
struct {
float *time;
int *self;
pr_int_t *self;
} globals;
/// required fields (for OP_STATE)
struct {
int nextthink;
int frame;
int think;
int this;
pr_int_t nextthink;
pr_int_t frame;
pr_int_t think;
pr_int_t this;
} fields;
};

View file

@ -161,7 +161,7 @@ bi_no_function (progs_t *pr)
VISIBLE int
PR_RelocateBuiltins (progs_t *pr)
{
int i, ind;
pr_int_t i, ind;
int bad = 0;
dfunction_t *func;
builtin_t *bi;

View file

@ -371,9 +371,9 @@ PR_Get_Source_Line (progs_t *pr, pr_uint_t addr)
file = PR_Load_Source_File (pr, fname);
if (!file || line > file->num_lines)
return va ("%s:%d", fname, line);
return va ("%s:%u", fname, line);
return va ("%s:%d:%.*s", fname, line, (int)file->lines[line - 1].len,
return va ("%s:%u:%.*s", fname, line, (int)file->lines[line - 1].len,
file->lines[line - 1].text);
}
@ -405,7 +405,7 @@ PR_DumpState (progs_t *pr)
if (pr_debug->int_val && pr->debug) {
pr_lineno_t *lineno;
pr_auxfunction_t *func = 0;
int addr = pr->pr_xstatement;
pr_int_t addr = pr->pr_xstatement;
lineno = PR_Find_Lineno (pr, addr);
if (lineno)
@ -710,13 +710,13 @@ dump_frame (progs_t *pr, prstack_t *frame)
line += func->source_line;
if (addr == frame->s) {
Sys_Printf ("%12s:%d : %s: %x\n",
Sys_Printf ("%12s:%u : %s: %x\n",
PR_GetString (pr, f->s_file),
line,
PR_GetString (pr, f->s_name),
frame->s);
} else {
Sys_Printf ("%12s:%d+%d : %s: %x\n",
Sys_Printf ("%12s:%u+%d : %s: %x\n",
PR_GetString (pr, f->s_file),
line, frame->s - addr,
PR_GetString (pr, f->s_name),
@ -749,7 +749,7 @@ PR_StackTrace (progs_t *pr)
VISIBLE void
PR_Profile (progs_t * pr)
{
int max, num, i;
pr_int_t max, num, i;
dfunction_t *best, *f;
num = 0;

View file

@ -64,7 +64,7 @@ static __attribute__ ((used)) const char rcsid[] =
VISIBLE void
ED_ClearEdict (progs_t *pr, edict_t *e, int val)
{
unsigned int i;
pr_uint_t i;
if (NUM_FOR_EDICT (pr, e) < *pr->reserved_edicts)
Sys_Printf ("clearing reserved edict %ld\n",
@ -86,10 +86,10 @@ ED_ClearEdict (progs_t *pr, edict_t *e, int val)
VISIBLE edict_t *
ED_Alloc (progs_t *pr)
{
int i;
pr_int_t i;
edict_t *e;
int start = pr->reserved_edicts ? *pr->reserved_edicts : 0;
int max_edicts = pr->pr_edictareasize / pr->pr_edict_size;
pr_int_t max_edicts = pr->pr_edictareasize / pr->pr_edict_size;
for (i = start + 1; i < *pr->num_edicts; i++) {
e = EDICT_NUM (pr, i);
@ -160,9 +160,9 @@ ED_PrintNum (progs_t *pr, pr_int_t ent)
VISIBLE void
ED_PrintEdicts (progs_t *pr, const char *fieldval)
{
int i;
int count;
ddef_t *def;
pr_int_t i;
int count;
ddef_t *def;
def = PR_FindField(pr, "classname");
@ -190,11 +190,11 @@ ED_PrintEdicts (progs_t *pr, const char *fieldval)
VISIBLE void
ED_Count (progs_t *pr)
{
int i;
int active, models, solid, step, zombie;
ddef_t *solid_def;
ddef_t *model_def;
edict_t *ent;
pr_int_t i;
int active, models, solid, step, zombie;
ddef_t *solid_def;
ddef_t *model_def;
edict_t *ent;
solid_def = PR_FindField (pr, "solid");
model_def = PR_FindField (pr, "model");
@ -226,7 +226,7 @@ ED_EdictNum (progs_t *pr, pr_int_t n)
pr_int_t offs = n * pr->pr_edict_size;
if (offs < 0 || n >= pr->pr_edictareasize)
PR_RunError (pr, "EDICT_NUM: bad number %i", n);
PR_RunError (pr, "EDICT_NUM: bad number %d", n);
return PROG_TO_EDICT (pr, offs);
}

View file

@ -123,9 +123,9 @@ PR_PopFrame (progs_t *pr)
static void
PR_EnterFunction (progs_t *pr, dfunction_t *f)
{
int i, j, c, o;
int k;
int count = 0;
pr_int_t i, j, c, o;
pr_int_t k;
pr_int_t count = 0;
int size[2] = {0, 0};
long paramofs = 0;
long offs;
@ -302,11 +302,11 @@ PR_CallFunction (progs_t *pr, func_t fnum)
VISIBLE void
PR_ExecuteProgram (progs_t * pr, func_t fnum)
{
int exitdepth, profile, startprofile;
unsigned int pointer;
dstatement_t *st;
edict_t *ed;
pr_type_t *ptr;
int exitdepth, profile, startprofile;
pr_uint_t pointer;
dstatement_t *st;
edict_t *ed;
pr_type_t *ptr;
// make a stack frame
exitdepth = pr->pr_depth;

View file

@ -102,7 +102,7 @@ free_progs_mem (progs_t *pr, void *mem)
VISIBLE void
PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone)
{
unsigned i;
size_t i;
int mem_size;
dprograms_t progs;
@ -120,7 +120,7 @@ PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone)
if (progs.version != PROG_VERSION
&& progs.version != PROG_ID_VERSION) {
if (progs.version < 0x00fff000) {
PR_Error (pr, "%s has unrecognised version number (%d)",
PR_Error (pr, "%s has unrecognised version number (%u)",
pr->progs_name, progs.version);
} else {
PR_Error (pr,
@ -236,7 +236,7 @@ PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone)
pr->pr_statements[i].c = LittleShort (pr->pr_statements[i].c);
}
for (i = 0; i < (unsigned int) pr->progs->numfunctions; i++) {
for (i = 0; i < (size_t) pr->progs->numfunctions; i++) {
pr->pr_functions[i].first_statement =
LittleLong (pr->pr_functions[i].first_statement);
pr->pr_functions[i].parm_start =
@ -300,7 +300,7 @@ PR_AddLoadFinishFunc (progs_t *pr, int (*func)(progs_t *))
static int
pr_run_ctors (progs_t *pr)
{
int fnum;
pr_int_t fnum;
dfunction_t *func;
for (fnum = 0; fnum < pr->progs->numfunctions; fnum++) {

View file

@ -1184,10 +1184,10 @@ PR_Opcode_Init (void)
static inline void
check_branch (progs_t *pr, dstatement_t *st, opcode_t *op, short offset)
{
int address = st - pr->pr_statements;
pr_int_t address = st - pr->pr_statements;
address += offset;
if (address < 0 || (unsigned int) address >= pr->progs->numstatements)
if (address < 0 || (pr_uint_t) address >= pr->progs->numstatements)
PR_Error (pr, "PR_Check_Opcodes: invalid branch (statement %ld: %s)",
(long)(st - pr->pr_statements), op->opname);
}
@ -1227,7 +1227,7 @@ PR_Check_Opcodes (progs_t *pr)
opcode_t *op;
dstatement_t *st;
int state_ok = 0;
unsigned i;
pr_uint_t i;
if (pr->globals.time && pr->globals.self && pr->fields.nextthink != -1
&& pr->fields.think != -1 && pr->fields.frame != -1)

View file

@ -116,7 +116,7 @@ VISIBLE plitem_t *
ED_EntityDict (progs_t *pr, edict_t *ed)
{
plitem_t *entity = PL_NewDictionary ();
unsigned i;
pr_uint_t i;
int j;
int type;
const char *name;
@ -158,7 +158,7 @@ VISIBLE plitem_t *
ED_GlobalsDict (progs_t *pr)
{
plitem_t *globals = PL_NewDictionary ();
unsigned i;
pr_uint_t i;
const char *name;
const char *value;
ddef_t *def;

View file

@ -282,13 +282,13 @@ get_string (progs_t *pr, int num)
}
VISIBLE qboolean
PR_StringValid (progs_t *pr, int num)
PR_StringValid (progs_t *pr, string_t num)
{
return get_string (pr, num) != 0;
}
VISIBLE const char *
PR_GetString (progs_t *pr, int num)
PR_GetString (progs_t *pr, string_t num)
{
const char *str;
@ -299,7 +299,7 @@ PR_GetString (progs_t *pr, int num)
}
VISIBLE dstring_t *
PR_GetMutableString (progs_t *pr, int num)
PR_GetMutableString (progs_t *pr, string_t num)
{
strref_t *ref = get_strref (pr, num);
if (ref) {
@ -330,7 +330,7 @@ pr_strdup (progs_t *pr, const char *s)
return new;
}
VISIBLE int
VISIBLE string_t
PR_SetString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -360,7 +360,7 @@ PR_ClearReturnStrings (progs_t *pr)
}
}
VISIBLE int
VISIBLE string_t
PR_SetReturnString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -399,7 +399,7 @@ pr_settempstring (progs_t *pr, char *s)
return string_index (pr, sr);
}
int
string_t
PR_CatStrings (progs_t *pr, const char *a, const char *b)
{
int lena;
@ -415,7 +415,7 @@ PR_CatStrings (progs_t *pr, const char *a, const char *b)
return pr_settempstring (pr, c);
}
VISIBLE int
VISIBLE string_t
PR_SetTempString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -430,7 +430,7 @@ PR_SetTempString (progs_t *pr, const char *s)
return pr_settempstring (pr, pr_strdup (pr, s));
}
VISIBLE int
VISIBLE string_t
PR_SetDynamicString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -449,7 +449,7 @@ PR_SetDynamicString (progs_t *pr, const char *s)
}
void
PR_MakeTempString (progs_t *pr, int str)
PR_MakeTempString (progs_t *pr, string_t str)
{
strref_t *sr = get_strref (pr, str);
@ -469,7 +469,7 @@ PR_MakeTempString (progs_t *pr, int str)
pr->pr_xtstr = sr;
}
VISIBLE int
VISIBLE string_t
PR_NewMutableString (progs_t *pr)
{
strref_t *sr = new_string_ref (pr);
@ -479,7 +479,7 @@ PR_NewMutableString (progs_t *pr)
}
VISIBLE void
PR_FreeString (progs_t *pr, int str)
PR_FreeString (progs_t *pr, string_t str)
{
strref_t *sr = get_strref (pr, str);

View file

@ -36,153 +36,153 @@
#include "sv_pr_cmds.h"
typedef struct {
int *self;
int *other;
int *world;
float *time;
float *frametime;
float *force_retouch;
string_t *mapname;
string_t *startspot;
float *deathmatch;
float *coop;
float *teamplay;
float *serverflags;
float *total_secrets;
float *total_monsters;
float *found_secrets;
float *killed_monsters;
float *parms;
vec3_t *v_forward;
vec3_t *v_up;
vec3_t *v_right;
float *trace_allsolid;
float *trace_startsolid;
float *trace_fraction;
vec3_t *trace_endpos;
vec3_t *trace_plane_normal;
float *trace_plane_dist;
int *trace_ent;
float *trace_inopen;
float *trace_inwater;
int *msg_entity;
string_t *null;
pr_int_t *self;
pr_int_t *other;
pr_int_t *world;
float *time;
float *frametime;
float *force_retouch;
string_t *mapname;
string_t *startspot;
float *deathmatch;
float *coop;
float *teamplay;
float *serverflags;
float *total_secrets;
float *total_monsters;
float *found_secrets;
float *killed_monsters;
float *parms;
vec3_t *v_forward;
vec3_t *v_up;
vec3_t *v_right;
float *trace_allsolid;
float *trace_startsolid;
float *trace_fraction;
vec3_t *trace_endpos;
vec3_t *trace_plane_normal;
float *trace_plane_dist;
pr_int_t *trace_ent;
float *trace_inopen;
float *trace_inwater;
pr_int_t *msg_entity;
string_t *null;
int *newmis;
pr_int_t *newmis;
} sv_globals_t;
extern sv_globals_t sv_globals;
typedef struct {
func_t main;
func_t StartFrame;
func_t PlayerPreThink;
func_t PlayerPostThink;
func_t ClientKill;
func_t ClientConnect;
func_t PutClientInServer;
func_t ClientDisconnect;
func_t SetNewParms;
func_t SetChangeParms;
func_t main;
func_t StartFrame;
func_t PlayerPreThink;
func_t PlayerPostThink;
func_t ClientKill;
func_t ClientConnect;
func_t PutClientInServer;
func_t ClientDisconnect;
func_t SetNewParms;
func_t SetChangeParms;
} sv_funcs_t;
extern sv_funcs_t sv_funcs;
typedef struct
{
int modelindex; //float
int absmin; //vec3_t
int absmax; //vec3_t
int ltime; //float
int movetype; //float
int solid; //float
int origin; //vec3_t
int oldorigin; //vec3_t
int velocity; //vec3_t
int angles; //vec3_t
int avelocity; //vec3_t
int basevelocity; //vec3_t
int punchangle; //vec3_t
int classname; //string_t
int model; //string_t
int frame; //float
int skin; //float
int effects; //float
int drawPercent; //float
int gravity; //float
int mass; //float
int light_level; //float
int mins; //vec3_t
int maxs; //vec3_t
int size; //vec3_t
int touch; //func_t
int use; //func_t
int think; //func_t
int blocked; //func_t
int nextthink; //float
int groundentity; //int
int health; //float
int frags; //float
int weapon; //float
int weaponmodel; //string_t
int weaponframe; //float
int currentammo; //float
int ammo_shells; //float
int ammo_nails; //float
int ammo_rockets; //float
int ammo_cells; //float
int items; //float
int items2; //float
int takedamage; //float
int chain; //int
int deadflag; //float
int view_ofs; //vec3_t
int button0; //float
int button1; //float
int button2; //float
int impulse; //float
int fixangle; //float
int v_angle; //vec3_t
int idealpitch; //float
int pitch_speed; //float
int netname; //string_t
int enemy; //int
int flags; //float
int colormap; //float
int team; //float
int max_health; //float
int teleport_time; //float
int armortype; //float
int armorvalue; //float
int waterlevel; //float
int watertype; //float
int ideal_yaw; //float
int yaw_speed; //float
int aiment; //int
int goalentity; //int
int spawnflags; //float
int target; //string_t
int targetname; //string_t
int dmg_take; //float
int dmg_save; //float
int dmg_inflictor; //int
int owner; //int
int movedir; //vec3_t
int message; //string_t
int sounds; //float
int noise; //string_t
int noise1; //string_t
int noise2; //string_t
int noise3; //string_t
int dmg; //float
int dmgtime; //float
int air_finished; //float
int pain_finished; //float
int radsuit_finished; //float
int speed; //float
pr_int_t modelindex; //float
pr_int_t absmin; //vec3_t
pr_int_t absmax; //vec3_t
pr_int_t ltime; //float
pr_int_t movetype; //float
pr_int_t solid; //float
pr_int_t origin; //vec3_t
pr_int_t oldorigin; //vec3_t
pr_int_t velocity; //vec3_t
pr_int_t angles; //vec3_t
pr_int_t avelocity; //vec3_t
pr_int_t basevelocity; //vec3_t
pr_int_t punchangle; //vec3_t
pr_int_t classname; //string_t
pr_int_t model; //string_t
pr_int_t frame; //float
pr_int_t skin; //float
pr_int_t effects; //float
pr_int_t drawPercent; //float
pr_int_t gravity; //float
pr_int_t mass; //float
pr_int_t light_level; //float
pr_int_t mins; //vec3_t
pr_int_t maxs; //vec3_t
pr_int_t size; //vec3_t
pr_int_t touch; //func_t
pr_int_t use; //func_t
pr_int_t think; //func_t
pr_int_t blocked; //func_t
pr_int_t nextthink; //float
pr_int_t groundentity; //int
pr_int_t health; //float
pr_int_t frags; //float
pr_int_t weapon; //float
pr_int_t weaponmodel; //string_t
pr_int_t weaponframe; //float
pr_int_t currentammo; //float
pr_int_t ammo_shells; //float
pr_int_t ammo_nails; //float
pr_int_t ammo_rockets; //float
pr_int_t ammo_cells; //float
pr_int_t items; //float
pr_int_t items2; //float
pr_int_t takedamage; //float
pr_int_t chain; //int
pr_int_t deadflag; //float
pr_int_t view_ofs; //vec3_t
pr_int_t button0; //float
pr_int_t button1; //float
pr_int_t button2; //float
pr_int_t impulse; //float
pr_int_t fixangle; //float
pr_int_t v_angle; //vec3_t
pr_int_t idealpitch; //float
pr_int_t pitch_speed; //float
pr_int_t netname; //string_t
pr_int_t enemy; //int
pr_int_t flags; //float
pr_int_t colormap; //float
pr_int_t team; //float
pr_int_t max_health; //float
pr_int_t teleport_time; //float
pr_int_t armortype; //float
pr_int_t armorvalue; //float
pr_int_t waterlevel; //float
pr_int_t watertype; //float
pr_int_t ideal_yaw; //float
pr_int_t yaw_speed; //float
pr_int_t aiment; //int
pr_int_t goalentity; //int
pr_int_t spawnflags; //float
pr_int_t target; //string_t
pr_int_t targetname; //string_t
pr_int_t dmg_take; //float
pr_int_t dmg_save; //float
pr_int_t dmg_inflictor; //int
pr_int_t owner; //int
pr_int_t movedir; //vec3_t
pr_int_t message; //string_t
pr_int_t sounds; //float
pr_int_t noise; //string_t
pr_int_t noise1; //string_t
pr_int_t noise2; //string_t
pr_int_t noise3; //string_t
pr_int_t dmg; //float
pr_int_t dmgtime; //float
pr_int_t air_finished; //float
pr_int_t pain_finished; //float
pr_int_t radsuit_finished; //float
pr_int_t speed; //float
int rotated_bbox; //int
int lastruntime; //float
pr_int_t rotated_bbox; //int
pr_int_t lastruntime; //float
} sv_fields_t;
extern sv_fields_t sv_fields;
@ -209,7 +209,7 @@ extern progs_t sv_pr_state;
static inline void
sv_pr_touch (edict_t *self, edict_t *other)
{
int this;
pr_int_t this;
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, other);
@ -230,7 +230,7 @@ sv_pr_use (edict_t *self, edict_t *other)
static inline void
sv_pr_think (edict_t *self)
{
int this;
pr_int_t this;
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
*sv_globals.other = 0;
@ -246,7 +246,7 @@ sv_pr_think (edict_t *self)
static inline void
sv_pr_blocked (edict_t *self, edict_t *other)
{
int this;
pr_int_t this;
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, other);

View file

@ -327,7 +327,7 @@ static sv_def_t nq_opt_fields[] = {
{ev_void, 0, 0},
};
static const unsigned nq_crc = 5927;
static const pr_uint_t nq_crc = 5927;
static void
set_address (sv_def_t *def, void *address)

View file

@ -36,12 +36,12 @@
#include "sv_pr_cmds.h"
typedef struct {
int *self;
int *other;
int *world;
pr_int_t *self;
pr_int_t *other;
pr_int_t *world;
float *time;
float *frametime;
int *newmis;
pr_int_t *newmis;
float *force_retouch;
string_t *mapname;
float *serverflags;
@ -59,10 +59,10 @@ typedef struct {
vec3_t *trace_endpos;
vec3_t *trace_plane_normal;
float *trace_plane_dist;
int *trace_ent;
pr_int_t *trace_ent;
float *trace_inopen;
float *trace_inwater;
int *msg_entity;
pr_int_t *msg_entity;
float *skill;
} sv_globals_t;
@ -94,82 +94,82 @@ extern sv_funcs_t sv_funcs;
typedef struct
{
int modelindex; //float
int absmin; //vec3_t
int absmax; //vec3_t
int ltime; //float
int lastruntime; //float
int movetype; //float
int solid; //float
int origin; //vec3_t
int oldorigin; //vec3_t
int velocity; //vec3_t
int angles; //vec3_t
int avelocity; //vec3_t
int classname; //string_t
int model; //string_t
int frame; //float
int skin; //float
int effects; //float
int mins; //vec3_t
int maxs; //vec3_t
int size; //vec3_t
int touch; //func_t
int think; //func_t
int blocked; //func_t
int nextthink; //float
int groundentity; //int
int health; //float
int frags; //float
int weapon; //float
int weaponmodel; //string_t
int weaponframe; //float
int currentammo; //float
int ammo_shells; //float
int ammo_nails; //float
int ammo_rockets; //float
int ammo_cells; //float
int items; //float
int takedamage; //float
int chain; //int
int view_ofs; //vec3_t
int button0; //float
int button1; //float
int button2; //float
int impulse; //float
int fixangle; //float
int v_angle; //vec3_t
int netname; //string_t
int enemy; //int
int flags; //float
int colormap; //float
int team; //float
int teleport_time; //float
int armorvalue; //float
int waterlevel; //float
int watertype; //float
int ideal_yaw; //float
int yaw_speed; //float
int goalentity; //int
int spawnflags; //float
int dmg_take; //float
int dmg_save; //float
int dmg_inflictor; //int
int owner; //int
int message; //string_t
int sounds; //float
int rotated_bbox; //int
pr_int_t modelindex; //float
pr_int_t absmin; //vec3_t
pr_int_t absmax; //vec3_t
pr_int_t ltime; //float
pr_int_t lastruntime; //float
pr_int_t movetype; //float
pr_int_t solid; //float
pr_int_t origin; //vec3_t
pr_int_t oldorigin; //vec3_t
pr_int_t velocity; //vec3_t
pr_int_t angles; //vec3_t
pr_int_t avelocity; //vec3_t
pr_int_t classname; //string_t
pr_int_t model; //string_t
pr_int_t frame; //float
pr_int_t skin; //float
pr_int_t effects; //float
pr_int_t mins; //vec3_t
pr_int_t maxs; //vec3_t
pr_int_t size; //vec3_t
pr_int_t touch; //func_t
pr_int_t think; //func_t
pr_int_t blocked; //func_t
pr_int_t nextthink; //float
pr_int_t groundentity; //int
pr_int_t health; //float
pr_int_t frags; //float
pr_int_t weapon; //float
pr_int_t weaponmodel; //string_t
pr_int_t weaponframe; //float
pr_int_t currentammo; //float
pr_int_t ammo_shells; //float
pr_int_t ammo_nails; //float
pr_int_t ammo_rockets; //float
pr_int_t ammo_cells; //float
pr_int_t items; //float
pr_int_t takedamage; //float
pr_int_t chain; //int
pr_int_t view_ofs; //vec3_t
pr_int_t button0; //float
pr_int_t button1; //float
pr_int_t button2; //float
pr_int_t impulse; //float
pr_int_t fixangle; //float
pr_int_t v_angle; //vec3_t
pr_int_t netname; //string_t
pr_int_t enemy; //int
pr_int_t flags; //float
pr_int_t colormap; //float
pr_int_t team; //float
pr_int_t teleport_time; //float
pr_int_t armorvalue; //float
pr_int_t waterlevel; //float
pr_int_t watertype; //float
pr_int_t ideal_yaw; //float
pr_int_t yaw_speed; //float
pr_int_t goalentity; //int
pr_int_t spawnflags; //float
pr_int_t dmg_take; //float
pr_int_t dmg_save; //float
pr_int_t dmg_inflictor; //int
pr_int_t owner; //int
pr_int_t message; //string_t
pr_int_t sounds; //float
pr_int_t rotated_bbox; //int
int alpha;
int scale;
int glow_size;
int glow_color;
int colormod;
pr_int_t alpha;
pr_int_t scale;
pr_int_t glow_size;
pr_int_t glow_color;
pr_int_t colormod;
int gravity;
int maxspeed;
pr_int_t gravity;
pr_int_t maxspeed;
int team_str; //string
pr_int_t team_str; //string
} sv_fields_t;
extern sv_fields_t sv_fields;
@ -198,7 +198,7 @@ extern struct progs_s sv_pr_state;
static inline void
sv_pr_touch (edict_t *self, edict_t *other)
{
int this;
pr_int_t this;
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, other);
@ -219,7 +219,7 @@ sv_pr_use (edict_t *self, edict_t *other)
static inline void
sv_pr_think (edict_t *self)
{
int this;
pr_int_t this;
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
*sv_globals.other = 0;
@ -235,7 +235,7 @@ sv_pr_think (edict_t *self)
static inline void
sv_pr_blocked (edict_t *self, edict_t *other)
{
int this;
pr_int_t this;
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, self);
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, other);

View file

@ -507,7 +507,7 @@ static builtin_t builtins[] = {
static struct {
const char *name;
int *field;
func_t *field;
} qwe_func_list[] = {
{"timeofday", &qwe_funcs.timeofday},
{"ConsoleCmd", &qwe_funcs.ConsoleCmd},

View file

@ -326,7 +326,7 @@ static sv_def_t qw_opt_fields[] = {
{ev_void, 0, 0},
};
static const unsigned qw_crc = 54730;
static const pr_uint_t qw_crc = 54730;
static void
set_address (sv_def_t *def, void *address)