Fix ui warnings

This commit is contained in:
Tim Angus 2014-09-01 11:05:46 +01:00
parent 4444202a41
commit b55809b925
6 changed files with 16 additions and 16 deletions

View file

@ -659,7 +659,7 @@ Returns the next level the player has not won
*/ */
int UI_GetCurrentGame( void ) { int UI_GetCurrentGame( void ) {
int level; int level;
int rank; int rank = 0;
int skill; int skill;
const char *info; const char *info;

View file

@ -689,12 +689,12 @@ UI_DrawPlayer
*/ */
void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int time ) { void UI_DrawPlayer( float x, float y, float w, float h, playerInfo_t *pi, int time ) {
refdef_t refdef; refdef_t refdef;
refEntity_t legs; refEntity_t legs = {0};
refEntity_t torso; refEntity_t torso = {0};
refEntity_t head; refEntity_t head = {0};
refEntity_t gun; refEntity_t gun = {0};
refEntity_t barrel; refEntity_t barrel = {0};
refEntity_t flash; refEntity_t flash = {0};
vec3_t origin; vec3_t origin;
int renderfx; int renderfx;
vec3_t mins = {-16, -16, -24}; vec3_t mins = {-16, -16, -24};

View file

@ -353,7 +353,6 @@ static void Preferences_MenuInit( void ) {
s_preferences.allowdownload.generic.x = PREFERENCES_X_POS; s_preferences.allowdownload.generic.x = PREFERENCES_X_POS;
s_preferences.allowdownload.generic.y = y; s_preferences.allowdownload.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.back.generic.type = MTYPE_BITMAP; s_preferences.back.generic.type = MTYPE_BITMAP;
s_preferences.back.generic.name = ART_BACK0; s_preferences.back.generic.name = ART_BACK0;
s_preferences.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS; s_preferences.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;

View file

@ -150,7 +150,6 @@ void TeamMain_MenuInit( void ) {
s_teammain.spectate.string = "SPECTATE"; s_teammain.spectate.string = "SPECTATE";
s_teammain.spectate.style = UI_CENTER|UI_SMALLFONT; s_teammain.spectate.style = UI_CENTER|UI_SMALLFONT;
s_teammain.spectate.color = colorRed; s_teammain.spectate.color = colorRed;
y += 20;
trap_GetConfigString(CS_SERVERINFO, info, MAX_INFO_STRING); trap_GetConfigString(CS_SERVERINFO, info, MAX_INFO_STRING);
gametype = atoi( Info_ValueForKey( info,"g_gametype" ) ); gametype = atoi( Info_ValueForKey( info,"g_gametype" ) );

View file

@ -1138,7 +1138,6 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.driverinfo.string = "Driver Info"; s_graphicsoptions.driverinfo.string = "Driver Info";
s_graphicsoptions.driverinfo.style = UI_CENTER|UI_SMALLFONT; s_graphicsoptions.driverinfo.style = UI_CENTER|UI_SMALLFONT;
s_graphicsoptions.driverinfo.color = color_red; s_graphicsoptions.driverinfo.color = color_red;
y += BIGCHAR_HEIGHT+2;
s_graphicsoptions.back.generic.type = MTYPE_BITMAP; s_graphicsoptions.back.generic.type = MTYPE_BITMAP;
s_graphicsoptions.back.generic.name = GRAPHICSOPTIONS_BACK0; s_graphicsoptions.back.generic.name = GRAPHICSOPTIONS_BACK0;

View file

@ -4203,12 +4203,12 @@ void Menu_HandleMouseMove(menuDef_t *menu, float x, float y) {
} }
} }
} }
} else if (menu->items[i]->window.flags & WINDOW_MOUSEOVER) { } else if (menu->items[i] && menu->items[i]->window.flags & WINDOW_MOUSEOVER) {
Item_MouseLeave(menu->items[i]); Item_MouseLeave(menu->items[i]);
Item_SetMouseOver(menu->items[i], qfalse); Item_SetMouseOver(menu->items[i], qfalse);
} }
} }
} }
} }
@ -5518,6 +5518,9 @@ qboolean MenuParse_itemDef( itemDef_t *item, int handle ) {
menuDef_t *menu = (menuDef_t*)item; menuDef_t *menu = (menuDef_t*)item;
if (menu->itemCount < MAX_MENUITEMS) { if (menu->itemCount < MAX_MENUITEMS) {
menu->items[menu->itemCount] = UI_Alloc(sizeof(itemDef_t)); menu->items[menu->itemCount] = UI_Alloc(sizeof(itemDef_t));
if (!menu->items[menu->itemCount]) {
return qfalse;
}
Item_Init(menu->items[menu->itemCount]); Item_Init(menu->items[menu->itemCount]);
if (!Item_Parse(handle, menu->items[menu->itemCount])) { if (!Item_Parse(handle, menu->items[menu->itemCount])) {
return qfalse; return qfalse;