* Applied ajax's cleanup patch

This commit is contained in:
Tim Angus 2005-09-23 17:39:14 +00:00
parent 4c6f59c541
commit fe14a45ad1
40 changed files with 166 additions and 166 deletions

View file

@ -305,7 +305,7 @@ char *AAS_LoadAASLump(fileHandle_t fp, int offset, int length, int *lastoffset,
AAS_Error("can't seek to aas lump\n"); AAS_Error("can't seek to aas lump\n");
AAS_DumpAASData(); AAS_DumpAASData();
botimport.FS_FCloseFile(fp); botimport.FS_FCloseFile(fp);
return 0; return NULL;
} //end if } //end if
} //end if } //end if
//allocate memory //allocate memory

View file

@ -1388,7 +1388,7 @@ int AAS_AreaInfo( int areanum, aas_areainfo_t *info )
//=========================================================================== //===========================================================================
aas_plane_t *AAS_PlaneFromNum(int planenum) aas_plane_t *AAS_PlaneFromNum(int planenum)
{ {
if (!aasworld.loaded) return 0; if (!aasworld.loaded) return NULL;
return &aasworld.planes[planenum]; return &aasworld.planes[planenum];
} //end of the function AAS_PlaneFromNum } //end of the function AAS_PlaneFromNum

View file

@ -146,7 +146,7 @@ fielddef_t iteminfo_fields[] =
{"respawntime", ITEMINFO_OFS(respawntime), FT_FLOAT}, {"respawntime", ITEMINFO_OFS(respawntime), FT_FLOAT},
{"mins", ITEMINFO_OFS(mins), FT_FLOAT|FT_ARRAY, 3}, {"mins", ITEMINFO_OFS(mins), FT_FLOAT|FT_ARRAY, 3},
{"maxs", ITEMINFO_OFS(maxs), FT_FLOAT|FT_ARRAY, 3}, {"maxs", ITEMINFO_OFS(maxs), FT_FLOAT|FT_ARRAY, 3},
{0, 0, 0} {NULL, 0, 0}
}; };
structdef_t iteminfo_struct = structdef_t iteminfo_struct =

View file

@ -1114,7 +1114,7 @@ CG_BuildSpectatorString
======================= =======================
*/ */
void CG_BuildSpectatorString() { void CG_BuildSpectatorString(void) {
int i; int i;
cg.spectatorList[0] = 0; cg.spectatorList[0] = 0;
for (i = 0; i < MAX_CLIENTS; i++) { for (i = 0; i < MAX_CLIENTS; i++) {

View file

@ -40,7 +40,7 @@ int drawTeamOverlayModificationCount = -1;
//static char teamChat1[256]; //static char teamChat1[256];
//static char teamChat2[256]; //static char teamChat2[256];
void CG_InitTeamChat() { void CG_InitTeamChat(void) {
memset(teamChat1, 0, sizeof(teamChat1)); memset(teamChat1, 0, sizeof(teamChat1));
memset(teamChat2, 0, sizeof(teamChat2)); memset(teamChat2, 0, sizeof(teamChat2));
memset(systemChat, 0, sizeof(systemChat)); memset(systemChat, 0, sizeof(systemChat));
@ -55,7 +55,7 @@ void CG_SetPrintString(int type, const char *p) {
} }
} }
void CG_CheckOrderPending() { void CG_CheckOrderPending(void) {
if (cgs.gametype < GT_CTF) { if (cgs.gametype < GT_CTF) {
return; return;
} }
@ -952,7 +952,7 @@ float CG_GetValue(int ownerDraw) {
return -1; return -1;
} }
qboolean CG_OtherTeamHasFlag() { qboolean CG_OtherTeamHasFlag(void) {
if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) { if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) {
int team = cg.snap->ps.persistant[PERS_TEAM]; int team = cg.snap->ps.persistant[PERS_TEAM];
if (cgs.gametype == GT_1FCTF) { if (cgs.gametype == GT_1FCTF) {
@ -976,7 +976,7 @@ qboolean CG_OtherTeamHasFlag() {
return qfalse; return qfalse;
} }
qboolean CG_YourTeamHasFlag() { qboolean CG_YourTeamHasFlag(void) {
if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) { if (cgs.gametype == GT_CTF || cgs.gametype == GT_1FCTF) {
int team = cg.snap->ps.persistant[PERS_TEAM]; int team = cg.snap->ps.persistant[PERS_TEAM];
if (cgs.gametype == GT_1FCTF) { if (cgs.gametype == GT_1FCTF) {
@ -1131,7 +1131,7 @@ static void CG_DrawAreaChat(rectDef_t *rect, float scale, vec4_t color, qhandle_
CG_Text_Paint(rect->x, rect->y + rect->h, scale, color, teamChat2, 0, 0, 0); CG_Text_Paint(rect->x, rect->y + rect->h, scale, color, teamChat2, 0, 0, 0);
} }
const char *CG_GetKillerText() { const char *CG_GetKillerText(void) {
const char *s = ""; const char *s = "";
if ( cg.killerName[0] ) { if ( cg.killerName[0] ) {
s = va("Fragged by %s", cg.killerName ); s = va("Fragged by %s", cg.killerName );
@ -1167,7 +1167,7 @@ static void CG_Draw2ndPlace(rectDef_t *rect, float scale, vec4_t color, qhandle_
} }
} }
const char *CG_GetGameStatusText() { const char *CG_GetGameStatusText(void) {
const char *s = ""; const char *s = "";
if ( cgs.gametype < GT_TEAM) { if ( cgs.gametype < GT_TEAM) {
if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) { if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) {
@ -1189,7 +1189,7 @@ static void CG_DrawGameStatus(rectDef_t *rect, float scale, vec4_t color, qhandl
CG_Text_Paint(rect->x, rect->y + rect->h, scale, color, CG_GetGameStatusText(), 0, 0, textStyle); CG_Text_Paint(rect->x, rect->y + rect->h, scale, color, CG_GetGameStatusText(), 0, 0, textStyle);
} }
const char *CG_GameTypeString() { const char *CG_GameTypeString(void) {
if ( cgs.gametype == GT_FFA ) { if ( cgs.gametype == GT_FFA ) {
return "Free For All"; return "Free For All";
} else if ( cgs.gametype == GT_TEAM ) { } else if ( cgs.gametype == GT_TEAM ) {
@ -1824,7 +1824,7 @@ int CG_ClientNumFromName(const char *p) {
return -1; return -1;
} }
void CG_ShowResponseHead() { void CG_ShowResponseHead(void) {
Menus_OpenByName("voiceMenu"); Menus_OpenByName("voiceMenu");
trap_Cvar_Set("cl_conXOffset", "72"); trap_Cvar_Set("cl_conXOffset", "72");
cg.voiceTime = cg.time; cg.voiceTime = cg.time;

View file

@ -298,7 +298,7 @@ CG_FileExists
static qboolean CG_FileExists(const char *filename) { static qboolean CG_FileExists(const char *filename) {
int len; int len;
len = trap_FS_FOpenFile( filename, 0, FS_READ ); len = trap_FS_FOpenFile( filename, NULL, FS_READ );
if (len>0) { if (len>0) {
return qtrue; return qtrue;
} }

View file

@ -47,7 +47,7 @@ static void GetClientState( uiClientState_t *state ) {
LAN_LoadCachedServers LAN_LoadCachedServers
==================== ====================
*/ */
void LAN_LoadCachedServers( ) { void LAN_LoadCachedServers( void ) {
int size; int size;
fileHandle_t fileIn; fileHandle_t fileIn;
cls.numglobalservers = cls.nummplayerservers = cls.numfavoriteservers = 0; cls.numglobalservers = cls.nummplayerservers = cls.numfavoriteservers = 0;
@ -74,7 +74,7 @@ void LAN_LoadCachedServers( ) {
LAN_SaveServersToCache LAN_SaveServersToCache
==================== ====================
*/ */
void LAN_SaveServersToCache( ) { void LAN_SaveServersToCache( void ) {
int size; int size;
fileHandle_t fileOut = FS_SV_FOpenFileWrite("servercache.dat"); fileHandle_t fileOut = FS_SV_FOpenFileWrite("servercache.dat");
FS_Write(&cls.numglobalservers, sizeof(int), fileOut); FS_Write(&cls.numglobalservers, sizeof(int), fileOut);
@ -134,7 +134,7 @@ static int LAN_AddServer(int source, const char *name, const char *address) {
netadr_t adr; netadr_t adr;
serverInfo_t *servers = NULL; serverInfo_t *servers = NULL;
max = MAX_OTHER_SERVERS; max = MAX_OTHER_SERVERS;
count = 0; count = NULL;
switch (source) { switch (source) {
case AS_LOCAL : case AS_LOCAL :
@ -182,7 +182,7 @@ LAN_RemoveServer
static void LAN_RemoveServer(int source, const char *addr) { static void LAN_RemoveServer(int source, const char *addr) {
int *count, i; int *count, i;
serverInfo_t *servers = NULL; serverInfo_t *servers = NULL;
count = 0; count = NULL;
switch (source) { switch (source) {
case AS_LOCAL : case AS_LOCAL :
count = &cls.numlocalservers; count = &cls.numlocalservers;
@ -1173,7 +1173,7 @@ void CL_InitUI( void ) {
} }
} }
qboolean UI_usesUniqueCDKey() { qboolean UI_usesUniqueCDKey( void ) {
if (uivm) { if (uivm) {
return (VM_Call( uivm, UI_HASUNIQUECDKEY) == qtrue); return (VM_Call( uivm, UI_HASUNIQUECDKEY) == qtrue);
} else { } else {

View file

@ -938,7 +938,7 @@ void S_ByteSwapRawSamples( int samples, int width, int s_channels, const byte *d
} }
} }
portable_samplepair_t *S_GetRawSamplePointer() { portable_samplepair_t *S_GetRawSamplePointer( void ) {
return s_rawsamples; return s_rawsamples;
} }
@ -1605,7 +1605,7 @@ S_FreeOldestSound
====================== ======================
*/ */
void S_FreeOldestSound() { void S_FreeOldestSound( void ) {
int i, oldest, used; int i, oldest, used;
sfx_t *sfx; sfx_t *sfx;
sndBuffer *buffer, *nbuffer; sndBuffer *buffer, *nbuffer;

View file

@ -56,7 +56,7 @@ void SND_free(sndBuffer *v) {
inUse += sizeof(sndBuffer); inUse += sizeof(sndBuffer);
} }
sndBuffer* SND_malloc() { sndBuffer* SND_malloc(void) {
sndBuffer *v; sndBuffer *v;
redo: redo:
if (freelist == NULL) { if (freelist == NULL) {
@ -73,7 +73,7 @@ redo:
return v; return v;
} }
void SND_setup() { void SND_setup(void) {
sndBuffer *p, *q; sndBuffer *p, *q;
cvar_t *cv; cvar_t *cv;
int scs; int scs;
@ -399,6 +399,6 @@ qboolean S_LoadSound( sfx_t *sfx )
return qtrue; return qtrue;
} }
void S_DisplayFreeMemory() { void S_DisplayFreeMemory(void) {
Com_Printf("%d bytes free sound buffer memory, %d total used\n", inUse, totalInUse); Com_Printf("%d bytes free sound buffer memory, %d total used\n", inUse, totalInUse);
} }

View file

@ -48,7 +48,7 @@ gitem_t bg_itemlist[] =
NULL, NULL,
{ NULL, { NULL,
NULL, NULL,
0, 0} , NULL, NULL} ,
/* icon */ NULL, /* icon */ NULL,
/* pickup */ NULL, /* pickup */ NULL,
0, 0,
@ -69,7 +69,7 @@ gitem_t bg_itemlist[] =
"sound/misc/ar1_pkup.wav", "sound/misc/ar1_pkup.wav",
{ "models/powerups/armor/shard.md3", { "models/powerups/armor/shard.md3",
"models/powerups/armor/shard_sphere.md3", "models/powerups/armor/shard_sphere.md3",
0, 0} , NULL, NULL} ,
/* icon */ "icons/iconr_shard", /* icon */ "icons/iconr_shard",
/* pickup */ "Armor Shard", /* pickup */ "Armor Shard",
5, 5,
@ -85,7 +85,7 @@ gitem_t bg_itemlist[] =
"item_armor_combat", "item_armor_combat",
"sound/misc/ar2_pkup.wav", "sound/misc/ar2_pkup.wav",
{ "models/powerups/armor/armor_yel.md3", { "models/powerups/armor/armor_yel.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconr_yellow", /* icon */ "icons/iconr_yellow",
/* pickup */ "Armor", /* pickup */ "Armor",
50, 50,
@ -101,7 +101,7 @@ gitem_t bg_itemlist[] =
"item_armor_body", "item_armor_body",
"sound/misc/ar2_pkup.wav", "sound/misc/ar2_pkup.wav",
{ "models/powerups/armor/armor_red.md3", { "models/powerups/armor/armor_red.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconr_red", /* icon */ "icons/iconr_red",
/* pickup */ "Heavy Armor", /* pickup */ "Heavy Armor",
100, 100,
@ -121,7 +121,7 @@ gitem_t bg_itemlist[] =
"sound/items/s_health.wav", "sound/items/s_health.wav",
{ "models/powerups/health/small_cross.md3", { "models/powerups/health/small_cross.md3",
"models/powerups/health/small_sphere.md3", "models/powerups/health/small_sphere.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/iconh_green", /* icon */ "icons/iconh_green",
/* pickup */ "5 Health", /* pickup */ "5 Health",
5, 5,
@ -138,7 +138,7 @@ gitem_t bg_itemlist[] =
"sound/items/n_health.wav", "sound/items/n_health.wav",
{ "models/powerups/health/medium_cross.md3", { "models/powerups/health/medium_cross.md3",
"models/powerups/health/medium_sphere.md3", "models/powerups/health/medium_sphere.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/iconh_yellow", /* icon */ "icons/iconh_yellow",
/* pickup */ "25 Health", /* pickup */ "25 Health",
25, 25,
@ -155,7 +155,7 @@ gitem_t bg_itemlist[] =
"sound/items/l_health.wav", "sound/items/l_health.wav",
{ "models/powerups/health/large_cross.md3", { "models/powerups/health/large_cross.md3",
"models/powerups/health/large_sphere.md3", "models/powerups/health/large_sphere.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/iconh_red", /* icon */ "icons/iconh_red",
/* pickup */ "50 Health", /* pickup */ "50 Health",
50, 50,
@ -172,7 +172,7 @@ gitem_t bg_itemlist[] =
"sound/items/m_health.wav", "sound/items/m_health.wav",
{ "models/powerups/health/mega_cross.md3", { "models/powerups/health/mega_cross.md3",
"models/powerups/health/mega_sphere.md3", "models/powerups/health/mega_sphere.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/iconh_mega", /* icon */ "icons/iconh_mega",
/* pickup */ "Mega Health", /* pickup */ "Mega Health",
100, 100,
@ -193,7 +193,7 @@ gitem_t bg_itemlist[] =
"weapon_gauntlet", "weapon_gauntlet",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/gauntlet/gauntlet.md3", { "models/weapons2/gauntlet/gauntlet.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_gauntlet", /* icon */ "icons/iconw_gauntlet",
/* pickup */ "Gauntlet", /* pickup */ "Gauntlet",
0, 0,
@ -209,7 +209,7 @@ gitem_t bg_itemlist[] =
"weapon_shotgun", "weapon_shotgun",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/shotgun/shotgun.md3", { "models/weapons2/shotgun/shotgun.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_shotgun", /* icon */ "icons/iconw_shotgun",
/* pickup */ "Shotgun", /* pickup */ "Shotgun",
10, 10,
@ -225,7 +225,7 @@ gitem_t bg_itemlist[] =
"weapon_machinegun", "weapon_machinegun",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/machinegun/machinegun.md3", { "models/weapons2/machinegun/machinegun.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_machinegun", /* icon */ "icons/iconw_machinegun",
/* pickup */ "Machinegun", /* pickup */ "Machinegun",
40, 40,
@ -241,7 +241,7 @@ gitem_t bg_itemlist[] =
"weapon_grenadelauncher", "weapon_grenadelauncher",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/grenadel/grenadel.md3", { "models/weapons2/grenadel/grenadel.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_grenade", /* icon */ "icons/iconw_grenade",
/* pickup */ "Grenade Launcher", /* pickup */ "Grenade Launcher",
10, 10,
@ -257,7 +257,7 @@ gitem_t bg_itemlist[] =
"weapon_rocketlauncher", "weapon_rocketlauncher",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/rocketl/rocketl.md3", { "models/weapons2/rocketl/rocketl.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_rocket", /* icon */ "icons/iconw_rocket",
/* pickup */ "Rocket Launcher", /* pickup */ "Rocket Launcher",
10, 10,
@ -273,7 +273,7 @@ gitem_t bg_itemlist[] =
"weapon_lightning", "weapon_lightning",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/lightning/lightning.md3", { "models/weapons2/lightning/lightning.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_lightning", /* icon */ "icons/iconw_lightning",
/* pickup */ "Lightning Gun", /* pickup */ "Lightning Gun",
100, 100,
@ -289,7 +289,7 @@ gitem_t bg_itemlist[] =
"weapon_railgun", "weapon_railgun",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/railgun/railgun.md3", { "models/weapons2/railgun/railgun.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_railgun", /* icon */ "icons/iconw_railgun",
/* pickup */ "Railgun", /* pickup */ "Railgun",
10, 10,
@ -305,7 +305,7 @@ gitem_t bg_itemlist[] =
"weapon_plasmagun", "weapon_plasmagun",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/plasma/plasma.md3", { "models/weapons2/plasma/plasma.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_plasma", /* icon */ "icons/iconw_plasma",
/* pickup */ "Plasma Gun", /* pickup */ "Plasma Gun",
50, 50,
@ -321,7 +321,7 @@ gitem_t bg_itemlist[] =
"weapon_bfg", "weapon_bfg",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/bfg/bfg.md3", { "models/weapons2/bfg/bfg.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_bfg", /* icon */ "icons/iconw_bfg",
/* pickup */ "BFG10K", /* pickup */ "BFG10K",
20, 20,
@ -337,7 +337,7 @@ gitem_t bg_itemlist[] =
"weapon_grapplinghook", "weapon_grapplinghook",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons2/grapple/grapple.md3", { "models/weapons2/grapple/grapple.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_grapple", /* icon */ "icons/iconw_grapple",
/* pickup */ "Grappling Hook", /* pickup */ "Grappling Hook",
0, 0,
@ -357,7 +357,7 @@ gitem_t bg_itemlist[] =
"ammo_shells", "ammo_shells",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/shotgunam.md3", { "models/powerups/ammo/shotgunam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_shotgun", /* icon */ "icons/icona_shotgun",
/* pickup */ "Shells", /* pickup */ "Shells",
10, 10,
@ -373,7 +373,7 @@ gitem_t bg_itemlist[] =
"ammo_bullets", "ammo_bullets",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/machinegunam.md3", { "models/powerups/ammo/machinegunam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_machinegun", /* icon */ "icons/icona_machinegun",
/* pickup */ "Bullets", /* pickup */ "Bullets",
50, 50,
@ -389,7 +389,7 @@ gitem_t bg_itemlist[] =
"ammo_grenades", "ammo_grenades",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/grenadeam.md3", { "models/powerups/ammo/grenadeam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_grenade", /* icon */ "icons/icona_grenade",
/* pickup */ "Grenades", /* pickup */ "Grenades",
5, 5,
@ -405,7 +405,7 @@ gitem_t bg_itemlist[] =
"ammo_cells", "ammo_cells",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/plasmaam.md3", { "models/powerups/ammo/plasmaam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_plasma", /* icon */ "icons/icona_plasma",
/* pickup */ "Cells", /* pickup */ "Cells",
30, 30,
@ -421,7 +421,7 @@ gitem_t bg_itemlist[] =
"ammo_lightning", "ammo_lightning",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/lightningam.md3", { "models/powerups/ammo/lightningam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_lightning", /* icon */ "icons/icona_lightning",
/* pickup */ "Lightning", /* pickup */ "Lightning",
60, 60,
@ -437,7 +437,7 @@ gitem_t bg_itemlist[] =
"ammo_rockets", "ammo_rockets",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/rocketam.md3", { "models/powerups/ammo/rocketam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_rocket", /* icon */ "icons/icona_rocket",
/* pickup */ "Rockets", /* pickup */ "Rockets",
5, 5,
@ -453,7 +453,7 @@ gitem_t bg_itemlist[] =
"ammo_slugs", "ammo_slugs",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/railgunam.md3", { "models/powerups/ammo/railgunam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_railgun", /* icon */ "icons/icona_railgun",
/* pickup */ "Slugs", /* pickup */ "Slugs",
10, 10,
@ -469,7 +469,7 @@ gitem_t bg_itemlist[] =
"ammo_bfg", "ammo_bfg",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/bfgam.md3", { "models/powerups/ammo/bfgam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_bfg", /* icon */ "icons/icona_bfg",
/* pickup */ "Bfg Ammo", /* pickup */ "Bfg Ammo",
15, 15,
@ -488,7 +488,7 @@ gitem_t bg_itemlist[] =
"holdable_teleporter", "holdable_teleporter",
"sound/items/holdable.wav", "sound/items/holdable.wav",
{ "models/powerups/holdable/teleporter.md3", { "models/powerups/holdable/teleporter.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/teleporter", /* icon */ "icons/teleporter",
/* pickup */ "Personal Teleporter", /* pickup */ "Personal Teleporter",
60, 60,
@ -505,7 +505,7 @@ gitem_t bg_itemlist[] =
{ {
"models/powerups/holdable/medkit.md3", "models/powerups/holdable/medkit.md3",
"models/powerups/holdable/medkit_sphere.md3", "models/powerups/holdable/medkit_sphere.md3",
0, 0}, NULL, NULL},
/* icon */ "icons/medkit", /* icon */ "icons/medkit",
/* pickup */ "Medkit", /* pickup */ "Medkit",
60, 60,
@ -525,7 +525,7 @@ gitem_t bg_itemlist[] =
"sound/items/quaddamage.wav", "sound/items/quaddamage.wav",
{ "models/powerups/instant/quad.md3", { "models/powerups/instant/quad.md3",
"models/powerups/instant/quad_ring.md3", "models/powerups/instant/quad_ring.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/quad", /* icon */ "icons/quad",
/* pickup */ "Quad Damage", /* pickup */ "Quad Damage",
30, 30,
@ -542,7 +542,7 @@ gitem_t bg_itemlist[] =
"sound/items/protect.wav", "sound/items/protect.wav",
{ "models/powerups/instant/enviro.md3", { "models/powerups/instant/enviro.md3",
"models/powerups/instant/enviro_ring.md3", "models/powerups/instant/enviro_ring.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/envirosuit", /* icon */ "icons/envirosuit",
/* pickup */ "Battle Suit", /* pickup */ "Battle Suit",
30, 30,
@ -559,7 +559,7 @@ gitem_t bg_itemlist[] =
"sound/items/haste.wav", "sound/items/haste.wav",
{ "models/powerups/instant/haste.md3", { "models/powerups/instant/haste.md3",
"models/powerups/instant/haste_ring.md3", "models/powerups/instant/haste_ring.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/haste", /* icon */ "icons/haste",
/* pickup */ "Speed", /* pickup */ "Speed",
30, 30,
@ -576,7 +576,7 @@ gitem_t bg_itemlist[] =
"sound/items/invisibility.wav", "sound/items/invisibility.wav",
{ "models/powerups/instant/invis.md3", { "models/powerups/instant/invis.md3",
"models/powerups/instant/invis_ring.md3", "models/powerups/instant/invis_ring.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/invis", /* icon */ "icons/invis",
/* pickup */ "Invisibility", /* pickup */ "Invisibility",
30, 30,
@ -593,7 +593,7 @@ gitem_t bg_itemlist[] =
"sound/items/regeneration.wav", "sound/items/regeneration.wav",
{ "models/powerups/instant/regen.md3", { "models/powerups/instant/regen.md3",
"models/powerups/instant/regen_ring.md3", "models/powerups/instant/regen_ring.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/regen", /* icon */ "icons/regen",
/* pickup */ "Regeneration", /* pickup */ "Regeneration",
30, 30,
@ -610,7 +610,7 @@ gitem_t bg_itemlist[] =
"sound/items/flight.wav", "sound/items/flight.wav",
{ "models/powerups/instant/flight.md3", { "models/powerups/instant/flight.md3",
"models/powerups/instant/flight_ring.md3", "models/powerups/instant/flight_ring.md3",
0, 0 }, NULL, NULL },
/* icon */ "icons/flight", /* icon */ "icons/flight",
/* pickup */ "Flight", /* pickup */ "Flight",
60, 60,
@ -627,7 +627,7 @@ Only in CTF games
"team_CTF_redflag", "team_CTF_redflag",
NULL, NULL,
{ "models/flags/r_flag.md3", { "models/flags/r_flag.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/iconf_red1", /* icon */ "icons/iconf_red1",
/* pickup */ "Red Flag", /* pickup */ "Red Flag",
0, 0,
@ -644,7 +644,7 @@ Only in CTF games
"team_CTF_blueflag", "team_CTF_blueflag",
NULL, NULL,
{ "models/flags/b_flag.md3", { "models/flags/b_flag.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/iconf_blu1", /* icon */ "icons/iconf_blu1",
/* pickup */ "Blue Flag", /* pickup */ "Blue Flag",
0, 0,
@ -661,7 +661,7 @@ Only in CTF games
"holdable_kamikaze", "holdable_kamikaze",
"sound/items/holdable.wav", "sound/items/holdable.wav",
{ "models/powerups/kamikazi.md3", { "models/powerups/kamikazi.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/kamikaze", /* icon */ "icons/kamikaze",
/* pickup */ "Kamikaze", /* pickup */ "Kamikaze",
60, 60,
@ -677,7 +677,7 @@ Only in CTF games
"holdable_portal", "holdable_portal",
"sound/items/holdable.wav", "sound/items/holdable.wav",
{ "models/powerups/holdable/porter.md3", { "models/powerups/holdable/porter.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/portal", /* icon */ "icons/portal",
/* pickup */ "Portal", /* pickup */ "Portal",
60, 60,
@ -693,7 +693,7 @@ Only in CTF games
"holdable_invulnerability", "holdable_invulnerability",
"sound/items/holdable.wav", "sound/items/holdable.wav",
{ "models/powerups/holdable/invulnerability.md3", { "models/powerups/holdable/invulnerability.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/invulnerability", /* icon */ "icons/invulnerability",
/* pickup */ "Invulnerability", /* pickup */ "Invulnerability",
60, 60,
@ -709,7 +709,7 @@ Only in CTF games
"ammo_nails", "ammo_nails",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/nailgunam.md3", { "models/powerups/ammo/nailgunam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_nailgun", /* icon */ "icons/icona_nailgun",
/* pickup */ "Nails", /* pickup */ "Nails",
20, 20,
@ -725,7 +725,7 @@ Only in CTF games
"ammo_mines", "ammo_mines",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/proxmineam.md3", { "models/powerups/ammo/proxmineam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_proxlauncher", /* icon */ "icons/icona_proxlauncher",
/* pickup */ "Proximity Mines", /* pickup */ "Proximity Mines",
10, 10,
@ -741,7 +741,7 @@ Only in CTF games
"ammo_belt", "ammo_belt",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/ammo/chaingunam.md3", { "models/powerups/ammo/chaingunam.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/icona_chaingun", /* icon */ "icons/icona_chaingun",
/* pickup */ "Chaingun Belt", /* pickup */ "Chaingun Belt",
100, 100,
@ -760,7 +760,7 @@ Only in CTF games
"item_scout", "item_scout",
"sound/items/scout.wav", "sound/items/scout.wav",
{ "models/powerups/scout.md3", { "models/powerups/scout.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/scout", /* icon */ "icons/scout",
/* pickup */ "Scout", /* pickup */ "Scout",
30, 30,
@ -776,7 +776,7 @@ Only in CTF games
"item_guard", "item_guard",
"sound/items/guard.wav", "sound/items/guard.wav",
{ "models/powerups/guard.md3", { "models/powerups/guard.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/guard", /* icon */ "icons/guard",
/* pickup */ "Guard", /* pickup */ "Guard",
30, 30,
@ -792,7 +792,7 @@ Only in CTF games
"item_doubler", "item_doubler",
"sound/items/doubler.wav", "sound/items/doubler.wav",
{ "models/powerups/doubler.md3", { "models/powerups/doubler.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/doubler", /* icon */ "icons/doubler",
/* pickup */ "Doubler", /* pickup */ "Doubler",
30, 30,
@ -808,7 +808,7 @@ Only in CTF games
"item_ammoregen", "item_ammoregen",
"sound/items/ammoregen.wav", "sound/items/ammoregen.wav",
{ "models/powerups/ammo.md3", { "models/powerups/ammo.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/ammo_regen", /* icon */ "icons/ammo_regen",
/* pickup */ "Ammo Regen", /* pickup */ "Ammo Regen",
30, 30,
@ -825,7 +825,7 @@ Only in One Flag CTF games
"team_CTF_neutralflag", "team_CTF_neutralflag",
NULL, NULL,
{ "models/flags/n_flag.md3", { "models/flags/n_flag.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/iconf_neutral1", /* icon */ "icons/iconf_neutral1",
/* pickup */ "Neutral Flag", /* pickup */ "Neutral Flag",
0, 0,
@ -839,7 +839,7 @@ Only in One Flag CTF games
"item_redcube", "item_redcube",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/orb/r_orb.md3", { "models/powerups/orb/r_orb.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/iconh_rorb", /* icon */ "icons/iconh_rorb",
/* pickup */ "Red Cube", /* pickup */ "Red Cube",
0, 0,
@ -853,7 +853,7 @@ Only in One Flag CTF games
"item_bluecube", "item_bluecube",
"sound/misc/am_pkup.wav", "sound/misc/am_pkup.wav",
{ "models/powerups/orb/b_orb.md3", { "models/powerups/orb/b_orb.md3",
0, 0, 0 }, NULL, NULL, NULL },
/* icon */ "icons/iconh_borb", /* icon */ "icons/iconh_borb",
/* pickup */ "Blue Cube", /* pickup */ "Blue Cube",
0, 0,
@ -868,7 +868,7 @@ Only in One Flag CTF games
"weapon_nailgun", "weapon_nailgun",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons/nailgun/nailgun.md3", { "models/weapons/nailgun/nailgun.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_nailgun", /* icon */ "icons/iconw_nailgun",
/* pickup */ "Nailgun", /* pickup */ "Nailgun",
10, 10,
@ -884,7 +884,7 @@ Only in One Flag CTF games
"weapon_prox_launcher", "weapon_prox_launcher",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons/proxmine/proxmine.md3", { "models/weapons/proxmine/proxmine.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_proxlauncher", /* icon */ "icons/iconw_proxlauncher",
/* pickup */ "Prox Launcher", /* pickup */ "Prox Launcher",
5, 5,
@ -905,7 +905,7 @@ Only in One Flag CTF games
"weapon_chaingun", "weapon_chaingun",
"sound/misc/w_pkup.wav", "sound/misc/w_pkup.wav",
{ "models/weapons/vulcan/vulcan.md3", { "models/weapons/vulcan/vulcan.md3",
0, 0, 0}, NULL, NULL, NULL},
/* icon */ "icons/iconw_chaingun", /* icon */ "icons/iconw_chaingun",
/* pickup */ "Chaingun", /* pickup */ "Chaingun",
80, 80,

View file

@ -1004,8 +1004,8 @@ void ClientBegin( int clientNum ) {
trap_UnlinkEntity( ent ); trap_UnlinkEntity( ent );
} }
G_InitGentity( ent ); G_InitGentity( ent );
ent->touch = 0; ent->touch = NULL;
ent->pain = 0; ent->pain = NULL;
ent->client = client; ent->client = client;
client->pers.connected = CON_CONNECTED; client->pers.connected = CON_CONNECTED;

View file

@ -542,7 +542,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) {
// events such as ctf flags // events such as ctf flags
if ( respawn <= 0 ) { if ( respawn <= 0 ) {
ent->nextthink = 0; ent->nextthink = 0;
ent->think = 0; ent->think = NULL;
} else { } else {
ent->nextthink = level.time + respawn * 1000; ent->nextthink = level.time + respawn * 1000;
ent->think = RespawnItem; ent->think = RespawnItem;

View file

@ -288,7 +288,7 @@ void Use_Shooter( gentity_t *ent, gentity_t *other, gentity_t *activator ) {
static void InitShooter_Finish( gentity_t *ent ) { static void InitShooter_Finish( gentity_t *ent ) {
ent->enemy = G_PickTarget( ent->target ); ent->enemy = G_PickTarget( ent->target );
ent->think = 0; ent->think = NULL;
ent->nextthink = 0; ent->nextthink = 0;
} }

View file

@ -266,7 +266,7 @@ spawn_t spawns[] = {
#endif #endif
{"item_botroam", SP_item_botroam}, {"item_botroam", SP_item_botroam},
{0, 0} {NULL, NULL}
}; };
/* /*

View file

@ -67,7 +67,7 @@ void multi_trigger( gentity_t *ent, gentity_t *activator ) {
} else { } else {
// we can't just remove (self) here, because this is a touch function // we can't just remove (self) here, because this is a touch function
// called while looping through area links... // called while looping through area links...
ent->touch = 0; ent->touch = NULL;
ent->nextthink = level.time + FRAMETIME; ent->nextthink = level.time + FRAMETIME;
ent->think = G_FreeEntity; ent->think = G_FreeEntity;
} }

View file

@ -54,7 +54,7 @@ void AddRemap(const char *oldShader, const char *newShader, float timeOffset) {
} }
} }
const char *BuildShaderStateConfig() { const char *BuildShaderStateConfig(void) {
static char buff[MAX_STRING_CHARS*4]; static char buff[MAX_STRING_CHARS*4];
char out[(MAX_QPATH * 2) + 5]; char out[(MAX_QPATH * 2) + 5];
int i; int i;

View file

@ -241,18 +241,18 @@ static const char *skillNames[] = {
"Hurt Me Plenty", "Hurt Me Plenty",
"Hardcore", "Hardcore",
"Nightmare!", "Nightmare!",
0 NULL
}; };
static const char *teamNames1[] = { static const char *teamNames1[] = {
"Free", "Free",
0 NULL
}; };
static const char *teamNames2[] = { static const char *teamNames2[] = {
"Red", "Red",
"Blue", "Blue",
0 NULL
}; };
static void UI_AddBotsMenu_Init( void ) { static void UI_AddBotsMenu_Init( void ) {

View file

@ -50,7 +50,7 @@ static const char *rate_items[] = {
"56K", "56K",
"ISDN", "ISDN",
"LAN/Cable/xDSL", "LAN/Cable/xDSL",
0 NULL
}; };
typedef struct { typedef struct {

View file

@ -95,7 +95,7 @@ static const char *handicap_items[] = {
"15", "15",
"10", "10",
"5", "5",
0 NULL
}; };

View file

@ -86,7 +86,7 @@ static const char *teamoverlay_names[] =
"upper right", "upper right",
"lower right", "lower right",
"lower left", "lower left",
0 NULL
}; };
static void Preferences_SetMenuItems( void ) { static void Preferences_SetMenuItems( void ) {

View file

@ -1554,7 +1554,7 @@ Menu_ItemAtCursor
void *Menu_ItemAtCursor( menuframework_s *m ) void *Menu_ItemAtCursor( menuframework_s *m )
{ {
if ( m->cursor < 0 || m->cursor >= m->nitems ) if ( m->cursor < 0 || m->cursor >= m->nitems )
return 0; return NULL;
return m->items[m->cursor]; return m->items[m->cursor];
} }

View file

@ -101,7 +101,7 @@ static const char *master_items[] = {
"Local", "Local",
"Internet", "Internet",
"Favorites", "Favorites",
0 NULL
}; };
static const char *servertype_items[] = { static const char *servertype_items[] = {
@ -110,7 +110,7 @@ static const char *servertype_items[] = {
"Team Deathmatch", "Team Deathmatch",
"Tournament", "Tournament",
"Capture the Flag", "Capture the Flag",
0 NULL
}; };
static const char *sortkey_items[] = { static const char *sortkey_items[] = {
@ -119,7 +119,7 @@ static const char *sortkey_items[] = {
"Open Player Spots", "Open Player Spots",
"Game Type", "Game Type",
"Ping Time", "Ping Time",
0 NULL
}; };
static char* gamenames[] = { static char* gamenames[] = {
@ -136,7 +136,7 @@ static char* gamenames[] = {
"Urban Terror", // Urban Terror "Urban Terror", // Urban Terror
"OSP", // Orange Smoothie Productions "OSP", // Orange Smoothie Productions
"???", // unknown "???", // unknown
0 NULL
}; };
static char* netnames[] = { static char* netnames[] = {

View file

@ -48,7 +48,7 @@ SOUND OPTIONS MENU
static const char *quality_items[] = { static const char *quality_items[] = {
"Low", "High", 0 "Low", "High", NULL
}; };
typedef struct { typedef struct {

View file

@ -98,7 +98,7 @@ static const char *gametype_items[] = {
"Team Deathmatch", "Team Deathmatch",
"Tournament", "Tournament",
"Capture the Flag", "Capture the Flag",
0 NULL
}; };
static int gametype_remap[] = {GT_FFA, GT_TEAM, GT_TOURNAMENT, GT_CTF}; static int gametype_remap[] = {GT_FFA, GT_TEAM, GT_TOURNAMENT, GT_CTF};
@ -665,20 +665,20 @@ static const char *dedicated_list[] = {
"No", "No",
"LAN", "LAN",
"Internet", "Internet",
0 NULL
}; };
static const char *playerType_list[] = { static const char *playerType_list[] = {
"Open", "Open",
"Bot", "Bot",
"----", "----",
0 NULL
}; };
static const char *playerTeam_list[] = { static const char *playerTeam_list[] = {
"Blue", "Blue",
"Red", "Red",
0 NULL
}; };
static const char *botSkill_list[] = { static const char *botSkill_list[] = {
@ -687,7 +687,7 @@ static const char *botSkill_list[] = {
"Hurt Me Plenty", "Hurt Me Plenty",
"Hardcore", "Hardcore",
"Nightmare!", "Nightmare!",
0 NULL
}; };

View file

@ -242,7 +242,7 @@ static const char *s_drivers[] =
{ {
OPENGL_DRIVER_NAME, OPENGL_DRIVER_NAME,
_3DFX_DRIVER_NAME, _3DFX_DRIVER_NAME,
0 NULL
}; };
#define ID_BACK2 101 #define ID_BACK2 101
@ -723,7 +723,7 @@ void GraphicsOptions_MenuInit( void )
{ {
"Default", "Default",
"Voodoo", "Voodoo",
0 NULL
}; };
static const char *tq_names[] = static const char *tq_names[] =
@ -731,7 +731,7 @@ void GraphicsOptions_MenuInit( void )
"Default", "Default",
"16 bit", "16 bit",
"32 bit", "32 bit",
0 NULL
}; };
static const char *s_graphics_options_names[] = static const char *s_graphics_options_names[] =
@ -741,14 +741,14 @@ void GraphicsOptions_MenuInit( void )
"Fast", "Fast",
"Fastest", "Fastest",
"Custom", "Custom",
0 NULL
}; };
static const char *lighting_names[] = static const char *lighting_names[] =
{ {
"Lightmap", "Lightmap",
"Vertex", "Vertex",
0 NULL
}; };
static const char *colordepth_names[] = static const char *colordepth_names[] =
@ -756,7 +756,7 @@ void GraphicsOptions_MenuInit( void )
"Default", "Default",
"16 bit", "16 bit",
"32 bit", "32 bit",
0 NULL
}; };
static const char *resolutions[] = static const char *resolutions[] =
@ -773,26 +773,26 @@ void GraphicsOptions_MenuInit( void )
"1600x1200", "1600x1200",
"2048x1536", "2048x1536",
"856x480 wide screen", "856x480 wide screen",
0 NULL
}; };
static const char *filter_names[] = static const char *filter_names[] =
{ {
"Bilinear", "Bilinear",
"Trilinear", "Trilinear",
0 NULL
}; };
static const char *quality_names[] = static const char *quality_names[] =
{ {
"Low", "Low",
"Medium", "Medium",
"High", "High",
0 NULL
}; };
static const char *enabled_names[] = static const char *enabled_names[] =
{ {
"Off", "Off",
"On", "On",
0 NULL
}; };
int y; int y;

View file

@ -422,7 +422,7 @@ For rcon use when you want to transmit without altering quoting
https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=543 https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=543
============ ============
*/ */
char *Cmd_Cmd() char *Cmd_Cmd(void)
{ {
return cmd_cmd; return cmd_cmd;
} }

View file

@ -321,7 +321,7 @@ FS_Initialized
============== ==============
*/ */
qboolean FS_Initialized() { qboolean FS_Initialized( void ) {
return (fs_searchpaths != NULL); return (fs_searchpaths != NULL);
} }
@ -354,7 +354,7 @@ FS_LoadStack
return load stack return load stack
================= =================
*/ */
int FS_LoadStack() int FS_LoadStack( void )
{ {
return fs_loadStack; return fs_loadStack;
} }

View file

@ -235,7 +235,7 @@ typedef Byte *voidp;
#define Z_DEFLATED 8 #define Z_DEFLATED 8
/* The deflate compression method (the only one supported in this version) */ /* The deflate compression method (the only one supported in this version) */
#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ #define Z_NULL (void *)0 /* for initializing zalloc, zfree, opaque */
#define zlib_version zlibVersion() #define zlib_version zlibVersion()
/* for compatibility with versions < 1.0.2 */ /* for compatibility with versions < 1.0.2 */

View file

@ -527,7 +527,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
void R_InitFreeType() { void R_InitFreeType(void) {
#ifdef BUILD_FREETYPE #ifdef BUILD_FREETYPE
if (FT_Init_FreeType( &ftLibrary )) { if (FT_Init_FreeType( &ftLibrary )) {
ri.Printf(PRINT_ALL, "R_InitFreeType: Unable to initialize FreeType.\n"); ri.Printf(PRINT_ALL, "R_InitFreeType: Unable to initialize FreeType.\n");
@ -537,7 +537,7 @@ void R_InitFreeType() {
} }
void R_DoneFreeType() { void R_DoneFreeType(void) {
#ifdef BUILD_FREETYPE #ifdef BUILD_FREETYPE
if (ftLibrary) { if (ftLibrary) {
FT_Done_FreeType( ftLibrary ); FT_Done_FreeType( ftLibrary );

View file

@ -1374,7 +1374,7 @@ static void LoadJPG( const char *filename, unsigned char **pic, int *width, int
/* This struct contains the JPEG decompression parameters and pointers to /* This struct contains the JPEG decompression parameters and pointers to
* working space (which is allocated as needed by the JPEG library). * working space (which is allocated as needed by the JPEG library).
*/ */
struct jpeg_decompress_struct cinfo = {0}; struct jpeg_decompress_struct cinfo = {NULL};
/* We use our private extension JPEG error handler. /* We use our private extension JPEG error handler.
* Note that this struct must live as long as the main JPEG parameter * Note that this struct must live as long as the main JPEG parameter
* struct, to avoid dangling-pointer problems. * struct, to avoid dangling-pointer problems.

View file

@ -287,10 +287,10 @@ R_AddMD3Surfaces
*/ */
void R_AddMD3Surfaces( trRefEntity_t *ent ) { void R_AddMD3Surfaces( trRefEntity_t *ent ) {
int i; int i;
md3Header_t *header = 0; md3Header_t *header = NULL;
md3Surface_t *surface = 0; md3Surface_t *surface = NULL;
md3Shader_t *md3Shader = 0; md3Shader_t *md3Shader = NULL;
shader_t *shader = 0; shader_t *shader = NULL;
int cull; int cull;
int lod; int lod;
int fogNum; int fogNum;

View file

@ -180,7 +180,7 @@ void UI_LoadBestScores(const char *map, int game) {
UI_ClearScores UI_ClearScores
=============== ===============
*/ */
void UI_ClearScores() { void UI_ClearScores(void) {
char gameList[4096]; char gameList[4096];
char *gameFile; char *gameFile;
int i, len, count, size; int i, len, count, size;

View file

@ -310,7 +310,7 @@ char *UI_GetBotInfoByName( const char *name ) {
return NULL; return NULL;
} }
int UI_GetNumBots() { int UI_GetNumBots( void ) {
return ui_numBots; return ui_numBots;
} }

View file

@ -981,7 +981,7 @@ void UI_LoadMenus(const char *menuFile, qboolean reset) {
trap_PC_FreeSource( handle ); trap_PC_FreeSource( handle );
} }
void UI_Load() { void UI_Load(void) {
char lastName[1024]; char lastName[1024];
menuDef_t *menu = Menu_GetFocused(); menuDef_t *menu = Menu_GetFocused();
char *menuSet = UI_Cvar_VariableString("ui_menuFiles"); char *menuSet = UI_Cvar_VariableString("ui_menuFiles");
@ -1414,7 +1414,7 @@ static void UI_DrawTierGameType(rectDef_t *rect, float scale, vec4_t color, int
#ifndef MISSIONPACK // bk001206 #ifndef MISSIONPACK // bk001206
static const char *UI_OpponentLeaderName() { static const char *UI_OpponentLeaderName(void) {
int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
return uiInfo.teamList[i].teamMembers[0]; return uiInfo.teamList[i].teamMembers[0];
} }
@ -1456,14 +1456,14 @@ static const int UI_AIIndexFromName(const char *name) {
#ifndef MISSIONPACK // bk001206 #ifndef MISSIONPACK // bk001206
static const char *UI_OpponentLeaderHead() { static const char *UI_OpponentLeaderHead(void) {
const char *leader = UI_OpponentLeaderName(); const char *leader = UI_OpponentLeaderName();
return UI_AIFromName(leader); return UI_AIFromName(leader);
} }
#endif #endif
#ifndef MISSIONPACK // bk001206 #ifndef MISSIONPACK // bk001206
static const char *UI_OpponentLeaderModel() { static const char *UI_OpponentLeaderModel(void) {
int i; int i;
const char *head = UI_OpponentLeaderHead(); const char *head = UI_OpponentLeaderHead();
for (i = 0; i < uiInfo.characterCount; i++) { for (i = 0; i < uiInfo.characterCount; i++) {
@ -2769,7 +2769,7 @@ void UI_ServersSort(int column, qboolean force) {
} }
/* /*
static void UI_StartSinglePlayer() { static void UI_StartSinglePlayer(void) {
int i,j, k, skill; int i,j, k, skill;
char buff[1024]; char buff[1024];
i = trap_Cvar_VariableValue( "ui_currentTier" ); i = trap_Cvar_VariableValue( "ui_currentTier" );
@ -2955,7 +2955,7 @@ static void UI_StartSkirmish(qboolean next) {
UI_SelectedMap(index, &actual); UI_SelectedMap(index, &actual);
if (UI_SetNextMap(actual, index)) { if (UI_SetNextMap(actual, index)) {
} else { } else {
UI_GameType_HandleKey(0, 0, K_MOUSE1, qfalse); UI_GameType_HandleKey(0, NULL, K_MOUSE1, qfalse);
UI_MapCountByGameType(qtrue); UI_MapCountByGameType(qtrue);
Menu_SetFeederSelection(NULL, FEEDER_MAPS, 0, "skirmish"); Menu_SetFeederSelection(NULL, FEEDER_MAPS, 0, "skirmish");
} }
@ -3220,8 +3220,8 @@ static void UI_RunMenuScript(char **args) {
ui_mapIndex.integer = UI_GetIndexFromSelection(ui_currentMap.integer); ui_mapIndex.integer = UI_GetIndexFromSelection(ui_currentMap.integer);
trap_Cvar_Set("ui_mapIndex", va("%d", ui_mapIndex.integer)); trap_Cvar_Set("ui_mapIndex", va("%d", ui_mapIndex.integer));
Menu_SetFeederSelection(NULL, FEEDER_MAPS, ui_mapIndex.integer, "skirmish"); Menu_SetFeederSelection(NULL, FEEDER_MAPS, ui_mapIndex.integer, "skirmish");
UI_GameType_HandleKey(0, 0, K_MOUSE1, qfalse); UI_GameType_HandleKey(0, NULL, K_MOUSE1, qfalse);
UI_GameType_HandleKey(0, 0, K_MOUSE2, qfalse); UI_GameType_HandleKey(0, NULL, K_MOUSE2, qfalse);
} else if (Q_stricmp(name, "resetDefaults") == 0) { } else if (Q_stricmp(name, "resetDefaults") == 0) {
trap_Cmd_ExecuteText( EXEC_APPEND, "exec default.cfg\n"); trap_Cmd_ExecuteText( EXEC_APPEND, "exec default.cfg\n");
trap_Cmd_ExecuteText( EXEC_APPEND, "cvar_restart\n"); trap_Cmd_ExecuteText( EXEC_APPEND, "cvar_restart\n");
@ -3576,12 +3576,12 @@ qboolean UI_hasSkinForBase(const char *base, const char *team) {
Com_sprintf( test, sizeof( test ), "models/players/%s/%s/lower_default.skin", base, team ); Com_sprintf( test, sizeof( test ), "models/players/%s/%s/lower_default.skin", base, team );
if (trap_FS_FOpenFile(test, 0, FS_READ)) { if (trap_FS_FOpenFile(test, NULL, FS_READ)) {
return qtrue; return qtrue;
} }
Com_sprintf( test, sizeof( test ), "models/players/characters/%s/%s/lower_default.skin", base, team ); Com_sprintf( test, sizeof( test ), "models/players/characters/%s/%s/lower_default.skin", base, team );
if (trap_FS_FOpenFile(test, 0, FS_READ)) { if (trap_FS_FOpenFile(test, NULL, FS_READ)) {
return qtrue; return qtrue;
} }
return qfalse; return qfalse;
@ -3592,7 +3592,7 @@ qboolean UI_hasSkinForBase(const char *base, const char *team) {
UI_MapCountByTeam UI_MapCountByTeam
================== ==================
*/ */
static int UI_HeadCountByTeam() { static int UI_HeadCountByTeam(void) {
static int init = 0; static int init = 0;
int i, j, k, c, tIndex; int i, j, k, c, tIndex;

View file

@ -907,7 +907,7 @@ UI_FileExists
static qboolean UI_FileExists(const char *filename) { static qboolean UI_FileExists(const char *filename) {
int len; int len;
len = trap_FS_FOpenFile( filename, 0, FS_READ ); len = trap_FS_FOpenFile( filename, NULL, FS_READ );
if (len>0) { if (len>0) {
return qtrue; return qtrue;
} }

View file

@ -118,7 +118,7 @@ void UI_InitMemory( void ) {
outOfMemory = qfalse; outOfMemory = qfalse;
} }
qboolean UI_OutOfMemory() { qboolean UI_OutOfMemory( void ) {
return outOfMemory; return outOfMemory;
} }
@ -210,7 +210,7 @@ const char *String_Alloc(const char *p) {
return NULL; return NULL;
} }
void String_Report() { void String_Report(void) {
float f; float f;
Com_Printf("Memory/String Pool Info\n"); Com_Printf("Memory/String Pool Info\n");
Com_Printf("----------------\n"); Com_Printf("----------------\n");
@ -229,10 +229,10 @@ void String_Report() {
String_Init String_Init
================= =================
*/ */
void String_Init() { void String_Init(void) {
int i; int i;
for (i = 0; i < HASH_TABLE_SIZE; i++) { for (i = 0; i < HASH_TABLE_SIZE; i++) {
strHandle[i] = 0; strHandle[i] = NULL;
} }
strHandleCount = 0; strHandleCount = 0;
strPoolIndex = 0; strPoolIndex = 0;
@ -1032,7 +1032,7 @@ void Menus_CloseByName(const char *p) {
} }
} }
void Menus_CloseAll() { void Menus_CloseAll(void) {
int i; int i;
for (i = 0; i < menuCount; i++) { for (i = 0; i < menuCount; i++) {
Menu_RunCloseScript(&Menus[i]); Menu_RunCloseScript(&Menus[i]);
@ -3449,7 +3449,7 @@ void Item_Bind_Paint(itemDef_t *item) {
} }
} }
qboolean Display_KeyBindPending() { qboolean Display_KeyBindPending(void) {
return g_waitingForKey; return g_waitingForKey;
} }
@ -4075,7 +4075,7 @@ itemDef_t *Menu_GetFocusedItem(menuDef_t *menu) {
return NULL; return NULL;
} }
menuDef_t *Menu_GetFocused() { menuDef_t *Menu_GetFocused(void) {
int i; int i;
for (i = 0; i < menuCount; i++) { for (i = 0; i < menuCount; i++) {
if (Menus[i].window.flags & WINDOW_HASFOCUS && Menus[i].window.flags & WINDOW_VISIBLE) { if (Menus[i].window.flags & WINDOW_HASFOCUS && Menus[i].window.flags & WINDOW_VISIBLE) {
@ -4125,7 +4125,7 @@ void Menu_SetFeederSelection(menuDef_t *menu, int feeder, int index, const char
} }
} }
qboolean Menus_AnyFullScreenVisible() { qboolean Menus_AnyFullScreenVisible(void) {
int i; int i;
for (i = 0; i < menuCount; i++) { for (i = 0; i < menuCount; i++) {
if (Menus[i].window.flags & WINDOW_VISIBLE && Menus[i].fullScreen) { if (Menus[i].window.flags & WINDOW_VISIBLE && Menus[i].fullScreen) {
@ -5611,11 +5611,11 @@ void Menu_New(int handle) {
} }
} }
int Menu_Count() { int Menu_Count(void) {
return menuCount; return menuCount;
} }
void Menu_PaintAll() { void Menu_PaintAll(void) {
int i; int i;
if (captureFunc) { if (captureFunc) {
captureFunc(captureData); captureFunc(captureData);
@ -5631,11 +5631,11 @@ void Menu_PaintAll() {
} }
} }
void Menu_Reset() { void Menu_Reset(void) {
menuCount = 0; menuCount = 0;
} }
displayContextDef_t *Display_GetContext() { displayContextDef_t *Display_GetContext(void) {
return DC; return DC;
} }
@ -5740,7 +5740,7 @@ static void Menu_CacheContents(menuDef_t *menu) {
} }
void Display_CacheAll() { void Display_CacheAll(void) {
int i; int i;
for (i = 0; i < menuCount; i++) { for (i = 0; i < menuCount; i++) {
Menu_CacheContents(&Menus[i]); Menu_CacheContents(&Menus[i]);

View file

@ -3407,17 +3407,17 @@ qboolean QGL_Init( const char *dllname )
qglXCopyContext = GPA("glXCopyContext"); qglXCopyContext = GPA("glXCopyContext");
qglXSwapBuffers = GPA("glXSwapBuffers"); qglXSwapBuffers = GPA("glXSwapBuffers");
qglLockArraysEXT = 0; qglLockArraysEXT = NULL;
qglUnlockArraysEXT = 0; qglUnlockArraysEXT = NULL;
qglPointParameterfEXT = 0; qglPointParameterfEXT = NULL;
qglPointParameterfvEXT = 0; qglPointParameterfvEXT = NULL;
qglColorTableEXT = 0; qglColorTableEXT = NULL;
qgl3DfxSetPaletteEXT = 0; qgl3DfxSetPaletteEXT = NULL;
qglSelectTextureSGIS = 0; qglSelectTextureSGIS = NULL;
qglMTexCoord2fSGIS = 0; qglMTexCoord2fSGIS = NULL;
qglActiveTextureARB = 0; qglActiveTextureARB = NULL;
qglClientActiveTextureARB = 0; qglClientActiveTextureARB = NULL;
qglMultiTexCoord2fARB = 0; qglMultiTexCoord2fARB = NULL;
return qtrue; return qtrue;
} }

View file

@ -1316,13 +1316,13 @@ void IN_StartupJoystick( void )
if (!SDL_WasInit(SDL_INIT_JOYSTICK)) if (!SDL_WasInit(SDL_INIT_JOYSTICK))
{ {
Com_Printf( PRINT_ALL, "Calling SDL_Init(SDL_INIT_JOYSTICK)...\n"); Com_Printf("Calling SDL_Init(SDL_INIT_JOYSTICK)...\n");
if (SDL_Init(SDL_INIT_JOYSTICK) == -1) if (SDL_Init(SDL_INIT_JOYSTICK) == -1)
{ {
Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError()); Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) failed: %s\n", SDL_GetError());
return; return;
} }
Com_Printf( PRINT_ALL, "SDL_Init(SDL_INIT_JOYSTICK) passed.\n"); Com_Printf("SDL_Init(SDL_INIT_JOYSTICK) passed.\n");
} }
total = SDL_NumJoysticks(); total = SDL_NumJoysticks();

View file

@ -169,13 +169,13 @@ qboolean SNDDMA_Init(void)
if (!SDL_WasInit(SDL_INIT_AUDIO)) if (!SDL_WasInit(SDL_INIT_AUDIO))
{ {
Com_Printf( PRINT_ALL, "Calling SDL_Init(SDL_INIT_AUDIO)...\n"); Com_Printf("Calling SDL_Init(SDL_INIT_AUDIO)...\n");
if (SDL_Init(SDL_INIT_AUDIO) == -1) if (SDL_Init(SDL_INIT_AUDIO) == -1)
{ {
Com_Printf( PRINT_ALL, "SDL_Init(SDL_INIT_AUDIO) failed: %s\n", SDL_GetError()); Com_Printf("SDL_Init(SDL_INIT_AUDIO) failed: %s\n", SDL_GetError());
return qfalse; return qfalse;
} }
Com_Printf( PRINT_ALL, "SDL_Init(SDL_INIT_AUDIO) passed.\n"); Com_Printf("SDL_Init(SDL_INIT_AUDIO) passed.\n");
} }
if (SDL_AudioDriverName(drivername, sizeof (drivername)) == NULL) if (SDL_AudioDriverName(drivername, sizeof (drivername)) == NULL)

View file

@ -253,7 +253,7 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter
nfiles = 0; nfiles = 0;
Sys_ListFilteredFiles( directory, "", filter, list, &nfiles ); Sys_ListFilteredFiles( directory, "", filter, list, &nfiles );
list[ nfiles ] = 0; list[ nfiles ] = NULL;
*numfiles = nfiles; *numfiles = nfiles;
if (!nfiles) if (!nfiles)
@ -309,7 +309,7 @@ char **Sys_ListFiles( const char *directory, const char *extension, char *filter
nfiles++; nfiles++;
} }
list[ nfiles ] = 0; list[ nfiles ] = NULL;
closedir(fdir); closedir(fdir);
@ -428,7 +428,7 @@ char *Sys_GetCurrentUser( void )
#if defined(__linux__) #if defined(__linux__)
// TTimo // TTimo
// sysconf() in libc, POSIX.1 compliant // sysconf() in libc, POSIX.1 compliant
unsigned int Sys_ProcessorCount() unsigned int Sys_ProcessorCount(void)
{ {
return sysconf(_SC_NPROCESSORS_ONLN); return sysconf(_SC_NPROCESSORS_ONLN);
} }