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