Do an audit of hunk mark usage

I realized that after making the hunk 64-bit clean, I had forgotten to
go through and convert all the saved marks to size_t.
This commit is contained in:
Bill Currie 2021-07-29 11:12:37 +09:00
parent 54604d9aa2
commit ca63c0360a
12 changed files with 14 additions and 12 deletions

View file

@ -62,7 +62,7 @@ static void
GIB_Exec_Override_f (void) GIB_Exec_Override_f (void)
{ {
char *f; char *f;
int mark; size_t mark;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Sys_Printf ("exec <filename> : execute a script file\n"); Sys_Printf ("exec <filename> : execute a script file\n");

View file

@ -50,7 +50,7 @@ VISIBLE tex_t *
LoadPCX (QFile *f, qboolean convert, const byte *pal, int load) LoadPCX (QFile *f, qboolean convert, const byte *pal, int load)
{ {
pcx_t *pcx; pcx_t *pcx;
int pcx_mark; size_t pcx_mark;
byte *palette; byte *palette;
byte *end; byte *end;
byte *pix; byte *pix;

View file

@ -625,7 +625,8 @@ LoadTGA (QFile *fin, int load)
byte *dataByte; byte *dataByte;
decoder_t decode; decoder_t decode;
int fsize = sizeof (TargaHeader); int fsize = sizeof (TargaHeader);
int numPixels, targa_mark; int numPixels;
size_t targa_mark;
TargaHeader *targa; TargaHeader *targa;
tex_t *tex; tex_t *tex;

View file

@ -214,7 +214,8 @@ Mod_LoadAliasGroup (mod_alias_ctx_t *alias_ctx, void *pin, int *posenum,
void void
Mod_LoadAliasModel (model_t *mod, void *buffer, cache_allocator_t allocator) Mod_LoadAliasModel (model_t *mod, void *buffer, cache_allocator_t allocator)
{ {
int size, version, numframes, start, end, total, i, j; size_t size, start, end, total;
int version, numframes, i, j;
int extra = 0; // extra precision bytes int extra = 0; // extra precision bytes
void *mem; void *mem;
dtriangle_t *pintriangles; dtriangle_t *pintriangles;

View file

@ -360,7 +360,7 @@ Vulkan_Mod_ProcessTexture (model_t *mod, texture_t *tx, vulkan_ctx_t *ctx)
const char *name = va (ctx->va_ctx, "fb_%s", tx->name); const char *name = va (ctx->va_ctx, "fb_%s", tx->name);
int size = (tx->width * tx->height * 85) / 64; int size = (tx->width * tx->height * 85) / 64;
int fullbright_mark = Hunk_LowMark (0); size_t fullbright_mark = Hunk_LowMark (0);
byte *pixels = Hunk_AllocName (0, size, name); byte *pixels = Hunk_AllocName (0, size, name);
if (!Mod_CalcFullbright ((byte *) (tx + 1), pixels, size)) { if (!Mod_CalcFullbright ((byte *) (tx + 1), pixels, size)) {

View file

@ -502,7 +502,7 @@ static void
Cmd_Exec_f (void) Cmd_Exec_f (void)
{ {
char *f; char *f;
int mark; size_t mark;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Sys_Printf ("exec <filename> : execute a script file\n"); Sys_Printf ("exec <filename> : execute a script file\n");

View file

@ -94,7 +94,7 @@ double con_realtime;
double oldcon_realtime; double oldcon_realtime;
int host_framecount; int host_framecount;
int host_hunklevel; size_t host_hunklevel;
int host_in_game; int host_in_game;
size_t minimum_memory; size_t minimum_memory;

View file

@ -423,7 +423,7 @@ SV_Push (edict_t *pusher, const vec3_t tmove, const vec3_t amove)
vec3_t forward = {1, 0, 0}; vec3_t forward = {1, 0, 0};
vec3_t left = {0, 1, 0}; vec3_t left = {0, 1, 0};
vec3_t up = {0, 0, 1}; vec3_t up = {0, 0, 1};
int mark; size_t mark;
int c_flags, c_movetype, c_groundentity, c_solid; int c_flags, c_movetype, c_groundentity, c_solid;
vec_t *c_absmin, *c_absmax, *c_origin, *c_angles, *c_mins, *c_maxs; vec_t *c_absmin, *c_absmax, *c_origin, *c_angles, *c_mins, *c_maxs;
vec_t *p_origin, *p_angles; vec_t *p_origin, *p_angles;

View file

@ -452,7 +452,7 @@ extern char localmodels[MAX_MODELS][5]; // inline model names for precache
extern struct info_s *localinfo; extern struct info_s *localinfo;
extern int host_hunklevel; extern size_t host_hunklevel;
extern QFile *sv_logfile; extern QFile *sv_logfile;
extern QFile *sv_fraglogfile; extern QFile *sv_fraglogfile;

View file

@ -211,7 +211,7 @@ double con_frametime;
double con_realtime; double con_realtime;
double oldcon_realtime; double oldcon_realtime;
int host_hunklevel; size_t host_hunklevel;
cvar_t *host_speeds; cvar_t *host_speeds;
cvar_t *hud_fps; cvar_t *hud_fps;

View file

@ -106,7 +106,7 @@ entity_state_t cl_entities[MAX_CLIENTS][UPDATE_BACKUP+1][MAX_PACKET_ENTITIES]; /
double sv_frametime; double sv_frametime;
double realtime; // without any filtering or bounding double realtime; // without any filtering or bounding
int host_hunklevel; size_t host_hunklevel;
netadr_t master_adr[MAX_MASTERS]; // address of group servers netadr_t master_adr[MAX_MASTERS]; // address of group servers

View file

@ -426,7 +426,7 @@ SV_Push (edict_t *pusher, const vec3_t tmove, const vec3_t amove)
vec3_t forward = {1, 0, 0}; vec3_t forward = {1, 0, 0};
vec3_t left = {0, 1, 0}; vec3_t left = {0, 1, 0};
vec3_t up = {0, 0, 1}; vec3_t up = {0, 0, 1};
int mark; size_t mark;
int c_flags, c_movetype, c_groundentity, c_solid; int c_flags, c_movetype, c_groundentity, c_solid;
vec_t *c_absmin, *c_absmax, *c_origin, *c_angles, *c_mins, *c_maxs; vec_t *c_absmin, *c_absmax, *c_origin, *c_angles, *c_mins, *c_maxs;
vec_t *p_origin, *p_angles; vec_t *p_origin, *p_angles;