diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-09-05 18:17:46 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-09-05 18:17:46 +0000 |
commit | d37536edf4660f3c46e4876b6d72e9a200549ffe (patch) | |
tree | 637eb5f3e49f4075ecdef97a31f5e8157cee73a2 /code/q3_ui | |
parent | 4496eacc4ec7406fd694693da5a7f9589933f7fd (diff) | |
download | ioquake3-aero-d37536edf4660f3c46e4876b6d72e9a200549ffe.tar.gz ioquake3-aero-d37536edf4660f3c46e4876b6d72e9a200549ffe.zip |
* 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
Diffstat (limited to 'code/q3_ui')
-rw-r--r-- | code/q3_ui/ui_atoms.c | 9 | ||||
-rw-r--r-- | code/q3_ui/ui_connect.c | 18 | ||||
-rw-r--r-- | code/q3_ui/ui_controls2.c | 5 | ||||
-rw-r--r-- | code/q3_ui/ui_gameinfo.c | 7 | ||||
-rw-r--r-- | code/q3_ui/ui_local.h | 4 | ||||
-rw-r--r-- | code/q3_ui/ui_main.c | 4 | ||||
-rw-r--r-- | code/q3_ui/ui_mods.c | 36 | ||||
-rw-r--r-- | code/q3_ui/ui_qmenu.c | 1 | ||||
-rw-r--r-- | code/q3_ui/ui_team.c | 10 | ||||
-rw-r--r-- | code/q3_ui/ui_video.c | 28 |
10 files changed, 12 insertions, 110 deletions
diff --git a/code/q3_ui/ui_atoms.c b/code/q3_ui/ui_atoms.c index 3ae12e0..e66996d 100644 --- a/code/q3_ui/ui_atoms.c +++ b/code/q3_ui/ui_atoms.c @@ -330,8 +330,6 @@ static int propMapB[26][3] = { #define PROPB_SPACE_WIDTH 12 #define PROPB_HEIGHT 36 -// bk001205 - code below duplicated in cgame/cg_drawtools.c -// bk001205 - FIXME: does this belong in ui_shared.c? /* ================= UI_DrawBannerString @@ -340,7 +338,7 @@ UI_DrawBannerString static void UI_DrawBannerString2( int x, int y, const char* str, vec4_t color ) { const char* s; - unsigned char ch; // bk001204 - unsigned + unsigned char ch; float ax; float ay; float aw; @@ -450,10 +448,10 @@ int UI_ProportionalStringWidth( const char* str ) { static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t color, float sizeScale, qhandle_t charset ) { const char* s; - unsigned char ch; // bk001204 - unsigned + unsigned char ch; float ax; float ay; - float aw = 0; // bk001204 - init + float aw = 0; float ah; float frow; float fcol; @@ -831,7 +829,6 @@ void UI_SetActiveMenu( uiMenuCommand_t menu ) { UI_InGameMenu(); return; - // bk001204 case UIMENU_TEAM: case UIMENU_POSTGAME: default: diff --git a/code/q3_ui/ui_connect.c b/code/q3_ui/ui_connect.c index 990b5fb..0db89a2 100644 --- a/code/q3_ui/ui_connect.c +++ b/code/q3_ui/ui_connect.c @@ -82,15 +82,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { downloadCount = trap_Cvar_VariableValue( "cl_downloadCount" ); downloadTime = trap_Cvar_VariableValue( "cl_downloadTime" ); -#if 0 // bk010104 - fprintf( stderr, "\n\n-----------------------------------------------\n"); - fprintf( stderr, "DB: downloadSize: %16d\n", downloadSize ); - fprintf( stderr, "DB: downloadCount: %16d\n", downloadCount ); - fprintf( stderr, "DB: downloadTime: %16d\n", downloadTime ); - fprintf( stderr, "DB: UI realtime: %16d\n", uis.realtime ); // bk - fprintf( stderr, "DB: UI frametime: %16d\n", uis.frametime ); // bk -#endif - leftWidth = width = UI_ProportionalStringWidth( dlText ) * UI_ProportionalSizeScale( style ); width = UI_ProportionalStringWidth( etaText ) * UI_ProportionalSizeScale( style ); if (width > leftWidth) leftWidth = width; @@ -118,10 +109,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { UI_DrawProportionalString( leftWidth, 192, va("(%s of %s copied)", dlSizeBuf, totalSizeBuf), style, color_white ); } else { - // bk010108 - //float elapsedTime = (float)(uis.realtime - downloadTime); // current - start (msecs) - //elapsedTime = elapsedTime * 0.001f; // in seconds - //if ( elapsedTime <= 0.0f ) elapsedTime == 0.0f; if ( (uis.realtime - downloadTime) / 1000) { xferRate = downloadCount / ((uis.realtime - downloadTime) / 1000); //xferRate = (int)( ((float)downloadCount) / elapsedTime); @@ -129,9 +116,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { xferRate = 0; } - //fprintf( stderr, "DB: elapsedTime: %16.8f\n", elapsedTime ); // bk - //fprintf( stderr, "DB: xferRate: %16d\n", xferRate ); // bk - UI_ReadableSize( xferRateBuf, sizeof xferRateBuf, xferRate ); // Extrapolate estimated completion time @@ -141,7 +125,7 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { // We do it in K (/1024) because we'd overflow around 4MB n = (n - (((downloadCount/1024) * n) / (downloadSize/1024))) * 1000; - UI_PrintTime ( dlTimeBuf, sizeof dlTimeBuf, n ); // bk010104 + UI_PrintTime ( dlTimeBuf, sizeof dlTimeBuf, n ); //(n - (((downloadCount/1024) * n) / (downloadSize/1024))) * 1000); UI_DrawProportionalString( leftWidth, 160, diff --git a/code/q3_ui/ui_controls2.c b/code/q3_ui/ui_controls2.c index ba9528c..907ad00 100644 --- a/code/q3_ui/ui_controls2.c +++ b/code/q3_ui/ui_controls2.c @@ -223,7 +223,7 @@ typedef struct static controls_t s_controls; -static vec4_t controls_binding_color = {1.00f, 0.43f, 0.00f, 1.00f}; // bk: Win32 C4305 +static vec4_t controls_binding_color = {1.00f, 0.43f, 0.00f, 1.00f}; static bind_t g_bindings[] = { @@ -561,7 +561,6 @@ static void Controls_Update( void ) { // disable all controls in all groups for( i = 0; i < C_MAX; i++ ) { controls = g_controls[i]; - // bk001204 - parentheses for( j = 0; (control = controls[j]) ; j++ ) { control->flags |= (QMF_HIDDEN|QMF_INACTIVE); } @@ -570,14 +569,12 @@ static void Controls_Update( void ) { controls = g_controls[s_controls.section]; // enable controls in active group (and count number of items for vertical centering) - // bk001204 - parentheses for( j = 0; (control = controls[j]) ; j++ ) { control->flags &= ~(QMF_GRAYED|QMF_HIDDEN|QMF_INACTIVE); } // position controls y = ( SCREEN_HEIGHT - j * SMALLCHAR_HEIGHT ) / 2; - // bk001204 - parentheses for( j = 0; (control = controls[j]) ; j++, y += SMALLCHAR_HEIGHT ) { control->x = 320; control->y = y; diff --git a/code/q3_ui/ui_gameinfo.c b/code/q3_ui/ui_gameinfo.c index 50f7c57..be0497b 100644 --- a/code/q3_ui/ui_gameinfo.c +++ b/code/q3_ui/ui_gameinfo.c @@ -811,10 +811,5 @@ void UI_InitGameinfo( void ) { UI_LoadArenas(); UI_LoadBots(); - if( (trap_Cvar_VariableValue( "fs_restrict" )) || (ui_numSpecialSinglePlayerArenas == 0 && ui_numSinglePlayerArenas == 4) ) { - uis.demoversion = qtrue; - } - else { - uis.demoversion = qfalse; - } + uis.demoversion = qfalse; } diff --git a/code/q3_ui/ui_local.h b/code/q3_ui/ui_local.h index 03b63e0..3e1cdf1 100644 --- a/code/q3_ui/ui_local.h +++ b/code/q3_ui/ui_local.h @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/q_shared.h" #include "../renderer/tr_types.h" //NOTE: include the ui_public.h from the new UI -#include "../ui/ui_public.h" // bk001205 - yes, do have to use this +#include "../ui/ui_public.h" //redefine to old API version #undef UI_API_VERSION #define UI_API_VERSION 4 @@ -678,7 +678,7 @@ int trap_MemoryRemaining( void ); void trap_GetCDKey( char *buf, int buflen ); void trap_SetCDKey( char *buf ); -qboolean trap_VerifyCDKey( const char *key, const char *chksum); // bk001208 - RC4 +qboolean trap_VerifyCDKey( const char *key, const char *chksum); void trap_SetPbClStatus( int status ); diff --git a/code/q3_ui/ui_main.c b/code/q3_ui/ui_main.c index 9327617..734166f 100644 --- a/code/q3_ui/ui_main.c +++ b/code/q3_ui/ui_main.c @@ -79,7 +79,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! } return -1; @@ -156,7 +156,6 @@ vmCvar_t ui_server16; vmCvar_t ui_cdkeychecked; -// 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 }, @@ -216,7 +215,6 @@ static cvarTable_t cvarTable[] = { { &ui_cdkeychecked, "ui_cdkeychecked", "0", CVAR_ROM } }; -// bk001129 - made static to avoid aliasing static int cvarTableSize = sizeof(cvarTable) / sizeof(cvarTable[0]); diff --git a/code/q3_ui/ui_mods.c b/code/q3_ui/ui_mods.c index 9756115..e144375 100644 --- a/code/q3_ui/ui_mods.c +++ b/code/q3_ui/ui_mods.c @@ -106,42 +106,6 @@ static void UI_Mods_ParseInfos( char *modDir, char *modDesc ) { } -#if 0 // bk001204 - unused -/* -=============== -UI_Mods_LoadModsFromFile -=============== -*/ -static void UI_Mods_LoadModsFromFile( char *filename ) { - int len; - fileHandle_t f; - char buf[1024]; - - len = trap_FS_FOpenFile( filename, &f, FS_READ ); - if ( !f ) { - trap_Print( va( S_COLOR_RED "file not found: %s\n", filename ) ); - return; - } - if ( len >= sizeof(buf) ) { - trap_Print( va( S_COLOR_RED "file too large: %s is %i, max allowed is %i", filename, len, sizeof(buf) ) ); - trap_FS_FCloseFile( f ); - return; - } - - trap_FS_Read( buf, len, f ); - buf[len] = 0; - trap_FS_FCloseFile( f ); - - len = strlen( filename ); - if( !Q_stricmp(filename + len - 4,".mod") ) { - filename[len-4] = '\0'; - } - - UI_Mods_ParseInfos( filename, buf ); -} -#endif - - /* =============== UI_Mods_LoadMods diff --git a/code/q3_ui/ui_qmenu.c b/code/q3_ui/ui_qmenu.c index fa0cc75..e955c51 100644 --- a/code/q3_ui/ui_qmenu.c +++ b/code/q3_ui/ui_qmenu.c @@ -327,7 +327,6 @@ void Bitmap_Draw( menubitmap_s *b ) if (b->shader) UI_DrawHandlePic( x, y, w, h, b->shader ); - // bk001204 - parentheses if ( ( (b->generic.flags & QMF_PULSE) || (b->generic.flags & QMF_PULSEIFFOCUS) ) && (Menu_ItemAtCursor( b->generic.parent ) == b)) diff --git a/code/q3_ui/ui_team.c b/code/q3_ui/ui_team.c index 0bd7316..e15dde6 100644 --- a/code/q3_ui/ui_team.c +++ b/code/q3_ui/ui_team.c @@ -47,16 +47,6 @@ typedef struct static teammain_t s_teammain; -// bk001204 - unused -//static menuframework_s s_teammain_menu; -//static menuaction_s s_teammain_orders; -//static menuaction_s s_teammain_voice; -//static menuaction_s s_teammain_joinred; -//static menuaction_s s_teammain_joinblue; -//static menuaction_s s_teammain_joingame; -//static menuaction_s s_teammain_spectate; - - /* =============== TeamMain_MenuEvent diff --git a/code/q3_ui/ui_video.c b/code/q3_ui/ui_video.c index 44198b9..1a7e7f7 100644 --- a/code/q3_ui/ui_video.c +++ b/code/q3_ui/ui_video.c @@ -238,13 +238,6 @@ GRAPHICS OPTIONS MENU #define GRAPHICSOPTIONS_ACCEPT0 "menu/art/accept_0" #define GRAPHICSOPTIONS_ACCEPT1 "menu/art/accept_1" -static const char *s_drivers[] = -{ - OPENGL_DRIVER_NAME, - _3DFX_DRIVER_NAME, - NULL -}; - #define ID_BACK2 101 #define ID_FULLSCREEN 102 #define ID_LIST 103 @@ -489,24 +482,9 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification ) trap_Cvar_SetValue( "r_allowExtensions", s_graphicsoptions.allow_extensions.curvalue ); trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue ); trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue ); - trap_Cvar_Set( "r_glDriver", ( char * ) s_drivers[s_graphicsoptions.driver.curvalue] ); - switch ( s_graphicsoptions.colordepth.curvalue ) - { - case 0: - trap_Cvar_SetValue( "r_colorbits", 0 ); - trap_Cvar_SetValue( "r_depthbits", 0 ); - trap_Cvar_SetValue( "r_stencilbits", 0 ); - break; - case 1: - trap_Cvar_SetValue( "r_colorbits", 16 ); - trap_Cvar_SetValue( "r_depthbits", 16 ); - trap_Cvar_SetValue( "r_stencilbits", 0 ); - break; - case 2: - trap_Cvar_SetValue( "r_colorbits", 32 ); - trap_Cvar_SetValue( "r_depthbits", 24 ); - break; - } + trap_Cvar_SetValue( "r_colorbits", 0 ); + trap_Cvar_SetValue( "r_depthbits", 0 ); + trap_Cvar_SetValue( "r_stencilbits", 0 ); trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue ); if ( s_graphicsoptions.geometry.curvalue == 2 ) |