unsigned int -> uint32_t
parent
a24e23f6d7
commit
34c4b96309
|
@ -44,7 +44,7 @@ typedef enum _bgm_player
|
|||
|
||||
typedef struct music_handler_s
|
||||
{
|
||||
unsigned int type; /* 1U << n (see snd_codec.h) */
|
||||
uint32_t type; /* 1U << n (see snd_codec.h) */
|
||||
bgm_player_t player; /* Enumerated bgm player type */
|
||||
int is_available; /* -1 means not present */
|
||||
const char *ext; /* Expected file extension */
|
||||
|
@ -182,7 +182,7 @@ void BGM_Shutdown (void)
|
|||
CDAudio_Shutdown ();
|
||||
}
|
||||
|
||||
static void BGM_Play_noext (const char *filename, unsigned int allowed_types)
|
||||
static void BGM_Play_noext (const char *filename, uint32_t allowed_types)
|
||||
{
|
||||
char tmp[MAX_QPATH];
|
||||
music_handler_t *handler;
|
||||
|
@ -289,7 +289,7 @@ void BGM_PlayCDtrack (byte track, qboolean looping)
|
|||
*/
|
||||
char tmp[MAX_QPATH];
|
||||
const char *ext;
|
||||
unsigned int path_id, prev_id, type;
|
||||
uint32_t path_id, prev_id, type;
|
||||
music_handler_t *handler;
|
||||
|
||||
BGM_Stop();
|
||||
|
|
|
@ -179,8 +179,8 @@ typedef struct
|
|||
int children[2]; // negative numbers are -(leafs+1), not nodes
|
||||
short mins[3]; // for sphere culling
|
||||
short maxs[3];
|
||||
unsigned int firstface;
|
||||
unsigned int numfaces; // counting both sides
|
||||
uint32_t firstface;
|
||||
uint32_t numfaces; // counting both sides
|
||||
} dl1node_t;
|
||||
|
||||
typedef struct
|
||||
|
@ -189,8 +189,8 @@ typedef struct
|
|||
int children[2]; // negative numbers are -(leafs+1), not nodes
|
||||
float mins[3]; // for sphere culling
|
||||
float maxs[3];
|
||||
unsigned int firstface;
|
||||
unsigned int numfaces; // counting both sides
|
||||
uint32_t firstface;
|
||||
uint32_t numfaces; // counting both sides
|
||||
} dl2node_t;
|
||||
|
||||
typedef struct
|
||||
|
@ -224,7 +224,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int v[2]; // vertex numbers
|
||||
uint32_t v[2]; // vertex numbers
|
||||
} dledge_t;
|
||||
|
||||
#define MAXLIGHTMAPS 4
|
||||
|
@ -287,8 +287,8 @@ typedef struct
|
|||
short mins[3]; // for frustum culling
|
||||
short maxs[3];
|
||||
|
||||
unsigned int firstmarksurface;
|
||||
unsigned int nummarksurfaces;
|
||||
uint32_t firstmarksurface;
|
||||
uint32_t nummarksurfaces;
|
||||
|
||||
byte ambient_level[NUM_AMBIENTS];
|
||||
} dl1leaf_t;
|
||||
|
@ -301,8 +301,8 @@ typedef struct
|
|||
float mins[3]; // for frustum culling
|
||||
float maxs[3];
|
||||
|
||||
unsigned int firstmarksurface;
|
||||
unsigned int nummarksurfaces;
|
||||
uint32_t firstmarksurface;
|
||||
uint32_t nummarksurfaces;
|
||||
|
||||
byte ambient_level[NUM_AMBIENTS];
|
||||
} dl2leaf_t;
|
||||
|
|
|
@ -285,10 +285,10 @@ void CL_ParseServerInfo (void)
|
|||
|
||||
if (cl.protocol == PROTOCOL_RMQ)
|
||||
{
|
||||
const unsigned int supportedflags = (PRFL_SHORTANGLE | PRFL_FLOATANGLE | PRFL_24BITCOORD | PRFL_FLOATCOORD | PRFL_EDICTSCALE | PRFL_INT32COORD);
|
||||
const uint32_t supportedflags = (PRFL_SHORTANGLE | PRFL_FLOATANGLE | PRFL_24BITCOORD | PRFL_FLOATCOORD | PRFL_EDICTSCALE | PRFL_INT32COORD);
|
||||
|
||||
// mh - read protocol flags from server so that we know what protocol features to expect
|
||||
cl.protocolflags = (unsigned int) MSG_ReadLong ();
|
||||
cl.protocolflags = (uint32_t) MSG_ReadLong ();
|
||||
|
||||
if (0 != (cl.protocolflags & (~supportedflags)))
|
||||
{
|
||||
|
|
|
@ -723,7 +723,7 @@ void MSG_WriteCoord32f (sizebuf_t *sb, float f)
|
|||
MSG_WriteFloat (sb, f);
|
||||
}
|
||||
|
||||
void MSG_WriteCoord (sizebuf_t *sb, float f, unsigned int flags)
|
||||
void MSG_WriteCoord (sizebuf_t *sb, float f, uint32_t flags)
|
||||
{
|
||||
if (flags & PRFL_FLOATCOORD)
|
||||
MSG_WriteFloat (sb, f);
|
||||
|
@ -734,7 +734,7 @@ void MSG_WriteCoord (sizebuf_t *sb, float f, unsigned int flags)
|
|||
else MSG_WriteCoord16 (sb, f);
|
||||
}
|
||||
|
||||
void MSG_WriteAngle (sizebuf_t *sb, float f, unsigned int flags)
|
||||
void MSG_WriteAngle (sizebuf_t *sb, float f, uint32_t flags)
|
||||
{
|
||||
if (flags & PRFL_FLOATANGLE)
|
||||
MSG_WriteFloat (sb, f);
|
||||
|
@ -744,7 +744,7 @@ void MSG_WriteAngle (sizebuf_t *sb, float f, unsigned int flags)
|
|||
}
|
||||
|
||||
//johnfitz -- for PROTOCOL_FITZQUAKE
|
||||
void MSG_WriteAngle16 (sizebuf_t *sb, float f, unsigned int flags)
|
||||
void MSG_WriteAngle16 (sizebuf_t *sb, float f, uint32_t flags)
|
||||
{
|
||||
if (flags & PRFL_FLOATANGLE)
|
||||
MSG_WriteFloat (sb, f);
|
||||
|
@ -894,7 +894,7 @@ float MSG_ReadCoord32f (void)
|
|||
return MSG_ReadFloat();
|
||||
}
|
||||
|
||||
float MSG_ReadCoord (unsigned int flags)
|
||||
float MSG_ReadCoord (uint32_t flags)
|
||||
{
|
||||
if (flags & PRFL_FLOATCOORD)
|
||||
return MSG_ReadFloat ();
|
||||
|
@ -905,7 +905,7 @@ float MSG_ReadCoord (unsigned int flags)
|
|||
else return MSG_ReadCoord16 ();
|
||||
}
|
||||
|
||||
float MSG_ReadAngle (unsigned int flags)
|
||||
float MSG_ReadAngle (uint32_t flags)
|
||||
{
|
||||
if (flags & PRFL_FLOATANGLE)
|
||||
return MSG_ReadFloat ();
|
||||
|
@ -915,7 +915,7 @@ float MSG_ReadAngle (unsigned int flags)
|
|||
}
|
||||
|
||||
//johnfitz -- for PROTOCOL_FITZQUAKE
|
||||
float MSG_ReadAngle16 (unsigned int flags)
|
||||
float MSG_ReadAngle16 (uint32_t flags)
|
||||
{
|
||||
if (flags & PRFL_FLOATANGLE)
|
||||
return MSG_ReadFloat (); // make sure
|
||||
|
@ -1605,7 +1605,7 @@ can be used for detecting a file's presence.
|
|||
===========
|
||||
*/
|
||||
static int COM_FindFile (const char *filename, int *handle, FILE **file,
|
||||
unsigned int *path_id)
|
||||
uint32_t *path_id)
|
||||
{
|
||||
searchpath_t *search;
|
||||
char netpath[MAX_OSPATH];
|
||||
|
@ -1711,7 +1711,7 @@ COM_FileExists
|
|||
Returns whether the file is found in the quake filesystem.
|
||||
===========
|
||||
*/
|
||||
qboolean COM_FileExists (const char *filename, unsigned int *path_id)
|
||||
qboolean COM_FileExists (const char *filename, uint32_t *path_id)
|
||||
{
|
||||
int ret = COM_FindFile (filename, NULL, NULL, path_id);
|
||||
return (ret == -1) ? false : true;
|
||||
|
@ -1726,7 +1726,7 @@ returns a handle and a length
|
|||
it may actually be inside a pak file
|
||||
===========
|
||||
*/
|
||||
int COM_OpenFile (const char *filename, int *handle, unsigned int *path_id)
|
||||
int COM_OpenFile (const char *filename, int *handle, uint32_t *path_id)
|
||||
{
|
||||
return COM_FindFile (filename, handle, NULL, path_id);
|
||||
}
|
||||
|
@ -1739,7 +1739,7 @@ If the requested file is inside a packfile, a new FILE * will be opened
|
|||
into the file.
|
||||
===========
|
||||
*/
|
||||
int COM_FOpenFile (const char *filename, FILE **file, unsigned int *path_id)
|
||||
int COM_FOpenFile (const char *filename, FILE **file, uint32_t *path_id)
|
||||
{
|
||||
return COM_FindFile (filename, NULL, file, path_id);
|
||||
}
|
||||
|
@ -1782,7 +1782,7 @@ static byte *loadbuf;
|
|||
static cache_user_t *loadcache;
|
||||
static int loadsize;
|
||||
|
||||
byte *COM_LoadFile (const char *path, int usehunk, unsigned int *path_id)
|
||||
byte *COM_LoadFile (const char *path, int usehunk, uint32_t *path_id)
|
||||
{
|
||||
int h;
|
||||
byte *buf;
|
||||
|
@ -1837,29 +1837,29 @@ byte *COM_LoadFile (const char *path, int usehunk, unsigned int *path_id)
|
|||
return buf;
|
||||
}
|
||||
|
||||
byte *COM_LoadHunkFile (const char *path, unsigned int *path_id)
|
||||
byte *COM_LoadHunkFile (const char *path, uint32_t *path_id)
|
||||
{
|
||||
return COM_LoadFile (path, LOADFILE_HUNK, path_id);
|
||||
}
|
||||
|
||||
byte *COM_LoadZoneFile (const char *path, unsigned int *path_id)
|
||||
byte *COM_LoadZoneFile (const char *path, uint32_t *path_id)
|
||||
{
|
||||
return COM_LoadFile (path, LOADFILE_ZONE, path_id);
|
||||
}
|
||||
|
||||
byte *COM_LoadTempFile (const char *path, unsigned int *path_id)
|
||||
byte *COM_LoadTempFile (const char *path, uint32_t *path_id)
|
||||
{
|
||||
return COM_LoadFile (path, LOADFILE_TEMPHUNK, path_id);
|
||||
}
|
||||
|
||||
void COM_LoadCacheFile (const char *path, struct cache_user_s *cu, unsigned int *path_id)
|
||||
void COM_LoadCacheFile (const char *path, struct cache_user_s *cu, uint32_t *path_id)
|
||||
{
|
||||
loadcache = cu;
|
||||
COM_LoadFile (path, LOADFILE_CACHE, path_id);
|
||||
}
|
||||
|
||||
// uses temp hunk if larger than bufsize
|
||||
byte *COM_LoadStackFile (const char *path, void *buffer, int bufsize, unsigned int *path_id)
|
||||
byte *COM_LoadStackFile (const char *path, void *buffer, int bufsize, uint32_t *path_id)
|
||||
{
|
||||
byte *buf;
|
||||
|
||||
|
@ -1871,7 +1871,7 @@ byte *COM_LoadStackFile (const char *path, void *buffer, int bufsize, unsigned i
|
|||
}
|
||||
|
||||
// returns malloc'd memory
|
||||
byte *COM_LoadMallocFile (const char *path, unsigned int *path_id)
|
||||
byte *COM_LoadMallocFile (const char *path, uint32_t *path_id)
|
||||
{
|
||||
return COM_LoadFile (path, LOADFILE_MALLOC, path_id);
|
||||
}
|
||||
|
@ -2022,7 +2022,7 @@ COM_AddGameDirectory -- johnfitz -- modified based on topaz's tutorial
|
|||
static void COM_AddGameDirectory (const char *base, const char *dir)
|
||||
{
|
||||
int i;
|
||||
unsigned int path_id;
|
||||
uint32_t path_id;
|
||||
searchpath_t *search;
|
||||
pack_t *pak, *qspak;
|
||||
char pakfile[MAX_OSPATH];
|
||||
|
|
|
@ -100,9 +100,9 @@ void MSG_WriteShort (sizebuf_t *sb, int c);
|
|||
void MSG_WriteLong (sizebuf_t *sb, int c);
|
||||
void MSG_WriteFloat (sizebuf_t *sb, float f);
|
||||
void MSG_WriteString (sizebuf_t *sb, const char *s);
|
||||
void MSG_WriteCoord (sizebuf_t *sb, float f, unsigned int flags);
|
||||
void MSG_WriteAngle (sizebuf_t *sb, float f, unsigned int flags);
|
||||
void MSG_WriteAngle16 (sizebuf_t *sb, float f, unsigned int flags); //johnfitz
|
||||
void MSG_WriteCoord (sizebuf_t *sb, float f, uint32_t flags);
|
||||
void MSG_WriteAngle (sizebuf_t *sb, float f, uint32_t flags);
|
||||
void MSG_WriteAngle16 (sizebuf_t *sb, float f, uint32_t flags); //johnfitz
|
||||
|
||||
extern int msg_readcount;
|
||||
extern qboolean msg_badread; // set if a read goes beyond end of message
|
||||
|
@ -115,9 +115,9 @@ int MSG_ReadLong (void);
|
|||
float MSG_ReadFloat (void);
|
||||
const char *MSG_ReadString (void);
|
||||
|
||||
float MSG_ReadCoord (unsigned int flags);
|
||||
float MSG_ReadAngle (unsigned int flags);
|
||||
float MSG_ReadAngle16 (unsigned int flags); //johnfitz
|
||||
float MSG_ReadCoord (uint32_t flags);
|
||||
float MSG_ReadAngle (uint32_t flags);
|
||||
float MSG_ReadAngle16 (uint32_t flags); //johnfitz
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
@ -210,7 +210,7 @@ typedef struct pack_s
|
|||
|
||||
typedef struct searchpath_s
|
||||
{
|
||||
unsigned int path_id; // identifier assigned to the game directory
|
||||
uint32_t path_id; // identifier assigned to the game directory
|
||||
// Note that <install_dir>/game1 and
|
||||
// <userdir>/game1 have the same id.
|
||||
char filename[MAX_OSPATH];
|
||||
|
@ -229,29 +229,29 @@ extern char com_gamedir[MAX_OSPATH];
|
|||
extern int file_from_pak; // global indicating that file came from a pak
|
||||
|
||||
void COM_WriteFile (const char *filename, const void *data, int len);
|
||||
int COM_OpenFile (const char *filename, int *handle, unsigned int *path_id);
|
||||
int COM_FOpenFile (const char *filename, FILE **file, unsigned int *path_id);
|
||||
qboolean COM_FileExists (const char *filename, unsigned int *path_id);
|
||||
int COM_OpenFile (const char *filename, int *handle, uint32_t *path_id);
|
||||
int COM_FOpenFile (const char *filename, FILE **file, uint32_t *path_id);
|
||||
qboolean COM_FileExists (const char *filename, uint32_t *path_id);
|
||||
void COM_CloseFile (int h);
|
||||
|
||||
// these procedures open a file using COM_FindFile and loads it into a proper
|
||||
// buffer. the buffer is allocated with a total size of com_filesize + 1. the
|
||||
// procedures differ by their buffer allocation method.
|
||||
byte *COM_LoadStackFile (const char *path, void *buffer, int bufsize,
|
||||
unsigned int *path_id);
|
||||
uint32_t *path_id);
|
||||
// uses the specified stack stack buffer with the specified size
|
||||
// of bufsize. if bufsize is too short, uses temp hunk. the bufsize
|
||||
// must include the +1
|
||||
byte *COM_LoadTempFile (const char *path, unsigned int *path_id);
|
||||
byte *COM_LoadTempFile (const char *path, uint32_t *path_id);
|
||||
// allocates the buffer on the temp hunk.
|
||||
byte *COM_LoadHunkFile (const char *path, unsigned int *path_id);
|
||||
byte *COM_LoadHunkFile (const char *path, uint32_t *path_id);
|
||||
// allocates the buffer on the hunk.
|
||||
byte *COM_LoadZoneFile (const char *path, unsigned int *path_id);
|
||||
byte *COM_LoadZoneFile (const char *path, uint32_t *path_id);
|
||||
// allocates the buffer on the zone.
|
||||
void COM_LoadCacheFile (const char *path, struct cache_user_s *cu,
|
||||
unsigned int *path_id);
|
||||
uint32_t *path_id);
|
||||
// uses cache mem for allocating the buffer.
|
||||
byte *COM_LoadMallocFile (const char *path, unsigned int *path_id);
|
||||
byte *COM_LoadMallocFile (const char *path, uint32_t *path_id);
|
||||
// allocates the buffer on the system mem (malloc).
|
||||
|
||||
// Opens the given path directly, ignoring search paths.
|
||||
|
|
|
@ -258,7 +258,7 @@ cvar_t *Cvar_FindVar (const char *var_name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
cvar_t *Cvar_FindVarAfter (const char *prev_name, unsigned int with_flags)
|
||||
cvar_t *Cvar_FindVarAfter (const char *prev_name, uint32_t with_flags)
|
||||
{
|
||||
cvar_t *var;
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ typedef struct cvar_s
|
|||
{
|
||||
const char *name;
|
||||
const char *string;
|
||||
unsigned int flags;
|
||||
uint32_t flags;
|
||||
float value;
|
||||
const char *default_string; //johnfitz -- remember defaults for reset function
|
||||
cvarcallback_t callback;
|
||||
|
@ -127,7 +127,7 @@ void Cvar_WriteVariables (FILE *f);
|
|||
// with the CVAR_ARCHIVE flag set
|
||||
|
||||
cvar_t *Cvar_FindVar (const char *var_name);
|
||||
cvar_t *Cvar_FindVarAfter (const char *prev_name, unsigned int with_flags);
|
||||
cvar_t *Cvar_FindVarAfter (const char *prev_name, uint32_t with_flags);
|
||||
|
||||
void Cvar_LockVar (const char *var_name);
|
||||
void Cvar_UnlockVar (const char *var_name);
|
||||
|
|
|
@ -353,8 +353,8 @@ void GL_MakeAliasModelDisplayLists (qmodel_t *m, aliashdr_t *hdr)
|
|||
GL_MakeAliasModelDisplayLists_VBO ();
|
||||
}
|
||||
|
||||
unsigned int r_meshindexbuffer = 0;
|
||||
unsigned int r_meshvertexbuffer = 0;
|
||||
uint32_t r_meshindexbuffer = 0;
|
||||
uint32_t r_meshvertexbuffer = 0;
|
||||
|
||||
/*
|
||||
================
|
||||
|
|
|
@ -707,7 +707,7 @@ void Mod_LoadLighting (lump_t *l)
|
|||
byte *in, *out, *data;
|
||||
byte d;
|
||||
char litfilename[MAX_OSPATH];
|
||||
unsigned int path_id;
|
||||
uint32_t path_id;
|
||||
|
||||
loadmodel->lightdata = NULL;
|
||||
// LordHavoc: check for a .lit file
|
||||
|
@ -792,7 +792,7 @@ void Mod_LoadEntities (lump_t *l)
|
|||
char entfilename[MAX_QPATH];
|
||||
char *ents;
|
||||
int mark;
|
||||
unsigned int path_id;
|
||||
uint32_t path_id;
|
||||
|
||||
if (! external_ents.value)
|
||||
goto _load_embedded;
|
||||
|
@ -1760,7 +1760,7 @@ void Mod_LoadMarksurfaces (lump_t *l, int bsp2)
|
|||
msurface_t **out;
|
||||
if (bsp2)
|
||||
{
|
||||
unsigned int *in = (unsigned int *)(mod_base + l->fileofs);
|
||||
uint32_t *in = (uint32_t *)(mod_base + l->fileofs);
|
||||
|
||||
if (l->filelen % sizeof(*in))
|
||||
Host_Error ("Mod_LoadMarksurfaces: funny lump size in %s",loadmodel->name);
|
||||
|
@ -2299,7 +2299,7 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype)
|
|||
daliasskininterval_t *pinskinintervals;
|
||||
char fbr_mask_name[MAX_QPATH]; //johnfitz -- added for fullbright support
|
||||
src_offset_t offset; //johnfitz
|
||||
unsigned int texflags = TEXPREF_PAD;
|
||||
uint32_t texflags = TEXPREF_PAD;
|
||||
|
||||
skin = (byte *)(pskintype + 1);
|
||||
|
||||
|
|
|
@ -116,8 +116,8 @@ typedef struct texture_s
|
|||
// !!! if this is changed, it must be changed in asm_draw.h too !!!
|
||||
typedef struct
|
||||
{
|
||||
unsigned int v[2];
|
||||
unsigned int cachededgeoffset;
|
||||
uint32_t v[2];
|
||||
uint32_t cachededgeoffset;
|
||||
} medge_t;
|
||||
|
||||
typedef struct
|
||||
|
@ -165,7 +165,7 @@ typedef struct msurface_s
|
|||
|
||||
// lighting info
|
||||
int dlightframe;
|
||||
unsigned int dlightbits[(MAX_DLIGHTS + 31) >> 5];
|
||||
uint32_t dlightbits[(MAX_DLIGHTS + 31) >> 5];
|
||||
// int is 32 bits, need an array for MAX_DLIGHTS > 32
|
||||
|
||||
int lightmaptexturenum;
|
||||
|
@ -409,7 +409,7 @@ typedef enum {mod_brush, mod_sprite, mod_alias} modtype_t;
|
|||
typedef struct qmodel_s
|
||||
{
|
||||
char name[MAX_QPATH];
|
||||
unsigned int path_id; // path id of the game directory
|
||||
uint32_t path_id; // path id of the game directory
|
||||
// that this model came from
|
||||
qboolean needload; // bmodels and sprites don't cache normally
|
||||
|
||||
|
|
|
@ -520,7 +520,7 @@ R_Clear -- johnfitz -- rewritten and gutted
|
|||
*/
|
||||
void R_Clear (void)
|
||||
{
|
||||
unsigned int clearbits;
|
||||
uint32_t clearbits;
|
||||
|
||||
clearbits = GL_DEPTH_BUFFER_BIT;
|
||||
// from mh -- if we get a stencil buffer, we should clear it, even though we don't use it
|
||||
|
|
|
@ -38,14 +38,14 @@ static int numgltextures;
|
|||
static gltexture_t *active_gltextures, *free_gltextures;
|
||||
gltexture_t *notexture, *nulltexture;
|
||||
|
||||
unsigned int d_8to24table[256];
|
||||
unsigned int d_8to24table_fbright[256];
|
||||
unsigned int d_8to24table_fbright_fence[256];
|
||||
unsigned int d_8to24table_nobright[256];
|
||||
unsigned int d_8to24table_nobright_fence[256];
|
||||
unsigned int d_8to24table_conchars[256];
|
||||
unsigned int d_8to24table_shirt[256];
|
||||
unsigned int d_8to24table_pants[256];
|
||||
uint32_t d_8to24table[256];
|
||||
uint32_t d_8to24table_fbright[256];
|
||||
uint32_t d_8to24table_fbright_fence[256];
|
||||
uint32_t d_8to24table_nobright[256];
|
||||
uint32_t d_8to24table_nobright_fence[256];
|
||||
uint32_t d_8to24table_conchars[256];
|
||||
uint32_t d_8to24table_shirt[256];
|
||||
uint32_t d_8to24table_pants[256];
|
||||
|
||||
/*
|
||||
================================================================================
|
||||
|
@ -404,7 +404,7 @@ TexMgr_FreeTextures
|
|||
compares each bit in "flags" to the one in glt->flags only if that bit is active in "mask"
|
||||
================
|
||||
*/
|
||||
void TexMgr_FreeTextures (unsigned int flags, unsigned int mask)
|
||||
void TexMgr_FreeTextures (uint32_t flags, uint32_t mask)
|
||||
{
|
||||
gltexture_t *glt, *next;
|
||||
|
||||
|
@ -942,7 +942,7 @@ static void TexMgr_PadEdgeFixH (byte *data, int width, int height)
|
|||
TexMgr_8to32
|
||||
================
|
||||
*/
|
||||
static unsigned *TexMgr_8to32 (byte *in, int pixels, unsigned int *usepal)
|
||||
static unsigned *TexMgr_8to32 (byte *in, int pixels, uint32_t *usepal)
|
||||
{
|
||||
int i;
|
||||
unsigned *out, *data;
|
||||
|
@ -1086,7 +1086,7 @@ static void TexMgr_LoadImage8 (gltexture_t *glt, byte *data)
|
|||
extern cvar_t gl_fullbrights;
|
||||
qboolean padw = false, padh = false;
|
||||
byte padbyte;
|
||||
unsigned int *usepal;
|
||||
uint32_t *usepal;
|
||||
int i;
|
||||
|
||||
// HACK HACK HACK -- taken from tomazquake
|
||||
|
|
|
@ -50,14 +50,14 @@ typedef struct gltexture_s {
|
|||
qmodel_t *owner;
|
||||
//managed by image loading
|
||||
char name[64];
|
||||
unsigned int width; //size of image as it exists in opengl
|
||||
unsigned int height; //size of image as it exists in opengl
|
||||
unsigned int flags;
|
||||
uint32_t width; //size of image as it exists in opengl
|
||||
uint32_t height; //size of image as it exists in opengl
|
||||
uint32_t flags;
|
||||
char source_file[MAX_QPATH]; //relative filepath to data source, or "" if source is in memory
|
||||
src_offset_t source_offset; //byte offset into file, or memory address
|
||||
enum srcformat source_format; //format of pixel data (indexed, lightmap, or rgba)
|
||||
unsigned int source_width; //size of image in source data
|
||||
unsigned int source_height; //size of image in source data
|
||||
uint32_t source_width; //size of image in source data
|
||||
uint32_t source_height; //size of image in source data
|
||||
unsigned short source_crc; //generated by source data before modifications
|
||||
char shirt; //0-13 shirt color, or -1 if never colormapped
|
||||
char pants; //0-13 pants color, or -1 if never colormapped
|
||||
|
@ -68,12 +68,12 @@ typedef struct gltexture_s {
|
|||
extern gltexture_t *notexture;
|
||||
extern gltexture_t *nulltexture;
|
||||
|
||||
extern unsigned int d_8to24table[256];
|
||||
extern unsigned int d_8to24table_fbright[256];
|
||||
extern unsigned int d_8to24table_nobright[256];
|
||||
extern unsigned int d_8to24table_conchars[256];
|
||||
extern unsigned int d_8to24table_shirt[256];
|
||||
extern unsigned int d_8to24table_pants[256];
|
||||
extern uint32_t d_8to24table[256];
|
||||
extern uint32_t d_8to24table_fbright[256];
|
||||
extern uint32_t d_8to24table_nobright[256];
|
||||
extern uint32_t d_8to24table_conchars[256];
|
||||
extern uint32_t d_8to24table_shirt[256];
|
||||
extern uint32_t d_8to24table_pants[256];
|
||||
|
||||
// TEXTURE MANAGER
|
||||
|
||||
|
@ -81,7 +81,7 @@ float TexMgr_FrameUsage (void);
|
|||
gltexture_t *TexMgr_FindTexture (qmodel_t *owner, const char *name);
|
||||
gltexture_t *TexMgr_NewTexture (void);
|
||||
void TexMgr_FreeTexture (gltexture_t *kill);
|
||||
void TexMgr_FreeTextures (unsigned int flags, unsigned int mask);
|
||||
void TexMgr_FreeTextures (uint32_t flags, uint32_t mask);
|
||||
void TexMgr_FreeTexturesForOwner (qmodel_t *owner);
|
||||
void TexMgr_NewGame (void);
|
||||
void TexMgr_Init (void);
|
||||
|
|
|
@ -35,7 +35,7 @@ struct qsockaddr
|
|||
unsigned char qsa_data[14];
|
||||
};
|
||||
|
||||
#define NET_HEADERSIZE (2 * sizeof(unsigned int))
|
||||
#define NET_HEADERSIZE (2 * sizeof(uint32_t))
|
||||
#define NET_DATAGRAMSIZE (MAX_DATAGRAM + NET_HEADERSIZE)
|
||||
|
||||
// NetHeader flags
|
||||
|
@ -143,14 +143,14 @@ typedef struct qsocket_s
|
|||
sys_socket_t socket;
|
||||
void *driverdata;
|
||||
|
||||
unsigned int ackSequence;
|
||||
unsigned int sendSequence;
|
||||
unsigned int unreliableSendSequence;
|
||||
uint32_t ackSequence;
|
||||
uint32_t sendSequence;
|
||||
uint32_t unreliableSendSequence;
|
||||
int sendMessageLength;
|
||||
byte sendMessage [NET_MAXMESSAGE];
|
||||
|
||||
unsigned int receiveSequence;
|
||||
unsigned int unreliableReceiveSequence;
|
||||
uint32_t receiveSequence;
|
||||
uint32_t unreliableReceiveSequence;
|
||||
int receiveMessageLength;
|
||||
byte receiveMessage [NET_MAXMESSAGE];
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ static int droppedDatagrams;
|
|||
|
||||
static struct
|
||||
{
|
||||
unsigned int length;
|
||||
unsigned int sequence;
|
||||
uint32_t length;
|
||||
uint32_t sequence;
|
||||
byte data[MAX_DATAGRAM];
|
||||
} packetBuffer;
|
||||
|
||||
|
@ -131,9 +131,9 @@ static void NET_Ban_f (void)
|
|||
|
||||
int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data)
|
||||
{
|
||||
unsigned int packetLen;
|
||||
unsigned int dataLen;
|
||||
unsigned int eom;
|
||||
uint32_t packetLen;
|
||||
uint32_t dataLen;
|
||||
uint32_t eom;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (data->cursize == 0)
|
||||
|
@ -178,9 +178,9 @@ int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data)
|
|||
|
||||
static int SendMessageNext (qsocket_t *sock)
|
||||
{
|
||||
unsigned int packetLen;
|
||||
unsigned int dataLen;
|
||||
unsigned int eom;
|
||||
uint32_t packetLen;
|
||||
uint32_t dataLen;
|
||||
uint32_t eom;
|
||||
|
||||
if (sock->sendMessageLength <= MAX_DATAGRAM)
|
||||
{
|
||||
|
@ -211,9 +211,9 @@ static int SendMessageNext (qsocket_t *sock)
|
|||
|
||||
static int ReSendMessage (qsocket_t *sock)
|
||||
{
|
||||
unsigned int packetLen;
|
||||
unsigned int dataLen;
|
||||
unsigned int eom;
|
||||
uint32_t packetLen;
|
||||
uint32_t dataLen;
|
||||
uint32_t eom;
|
||||
|
||||
if (sock->sendMessageLength <= MAX_DATAGRAM)
|
||||
{
|
||||
|
@ -286,12 +286,12 @@ int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
|
|||
|
||||
int Datagram_GetMessage (qsocket_t *sock)
|
||||
{
|
||||
unsigned int length;
|
||||
unsigned int flags;
|
||||
uint32_t length;
|
||||
uint32_t flags;
|
||||
int ret = 0;
|
||||
struct qsockaddr readaddr;
|
||||
unsigned int sequence;
|
||||
unsigned int count;
|
||||
uint32_t sequence;
|
||||
uint32_t count;
|
||||
|
||||
if (!sock->canSend)
|
||||
if ((net_time - sock->lastSendTime) > 1.0)
|
||||
|
@ -299,7 +299,7 @@ int Datagram_GetMessage (qsocket_t *sock)
|
|||
|
||||
while (1)
|
||||
{
|
||||
length = (unsigned int) sfunc.Read(sock->socket, (byte *)&packetBuffer,
|
||||
length = (uint32_t) sfunc.Read(sock->socket, (byte *)&packetBuffer,
|
||||
NET_DATAGRAMSIZE, &readaddr);
|
||||
|
||||
// if ((rand() & 255) > 220)
|
||||
|
@ -308,7 +308,7 @@ int Datagram_GetMessage (qsocket_t *sock)
|
|||
if (length == 0)
|
||||
break;
|
||||
|
||||
if (length == (unsigned int)-1)
|
||||
if (length == (uint32_t)-1)
|
||||
{
|
||||
Con_Printf("Read error\n");
|
||||
return -1;
|
||||
|
|
|
@ -111,7 +111,7 @@ typedef LONG socklen_t; /* int32_t */
|
|||
#if (LONG_MAX <= 2147483647L)
|
||||
typedef unsigned long in_addr_t; /* u_int32_t */
|
||||
#else
|
||||
typedef unsigned int in_addr_t; /* u_int32_t */
|
||||
typedef uint32_t in_addr_t; /* u_int32_t */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ static void PR_PrintStatement (dstatement_t *s)
|
|||
{
|
||||
int i;
|
||||
|
||||
if ((unsigned int)s->op < sizeof(pr_opnames)/sizeof(pr_opnames[0]))
|
||||
if ((uint32_t)s->op < sizeof(pr_opnames)/sizeof(pr_opnames[0]))
|
||||
{
|
||||
Con_Printf("%s ", pr_opnames[s->op]);
|
||||
i = strlen(pr_opnames[s->op]);
|
||||
|
@ -158,7 +158,7 @@ static void PR_PrintStatement (dstatement_t *s)
|
|||
{
|
||||
Con_Printf("branch %i", s->a);
|
||||
}
|
||||
else if ((unsigned int)(s->op-OP_STORE_F) < 6)
|
||||
else if ((uint32_t)(s->op-OP_STORE_F) < 6)
|
||||
{
|
||||
Con_Printf("%s", PR_GlobalString(s->a));
|
||||
Con_Printf("%s", PR_GlobalStringNoContents(s->b));
|
||||
|
|
|
@ -363,7 +363,7 @@ void GL_DrawAliasFrame (aliashdr_t *paliashdr, lerpdata_t lerpdata)
|
|||
{
|
||||
if (r_drawflat_cheatsafe)
|
||||
{
|
||||
srand(count * (unsigned int)(src_offset_t)commands);
|
||||
srand(count * (uint32_t)(src_offset_t)commands);
|
||||
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
|
||||
}
|
||||
else if (lerping)
|
||||
|
|
|
@ -158,7 +158,7 @@ void R_DrawSequentialPoly (msurface_t *s)
|
|||
{
|
||||
for (p = s->polys->next; p; p = p->next)
|
||||
{
|
||||
srand((unsigned int) (uintptr_t) p);
|
||||
srand((uint32_t) (uintptr_t) p);
|
||||
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
|
||||
DrawGLPoly (p);
|
||||
rs_brushpasses++;
|
||||
|
@ -166,7 +166,7 @@ void R_DrawSequentialPoly (msurface_t *s)
|
|||
return;
|
||||
}
|
||||
|
||||
srand((unsigned int) (uintptr_t) s->polys);
|
||||
srand((uint32_t) (uintptr_t) s->polys);
|
||||
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
|
||||
DrawGLPoly (s->polys);
|
||||
rs_brushpasses++;
|
||||
|
@ -982,7 +982,7 @@ surfaces from world + all brush models
|
|||
*/
|
||||
void GL_BuildBModelVertexBuffer (void)
|
||||
{
|
||||
unsigned int numverts, varray_bytes, varray_index;
|
||||
uint32_t numverts, varray_bytes, varray_index;
|
||||
int i, j;
|
||||
qmodel_t *m;
|
||||
float *varray;
|
||||
|
@ -1150,7 +1150,7 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
|
|||
if (cl.worldmodel->lightdata)
|
||||
{
|
||||
// clear to no light
|
||||
memset (&blocklights[0], 0, size * 3 * sizeof (unsigned int)); //johnfitz -- lit support via lordhavoc
|
||||
memset (&blocklights[0], 0, size * 3 * sizeof (uint32_t)); //johnfitz -- lit support via lordhavoc
|
||||
|
||||
// add all the lightmaps
|
||||
if (lightmap)
|
||||
|
@ -1179,7 +1179,7 @@ void R_BuildLightMap (msurface_t *surf, byte *dest, int stride)
|
|||
else
|
||||
{
|
||||
// set to full bright if no light data
|
||||
memset (&blocklights[0], 255, size * 3 * sizeof (unsigned int)); //johnfitz -- lit support via lordhavoc
|
||||
memset (&blocklights[0], 255, size * 3 * sizeof (uint32_t)); //johnfitz -- lit support via lordhavoc
|
||||
}
|
||||
|
||||
// bound, invert, and shift
|
||||
|
|
|
@ -364,7 +364,7 @@ void R_DrawTextureChains_Drawflat (qmodel_t *model, texchain_t chain)
|
|||
if (!s->culled)
|
||||
for (p = s->polys->next; p; p = p->next)
|
||||
{
|
||||
srand((unsigned int) (uintptr_t) p);
|
||||
srand((uint32_t) (uintptr_t) p);
|
||||
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
|
||||
DrawGLPoly (p);
|
||||
rs_brushpasses++;
|
||||
|
@ -375,7 +375,7 @@ void R_DrawTextureChains_Drawflat (qmodel_t *model, texchain_t chain)
|
|||
for (s = t->texturechains[chain]; s; s = s->texturechain)
|
||||
if (!s->culled)
|
||||
{
|
||||
srand((unsigned int) (uintptr_t) s->polys);
|
||||
srand((uint32_t) (uintptr_t) s->polys);
|
||||
glColor3f (rand()%256/255.0, rand()%256/255.0, rand()%256/255.0);
|
||||
DrawGLPoly (s->polys);
|
||||
rs_brushpasses++;
|
||||
|
@ -428,7 +428,7 @@ void R_DrawTextureChains_Glow (qmodel_t *model, entity_t *ent, texchain_t chain)
|
|||
//
|
||||
//==============================================================================
|
||||
|
||||
static unsigned int R_NumTriangleIndicesForSurf (msurface_t *s)
|
||||
static uint32_t R_NumTriangleIndicesForSurf (msurface_t *s)
|
||||
{
|
||||
return 3 * (s->numedges - 2);
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ Writes out the triangle indices needed to draw s as a triangle list.
|
|||
The number of indices it will write is given by R_NumTriangleIndicesForSurf.
|
||||
================
|
||||
*/
|
||||
static void R_TriangleIndicesForSurf (msurface_t *s, unsigned int *dest)
|
||||
static void R_TriangleIndicesForSurf (msurface_t *s, uint32_t *dest)
|
||||
{
|
||||
int i;
|
||||
for (i=2; i<s->numedges; i++)
|
||||
|
@ -454,8 +454,8 @@ static void R_TriangleIndicesForSurf (msurface_t *s, unsigned int *dest)
|
|||
|
||||
#define MAX_BATCH_SIZE 4096
|
||||
|
||||
static unsigned int vbo_indices[MAX_BATCH_SIZE];
|
||||
static unsigned int num_vbo_indices;
|
||||
static uint32_t vbo_indices[MAX_BATCH_SIZE];
|
||||
static uint32_t num_vbo_indices;
|
||||
|
||||
/*
|
||||
================
|
||||
|
|
|
@ -107,7 +107,7 @@ void S_CodecShutdown (void)
|
|||
S_CodecOpenStream
|
||||
=================
|
||||
*/
|
||||
snd_stream_t *S_CodecOpenStreamType (const char *filename, unsigned int type)
|
||||
snd_stream_t *S_CodecOpenStreamType (const char *filename, uint32_t type)
|
||||
{
|
||||
snd_codec_t *codec;
|
||||
snd_stream_t *stream;
|
||||
|
@ -225,7 +225,7 @@ snd_stream_t *S_CodecOpenStreamAny (const char *filename)
|
|||
}
|
||||
}
|
||||
|
||||
qboolean S_CodecForwardStream (snd_stream_t *stream, unsigned int type)
|
||||
qboolean S_CodecForwardStream (snd_stream_t *stream, uint32_t type)
|
||||
{
|
||||
snd_codec_t *codec = codecs;
|
||||
|
||||
|
@ -294,7 +294,7 @@ void S_CodecUtilClose(snd_stream_t **stream)
|
|||
*stream = NULL;
|
||||
}
|
||||
|
||||
int S_CodecIsAvailable (unsigned int type)
|
||||
int S_CodecIsAvailable (uint32_t type)
|
||||
{
|
||||
snd_codec_t *codec = codecs;
|
||||
while (codec)
|
||||
|
|
|
@ -64,7 +64,7 @@ void S_CodecShutdown (void);
|
|||
/* Callers of the following S_CodecOpenStream* functions
|
||||
* are reponsible for attaching any path to the filename */
|
||||
|
||||
snd_stream_t *S_CodecOpenStreamType (const char *filename, unsigned int type);
|
||||
snd_stream_t *S_CodecOpenStreamType (const char *filename, uint32_t type);
|
||||
/* Decides according to the required type. */
|
||||
|
||||
snd_stream_t *S_CodecOpenStreamAny (const char *filename);
|
||||
|
@ -96,7 +96,7 @@ void S_CodecUtilClose(snd_stream_t **stream);
|
|||
#define CODECTYPE_WAVE CODECTYPE_WAV
|
||||
#define CODECTYPE_MIDI CODECTYPE_MID
|
||||
|
||||
int S_CodecIsAvailable (unsigned int type);
|
||||
int S_CodecIsAvailable (uint32_t type);
|
||||
/* return 1 if available, 0 if codec failed init
|
||||
* or -1 if no such codec is present. */
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef void (*CODEC_CLOSE)(snd_stream_t *stream);
|
|||
|
||||
struct snd_codec_s
|
||||
{
|
||||
unsigned int type; /* handled data type. (1U << n) */
|
||||
uint32_t type; /* handled data type. (1U << n) */
|
||||
qboolean initialized; /* init succeedded */
|
||||
const char *ext; /* expected extension */
|
||||
CODEC_INIT initialize;
|
||||
|
@ -48,7 +48,7 @@ struct snd_codec_s
|
|||
snd_codec_t *next;
|
||||
};
|
||||
|
||||
qboolean S_CodecForwardStream (snd_stream_t *stream, unsigned int type);
|
||||
qboolean S_CodecForwardStream (snd_stream_t *stream, uint32_t type);
|
||||
/* Forward a stream to another codec of 'type' type. */
|
||||
|
||||
#endif /* _SND_CODECI_H_ */
|
||||
|
|
|
@ -904,7 +904,7 @@ void S_ExtraUpdate (void)
|
|||
|
||||
static void S_Update_ (void)
|
||||
{
|
||||
unsigned int endtime;
|
||||
uint32_t endtime;
|
||||
int samps;
|
||||
|
||||
if (!sound_started || (snd_blocked > 0))
|
||||
|
@ -925,9 +925,9 @@ static void S_Update_ (void)
|
|||
}
|
||||
|
||||
// mix ahead of current position
|
||||
endtime = soundtime + (unsigned int)(_snd_mixahead.value * shm->speed);
|
||||
endtime = soundtime + (uint32_t)(_snd_mixahead.value * shm->speed);
|
||||
samps = shm->samples >> (shm->channels - 1);
|
||||
endtime = q_min(endtime, (unsigned int)(soundtime + samps));
|
||||
endtime = q_min(endtime, (uint32_t)(soundtime + samps));
|
||||
|
||||
S_PaintChannels (endtime);
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ static inline qboolean tag_is_id3v2(const unsigned char *data, size_t length)
|
|||
*/
|
||||
static inline qboolean tag_is_apetag(const unsigned char *data, size_t length)
|
||||
{
|
||||
unsigned int v;
|
||||
uint32_t v;
|
||||
|
||||
if (length < 32) return false;
|
||||
if (memcmp(data,"APETAGEX",8) != 0)
|
||||
|
|
|
@ -237,7 +237,7 @@ static void stbi__end_write_file(stbi__write_context *s)
|
|||
|
||||
#endif // !STBI_WRITE_NO_STDIO
|
||||
|
||||
typedef unsigned int stbiw_uint32;
|
||||
typedef uint32_t stbiw_uint32;
|
||||
typedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1];
|
||||
|
||||
static void stbiw__putc(stbi__write_context *s, unsigned char c)
|
||||
|
|
Loading…
Reference in New Issue