From d37536edf4660f3c46e4876b6d72e9a200549ffe Mon Sep 17 00:00:00 2001 From: tma Date: Wed, 5 Sep 2007 18:17:46 +0000 Subject: * Merge unified-sdl to trunk * Bump Q3_VERSION to 1.35 git-svn-id: svn://svn.icculus.org/quake3/trunk@1161 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/ui/ui_atoms.c | 4 ++-- code/ui/ui_gameinfo.c | 2 +- code/ui/ui_main.c | 36 ++++++++++++++++-------------------- code/ui/ui_shared.c | 25 +++++++++++-------------- 4 files changed, 30 insertions(+), 37 deletions(-) (limited to 'code/ui') diff --git a/code/ui/ui_atoms.c b/code/ui/ui_atoms.c index 9130e33..1a2780f 100644 --- a/code/ui/ui_atoms.c +++ b/code/ui/ui_atoms.c @@ -76,7 +76,7 @@ void UI_StartDemoLoop( void ) { } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static void NeedCDAction( qboolean result ) { if ( !result ) { trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); @@ -84,7 +84,7 @@ static void NeedCDAction( qboolean result ) { } #endif // MISSIONPACK -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static void NeedCDKeyAction( qboolean result ) { if ( !result ) { trap_Cmd_ExecuteText( EXEC_APPEND, "quit\n" ); diff --git a/code/ui/ui_gameinfo.c b/code/ui/ui_gameinfo.c index ef82ee3..bcb2622 100644 --- a/code/ui/ui_gameinfo.c +++ b/code/ui/ui_gameinfo.c @@ -38,7 +38,7 @@ static char *ui_botInfos[MAX_BOTS]; static int ui_numArenas; static char *ui_arenaInfos[MAX_ARENAS]; -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int ui_numSinglePlayerArenas; static int ui_numSpecialSinglePlayerArenas; #endif diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 343ea1f..dc09385 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -119,7 +119,7 @@ static char* netnames[] = { NULL }; -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static char quake3worldMessage[] = "Visit www.quake3world.com - News, Community, Events, Files"; #endif @@ -203,7 +203,7 @@ intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, UI_DrawConnectScreen( arg0 ); return 0; case UI_HASUNIQUECDKEY: // mod authors need to observe this - return qtrue; // bk010117 - change this to qfalse for mods! + return qtrue; // change this to qfalse for mods! } @@ -312,7 +312,7 @@ int Text_Height(const char *text, float scale, int limit) { float max; glyphInfo_t *glyph; float useScale; - const char *s = text; // bk001206 - unsigned + const char *s = text; fontInfo_t *font = &uiInfo.uiDC.Assets.textFont; if (scale <= ui_smallFont.value) { font = &uiInfo.uiDC.Assets.smallFont; @@ -365,7 +365,7 @@ void Text_Paint(float x, float y, float scale, vec4_t color, const char *text, f } useScale = scale * font->glyphScale; if (text) { - const char *s = text; // bk001206 - unsigned + const char *s = text; trap_R_SetColor( color ); memcpy(&newColor[0], &color[0], sizeof(vec4_t)); len = strlen(text); @@ -434,7 +434,7 @@ void Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const cha } useScale = scale * font->glyphScale; if (text) { - const char *s = text; // bk001206 - unsigned + const char *s = text; trap_R_SetColor( color ); memcpy(&newColor[0], &color[0], sizeof(vec4_t)); len = strlen(text); @@ -442,7 +442,7 @@ void Text_PaintWithCursor(float x, float y, float scale, vec4_t color, const cha len = limit; } count = 0; - glyph2 = &font->glyphs[ (int) cursor]; // bk001206 - possible signed char + glyph2 = &font->glyphs[ (int) cursor]; while (s && *s && count < len) { glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build //int yadj = Assets.textFont.glyphs[text[i]].bottom + Assets.textFont.glyphs[text[i]].top; @@ -524,7 +524,7 @@ static void Text_Paint_Limit(float *maxX, float x, float y, float scale, vec4_t vec4_t newColor; glyphInfo_t *glyph; if (text) { - const char *s = text; // bk001206 - unsigned + const char *s = text; float max = *maxX; float useScale; fontInfo_t *font = &uiInfo.uiDC.Assets.textFont; @@ -1007,7 +1007,7 @@ void UI_Load(void) { } static const char *handicapValues[] = {"None","95","90","85","80","75","70","65","60","55","50","45","40","35","30","25","20","15","10","5",NULL}; -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int numHandicaps = sizeof(handicapValues) / sizeof(const char*); #endif @@ -1412,7 +1412,7 @@ static void UI_DrawTierGameType(rectDef_t *rect, float scale, vec4_t color, int } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const char *UI_OpponentLeaderName(void) { int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName")); return uiInfo.teamList[i].teamMembers[0]; @@ -1429,7 +1429,7 @@ static const char *UI_AIFromName(const char *name) { return "James"; } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const int UI_AIIndex(const char *name) { int j; for (j = 0; j < uiInfo.characterCount; j++) { @@ -1441,7 +1441,7 @@ static const int UI_AIIndex(const char *name) { } #endif -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const int UI_AIIndexFromName(const char *name) { int j; for (j = 0; j < uiInfo.aliasCount; j++) { @@ -1454,14 +1454,14 @@ static const int UI_AIIndexFromName(const char *name) { #endif -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const char *UI_OpponentLeaderHead(void) { const char *leader = UI_OpponentLeaderName(); return UI_AIFromName(leader); } #endif -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static const char *UI_OpponentLeaderModel(void) { int i; const char *head = UI_OpponentLeaderHead(); @@ -4897,9 +4897,8 @@ static void UI_Pause(qboolean b) { } } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int UI_OwnerDraw_Width(int ownerDraw) { - // bk001205 - LCC missing return value return 0; } #endif @@ -5131,7 +5130,7 @@ void _UI_Init( qboolean inGameLoad ) { #if 0 if (uiInfo.inGameLoad) { UI_LoadMenus("ui/ingame.txt", qtrue); - } else { // bk010222: left this: UI_LoadMenus(menuSet, qtrue); + } else { } #else UI_LoadMenus(menuSet, qtrue); @@ -5697,8 +5696,6 @@ vmCvar_t ui_realCaptureLimit; vmCvar_t ui_realWarmUp; vmCvar_t ui_serverStatusTimeOut; - -// bk001129 - made static to avoid aliasing static cvarTable_t cvarTable[] = { { &ui_ffa_fraglimit, "ui_ffa_fraglimit", "20", CVAR_ARCHIVE }, { &ui_ffa_timelimit, "ui_ffa_timelimit", "0", CVAR_ARCHIVE }, @@ -5821,7 +5818,6 @@ static cvarTable_t cvarTable[] = { }; -// bk001129 - made static to avoid aliasing static int cvarTableSize = sizeof(cvarTable) / sizeof(cvarTable[0]); @@ -5885,7 +5881,7 @@ static void UI_StopServerRefresh( void ) ArenaServers_MaxPing ================= */ -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static int ArenaServers_MaxPing( void ) { int maxPing; diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index 1df9779..d2593fd 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -534,7 +534,7 @@ qboolean PC_Script_Parse(int handle, const char **out) { } Q_strcat(script, 1024, " "); } - return qfalse; // bk001105 - LCC missing return value + return qfalse; } // display, window, menu, item code @@ -1342,13 +1342,13 @@ qboolean Item_SetFocus(itemDef_t *item, float x, float y) { itemDef_t *oldFocus; sfxHandle_t *sfx = &DC->Assets.itemFocusSound; qboolean playSound = qfalse; - menuDef_t *parent; // bk001206: = (menuDef_t*)item->parent; + menuDef_t *parent; // sanity check, non-null, not a decoration and does not already have the focus if (item == NULL || item->window.flags & WINDOW_DECORATION || item->window.flags & WINDOW_HASFOCUS || !(item->window.flags & WINDOW_VISIBLE)) { return qfalse; } - // bk001206 - this can be NULL. + // this can be NULL parent = (menuDef_t*)item->parent; // items can be enabled and disabled based on cvars @@ -2374,7 +2374,6 @@ qboolean Item_HandleKey(itemDef_t *item, int key, qboolean down) { captureFunc = 0; captureData = NULL; } else { - // bk001206 - parentheses if ( down && ( key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 ) ) { Item_StartCapture(item, key); } @@ -2629,7 +2628,6 @@ void Menu_HandleKey(menuDef_t *menu, int key, qboolean down) { // see if the mouse is within the window bounds and if so is this a mouse click if (down && !(menu->window.flags & WINDOW_POPUP) && !Rect_ContainsPoint(&menu->window.rect, DC->cursorx, DC->cursory)) { static qboolean inHandleKey = qfalse; - // bk001206 - parentheses if (!inHandleKey && ( key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 ) ) { inHandleKey = qtrue; Menus_HandleOOBClick(menu, key, down); @@ -3188,7 +3186,6 @@ static bind_t g_bindings[] = {"tauntGauntlet", K_F5, -1, -1, -1}, {"scoresUp", K_KP_PGUP, -1, -1, -1}, {"scoresDown", K_KP_PGDN, -1, -1, -1}, - // bk001205 - this one below was: '-1' {"messagemode", -1, -1, -1, -1}, {"messagemode2", -1, -1, -1, -1}, {"messagemode3", -1, -1, -1, -1}, @@ -3198,7 +3195,7 @@ static bind_t g_bindings[] = static const int g_bindCount = sizeof(g_bindings) / sizeof(bind_t); -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static configcvar_t g_configcvars[] = { {"cl_run", 0, 0}, @@ -3842,7 +3839,7 @@ void Item_OwnerDraw_Paint(itemDef_t *item) { } if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) { - memcpy(color, parent->disableColor, sizeof(vec4_t)); // bk001207 - FIXME: Com_Memcpy + Com_Memcpy(color, parent->disableColor, sizeof(vec4_t)); } if (item->text) { @@ -4964,7 +4961,7 @@ qboolean ItemParse_cvarStrList( itemDef_t *item, int handle ) { } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } qboolean ItemParse_cvarFloatList( itemDef_t *item, int handle ) { @@ -5009,7 +5006,7 @@ qboolean ItemParse_cvarFloatList( itemDef_t *item, int handle ) { } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } @@ -5188,7 +5185,7 @@ qboolean Item_Parse(int handle, itemDef_t *item) { return qfalse; } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } @@ -5242,7 +5239,7 @@ qboolean MenuParse_name( itemDef_t *item, int handle ) { qboolean MenuParse_fullscreen( itemDef_t *item, int handle ) { menuDef_t *menu = (menuDef_t*)item; - if (!PC_Int_Parse(handle, (int*) &menu->fullScreen)) { // bk001206 - cast qboolean + if (!PC_Int_Parse(handle, (int*) &menu->fullScreen)) { return qfalse; } return qtrue; @@ -5591,7 +5588,7 @@ qboolean Menu_Parse(int handle, menuDef_t *menu) { return qfalse; } } - return qfalse; // bk001205 - LCC missing return value + return qfalse; } /* @@ -5639,7 +5636,7 @@ displayContextDef_t *Display_GetContext(void) { return DC; } -#ifndef MISSIONPACK // bk001206 +#ifndef MISSIONPACK static float captureX; static float captureY; #endif -- cgit v1.2.3