* 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

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

View file

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

View file

@ -981,7 +981,7 @@ void UI_LoadMenus(const char *menuFile, qboolean reset) {
trap_PC_FreeSource( handle );
}
void UI_Load() {
void UI_Load(void) {
char lastName[1024];
menuDef_t *menu = Menu_GetFocused();
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
static const char *UI_OpponentLeaderName() {
static const char *UI_OpponentLeaderName(void) {
int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
return uiInfo.teamList[i].teamMembers[0];
}
@ -1456,14 +1456,14 @@ static const int UI_AIIndexFromName(const char *name) {
#ifndef MISSIONPACK // bk001206
static const char *UI_OpponentLeaderHead() {
static const char *UI_OpponentLeaderHead(void) {
const char *leader = UI_OpponentLeaderName();
return UI_AIFromName(leader);
}
#endif
#ifndef MISSIONPACK // bk001206
static const char *UI_OpponentLeaderModel() {
static const char *UI_OpponentLeaderModel(void) {
int i;
const char *head = UI_OpponentLeaderHead();
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;
char buff[1024];
i = trap_Cvar_VariableValue( "ui_currentTier" );
@ -2955,7 +2955,7 @@ static void UI_StartSkirmish(qboolean next) {
UI_SelectedMap(index, &actual);
if (UI_SetNextMap(actual, index)) {
} else {
UI_GameType_HandleKey(0, 0, K_MOUSE1, qfalse);
UI_GameType_HandleKey(0, NULL, K_MOUSE1, qfalse);
UI_MapCountByGameType(qtrue);
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);
trap_Cvar_Set("ui_mapIndex", va("%d", ui_mapIndex.integer));
Menu_SetFeederSelection(NULL, FEEDER_MAPS, ui_mapIndex.integer, "skirmish");
UI_GameType_HandleKey(0, 0, K_MOUSE1, qfalse);
UI_GameType_HandleKey(0, 0, K_MOUSE2, qfalse);
UI_GameType_HandleKey(0, NULL, K_MOUSE1, qfalse);
UI_GameType_HandleKey(0, NULL, K_MOUSE2, qfalse);
} else if (Q_stricmp(name, "resetDefaults") == 0) {
trap_Cmd_ExecuteText( EXEC_APPEND, "exec default.cfg\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 );
if (trap_FS_FOpenFile(test, 0, FS_READ)) {
if (trap_FS_FOpenFile(test, NULL, FS_READ)) {
return qtrue;
}
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 qfalse;
@ -3592,7 +3592,7 @@ qboolean UI_hasSkinForBase(const char *base, const char *team) {
UI_MapCountByTeam
==================
*/
static int UI_HeadCountByTeam() {
static int UI_HeadCountByTeam(void) {
static int init = 0;
int i, j, k, c, tIndex;

View file

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

View file

@ -118,7 +118,7 @@ void UI_InitMemory( void ) {
outOfMemory = qfalse;
}
qboolean UI_OutOfMemory() {
qboolean UI_OutOfMemory( void ) {
return outOfMemory;
}
@ -210,7 +210,7 @@ const char *String_Alloc(const char *p) {
return NULL;
}
void String_Report() {
void String_Report(void) {
float f;
Com_Printf("Memory/String Pool Info\n");
Com_Printf("----------------\n");
@ -229,10 +229,10 @@ void String_Report() {
String_Init
=================
*/
void String_Init() {
void String_Init(void) {
int i;
for (i = 0; i < HASH_TABLE_SIZE; i++) {
strHandle[i] = 0;
strHandle[i] = NULL;
}
strHandleCount = 0;
strPoolIndex = 0;
@ -1032,7 +1032,7 @@ void Menus_CloseByName(const char *p) {
}
}
void Menus_CloseAll() {
void Menus_CloseAll(void) {
int i;
for (i = 0; i < menuCount; 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;
}
@ -4075,7 +4075,7 @@ itemDef_t *Menu_GetFocusedItem(menuDef_t *menu) {
return NULL;
}
menuDef_t *Menu_GetFocused() {
menuDef_t *Menu_GetFocused(void) {
int i;
for (i = 0; i < menuCount; i++) {
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;
for (i = 0; i < menuCount; i++) {
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;
}
void Menu_PaintAll() {
void Menu_PaintAll(void) {
int i;
if (captureFunc) {
captureFunc(captureData);
@ -5631,11 +5631,11 @@ void Menu_PaintAll() {
}
}
void Menu_Reset() {
void Menu_Reset(void) {
menuCount = 0;
}
displayContextDef_t *Display_GetContext() {
displayContextDef_t *Display_GetContext(void) {
return DC;
}
@ -5740,7 +5740,7 @@ static void Menu_CacheContents(menuDef_t *menu) {
}
void Display_CacheAll() {
void Display_CacheAll(void) {
int i;
for (i = 0; i < menuCount; i++) {
Menu_CacheContents(&Menus[i]);