#include "ui_local.h"Go to the source code of this file.
Functions | |
| void QDECL | Com_Error (int level, const char *error,...) |
| void QDECL | Com_Printf (const char *msg,...) |
| float | UI_ClampCvar (float min, float max, float value) |
| void | UI_StartDemoLoop (void) |
| char * | UI_Argv (int arg) |
| char * | UI_Cvar_VariableString (const char *var_name) |
| void | UI_SetBestScores (postGameInfo_t *newInfo, qboolean postGame) |
| void | UI_LoadBestScores (const char *map, int game) |
| void | UI_ClearScores () |
| qboolean | UI_ConsoleCommand (int realTime) |
| void | UI_Shutdown (void) |
| void | UI_DrawNamedPic (float x, float y, float width, float height, const char *picname) |
| void | UI_DrawHandlePic (float x, float y, float w, float h, qhandle_t hShader) |
| void | UI_FillRect (float x, float y, float width, float height, const float *color) |
| void | UI_DrawSides (float x, float y, float w, float h) |
| void | UI_DrawTopBottom (float x, float y, float w, float h) |
| void | UI_DrawRect (float x, float y, float width, float height, const float *color) |
| void | UI_SetColor (const float *rgba) |
| void | UI_UpdateScreen (void) |
| void | UI_DrawTextBox (int x, int y, int width, int lines) |
| qboolean | UI_CursorInRect (int x, int y, int width, int height) |
Variables | |
| qboolean | m_entersound |
| qboolean | newUI = qfalse |
|
||||||||||||||||
|
||||||||||||
|
|
Definition at line 64 of file ui_atoms.c. References MAX_STRING_CHARS, and trap_Argv(). Referenced by UI_ConsoleCommand().
00064 {
00065 static char buffer[MAX_STRING_CHARS];
00066
00067 trap_Argv( arg, buffer, sizeof( buffer ) );
00068
00069 return buffer;
00070 }
|
|
||||||||||||||||
|
Definition at line 47 of file ui_atoms.c. References min.
|
|
|
Definition at line 147 of file ui_atoms.c. References fileHandle_t, FS_WRITE, memset(), postGameInfo_t, qfalse, strlen(), trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_GetFileList(), trap_FS_Write(), UI_SetBestScores(), and va().
00147 {
00148 char gameList[4096];
00149 char *gameFile;
00150 int i, len, count, size;
00151 fileHandle_t f;
00152 postGameInfo_t newInfo;
00153
00154 count = trap_FS_GetFileList( "games", "game", gameList, sizeof(gameList) );
00155
00156 size = sizeof(postGameInfo_t);
00157 memset(&newInfo, 0, size);
00158
00159 if (count > 0) {
00160 gameFile = gameList;
00161 for ( i = 0; i < count; i++ ) {
00162 len = strlen(gameFile);
00163 if (trap_FS_FOpenFile(va("games/%s",gameFile), &f, FS_WRITE) >= 0) {
00164 trap_FS_Write(&size, sizeof(int), f);
00165 trap_FS_Write(&newInfo, size, f);
00166 trap_FS_FCloseFile(f);
00167 }
00168 gameFile += len + 1;
00169 }
00170 }
00171
00172 UI_SetBestScores(&newInfo, qfalse);
00173
00174 }
|
|
|
Definition at line 296 of file ui_atoms.c. References displayContextDef_t::frameTime, GT_SIEGE, KEYCATCH_UI, Menus_ActivateByName(), Menus_CloseAll(), Q_stricmp(), qboolean, qfalse, qtrue, displayContextDef_t::realTime, trap_Cvar_VariableValue(), trap_Key_SetCatcher(), UI_Argv(), UI_Load(), UI_Report(), UI_ShowPostGame(), uiInfo_t::uiDC, and uiInfo. Referenced by vmMain().
00296 {
00297 char *cmd;
00298
00299 uiInfo.uiDC.frameTime = realTime - uiInfo.uiDC.realTime;
00300 uiInfo.uiDC.realTime = realTime;
00301
00302 cmd = UI_Argv( 0 );
00303
00304 // ensure minimum menu data is available
00305 //Menu_Cache();
00306
00307 if ( Q_stricmp (cmd, "ui_test") == 0 ) {
00308 UI_ShowPostGame(qtrue);
00309 }
00310
00311 if ( Q_stricmp (cmd, "ui_report") == 0 ) {
00312 UI_Report();
00313 return qtrue;
00314 }
00315
00316 if ( Q_stricmp (cmd, "ui_load") == 0 ) {
00317 UI_Load();
00318 return qtrue;
00319 }
00320
00321 if ( Q_stricmp (cmd, "ui_opensiegemenu" ) == 0 )
00322 {
00323 if ( trap_Cvar_VariableValue ( "g_gametype" ) == GT_SIEGE )
00324 {
00325 Menus_CloseAll();
00326 if (Menus_ActivateByName(UI_Argv(1)))
00327 {
00328 trap_Key_SetCatcher( KEYCATCH_UI );
00329 }
00330 }
00331 return qtrue;
00332 }
00333
00334 if ( Q_stricmp (cmd, "ui_openmenu" ) == 0 )
00335 {
00336 //if ( trap_Cvar_VariableValue ( "developer" ) )
00337 {
00338 Menus_CloseAll();
00339 if (Menus_ActivateByName(UI_Argv(1)))
00340 {
00341 trap_Key_SetCatcher( KEYCATCH_UI );
00342 }
00343 return qtrue;
00344 }
00345 }
00346
00347 /*
00348 if ( Q_stricmp (cmd, "remapShader") == 0 ) {
00349 if (trap_Argc() == 4) {
00350 char shader1[MAX_QPATH];
00351 char shader2[MAX_QPATH];
00352 Q_strncpyz(shader1, UI_Argv(1), sizeof(shader1));
00353 Q_strncpyz(shader2, UI_Argv(2), sizeof(shader2));
00354 trap_R_RemapShader(shader1, shader2, UI_Argv(3));
00355 return qtrue;
00356 }
00357 }
00358 */
00359
00360 if ( Q_stricmp (cmd, "postgame") == 0 ) {
00361 UI_CalcPostGameStats();
00362 return qtrue;
00363 }
00364
00365 if ( Q_stricmp (cmd, "ui_cache") == 0 ) {
00366 UI_Cache_f();
00367 return qtrue;
00368 }
00369
00370 if ( Q_stricmp (cmd, "ui_teamOrders") == 0 ) {
00371 //UI_TeamOrdersMenu_f();
00372 return qtrue;
00373 }
00374
00375
00376 if ( Q_stricmp (cmd, "ui_cdkey") == 0 ) {
00377 //UI_CDKeyMenu_f();
00378 return qtrue;
00379 }
00380
00381 return qfalse;
00382 }
|
|
||||||||||||||||||||
|
Definition at line 484 of file ui_atoms.c. References displayContextDef_t::cursorx, displayContextDef_t::cursory, qboolean, qfalse, qtrue, uiInfo_t::uiDC, and uiInfo.
|
|
|
Definition at line 73 of file ui_atoms.c. References MAX_STRING_CHARS, and trap_Cvar_VariableStringBuffer(). Referenced by _UI_Init(), Item_Model_Paint(), UI_FeederSelection(), UI_GetVideoSetup(), UI_Load(), UI_LoadNonIngame(), UI_SaveForceTemplate(), UI_UpdateForcePowers(), and UI_UpdateVideoSetup().
00073 {
00074 static char buffer[MAX_STRING_CHARS];
00075
00076 trap_Cvar_VariableStringBuffer( var_name, buffer, sizeof( buffer ) );
00077
00078 return buffer;
00079 }
|
|
||||||||||||||||||||||||
|
Definition at line 400 of file ui_atoms.c. References qhandle_t, and trap_R_DrawStretchPic(). Referenced by _UI_Init(), _UI_Refresh(), UI_DrawCenteredPic(), and UI_DrawForceStars().
00400 {
00401 float s0;
00402 float s1;
00403 float t0;
00404 float t1;
00405
00406 if( w < 0 ) { // flip about vertical
00407 w = -w;
00408 s0 = 1;
00409 s1 = 0;
00410 }
00411 else {
00412 s0 = 0;
00413 s1 = 1;
00414 }
00415
00416 if( h < 0 ) { // flip about horizontal
00417 h = -h;
00418 t0 = 1;
00419 t1 = 0;
00420 }
00421 else {
00422 t0 = 0;
00423 t1 = 1;
00424 }
00425
00426 trap_R_DrawStretchPic( x, y, w, h, s0, t0, s1, t1, hShader );
00427 }
|
|
||||||||||||||||||||||||
|
Definition at line 393 of file ui_atoms.c. References qhandle_t, trap_R_DrawStretchPic(), and trap_R_RegisterShaderNoMip().
00393 {
00394 qhandle_t hShader;
00395
00396 hShader = trap_R_RegisterShaderNoMip( picname );
00397 trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
00398 }
|
|
||||||||||||||||||||||||
|
Definition at line 460 of file ui_atoms.c. References NULL, trap_R_SetColor(), UI_DrawSides(), and UI_DrawTopBottom(). Referenced by UI_DrawTextBox().
00460 {
00461 trap_R_SetColor( color );
00462
00463 UI_DrawTopBottom(x, y, width, height);
00464 UI_DrawSides(x, y, width, height);
00465
00466 trap_R_SetColor( NULL );
00467 }
|
|
||||||||||||||||||||
|
Definition at line 444 of file ui_atoms.c. References trap_R_DrawStretchPic(), uiInfo_t::uiDC, uiInfo, and displayContextDef_t::whiteShader. Referenced by UI_DrawRect().
00444 {
00445 trap_R_DrawStretchPic( x, y, 1, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00446 trap_R_DrawStretchPic( x + w - 1, y, 1, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00447 }
|
|
||||||||||||||||||||
|
Definition at line 478 of file ui_atoms.c. References BIGCHAR_HEIGHT, BIGCHAR_WIDTH, colorBlack, colorWhite, UI_DrawRect(), and UI_FillRect().
00479 {
00480 UI_FillRect( x + BIGCHAR_WIDTH/2, y + BIGCHAR_HEIGHT/2, ( width + 1 ) * BIGCHAR_WIDTH, ( lines + 1 ) * BIGCHAR_HEIGHT, colorBlack );
00481 UI_DrawRect( x + BIGCHAR_WIDTH/2, y + BIGCHAR_HEIGHT/2, ( width + 1 ) * BIGCHAR_WIDTH, ( lines + 1 ) * BIGCHAR_HEIGHT, colorWhite );
00482 }
|
|
||||||||||||||||||||
|
Definition at line 449 of file ui_atoms.c. References trap_R_DrawStretchPic(), uiInfo_t::uiDC, uiInfo, and displayContextDef_t::whiteShader. Referenced by UI_DrawRect().
00449 {
00450 trap_R_DrawStretchPic( x, y, w, 1, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00451 trap_R_DrawStretchPic( x, y + h - 1, w, 1, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00452 }
|
|
||||||||||||||||||||||||
|
Definition at line 436 of file ui_atoms.c. References NULL, trap_R_DrawStretchPic(), trap_R_SetColor(), uiInfo_t::uiDC, uiInfo, and displayContextDef_t::whiteShader. Referenced by _UI_Init(), and UI_DrawTextBox().
00436 {
00437 trap_R_SetColor( color );
00438
00439 trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00440
00441 trap_R_SetColor( NULL );
00442 }
|
|
||||||||||||
|
Definition at line 118 of file ui_atoms.c. References Com_sprintf(), uiInfo_t::demoAvailable, fileHandle_t, FS_READ, MAX_QPATH, memset(), postGameInfo_t, qfalse, qtrue, trap_Cvar_VariableValue(), trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_Read(), UI_SetBestScores(), and uiInfo. Referenced by _UI_Init(), and UI_FeederSelection().
00118 {
00119 char fileName[MAX_QPATH];
00120 fileHandle_t f;
00121 postGameInfo_t newInfo;
00122 memset(&newInfo, 0, sizeof(postGameInfo_t));
00123 Com_sprintf(fileName, MAX_QPATH, "games/%s_%i.game", map, game);
00124 if (trap_FS_FOpenFile(fileName, &f, FS_READ) >= 0) {
00125 int size = 0;
00126 trap_FS_Read(&size, sizeof(int), f);
00127 if (size == sizeof(postGameInfo_t)) {
00128 trap_FS_Read(&newInfo, sizeof(postGameInfo_t), f);
00129 }
00130 trap_FS_FCloseFile(f);
00131 }
00132 UI_SetBestScores(&newInfo, qfalse);
00133
00134 Com_sprintf(fileName, MAX_QPATH, "demos/%s_%d.dm_%d", map, game, (int)trap_Cvar_VariableValue("protocol"));
00135 uiInfo.demoAvailable = qfalse;
00136 if (trap_FS_FOpenFile(fileName, &f, FS_READ) >= 0) {
00137 uiInfo.demoAvailable = qtrue;
00138 trap_FS_FCloseFile(f);
00139 }
00140 }
|
|
||||||||||||
|
Definition at line 83 of file ui_atoms.c. References postGameInfo_s::accuracy, postGameInfo_s::assists, postGameInfo_s::baseScore, postGameInfo_s::blueScore, postGameInfo_s::captures, postGameInfo_s::defends, postGameInfo_s::excellents, postGameInfo_s::gauntlets, postGameInfo_s::impressives, postGameInfo_s::perfects, postGameInfo_t, postGameInfo_s::redScore, postGameInfo_s::score, postGameInfo_s::shutoutBonus, postGameInfo_s::skillBonus, postGameInfo_s::time, postGameInfo_s::timeBonus, trap_Cvar_Set(), and va(). Referenced by UI_ClearScores(), and UI_LoadBestScores().
00083 {
00084 trap_Cvar_Set("ui_scoreAccuracy", va("%i%%", newInfo->accuracy));
00085 trap_Cvar_Set("ui_scoreImpressives", va("%i", newInfo->impressives));
00086 trap_Cvar_Set("ui_scoreExcellents", va("%i", newInfo->excellents));
00087 trap_Cvar_Set("ui_scoreDefends", va("%i", newInfo->defends));
00088 trap_Cvar_Set("ui_scoreAssists", va("%i", newInfo->assists));
00089 trap_Cvar_Set("ui_scoreGauntlets", va("%i", newInfo->gauntlets));
00090 trap_Cvar_Set("ui_scoreScore", va("%i", newInfo->score));
00091 trap_Cvar_Set("ui_scorePerfect", va("%i", newInfo->perfects));
00092 trap_Cvar_Set("ui_scoreTeam", va("%i to %i", newInfo->redScore, newInfo->blueScore));
00093 trap_Cvar_Set("ui_scoreBase", va("%i", newInfo->baseScore));
00094 trap_Cvar_Set("ui_scoreTimeBonus", va("%i", newInfo->timeBonus));
00095 trap_Cvar_Set("ui_scoreSkillBonus", va("%i", newInfo->skillBonus));
00096 trap_Cvar_Set("ui_scoreShutoutBonus", va("%i", newInfo->shutoutBonus));
00097 trap_Cvar_Set("ui_scoreTime", va("%02i:%02i", newInfo->time / 60, newInfo->time % 60));
00098 trap_Cvar_Set("ui_scoreCaptures", va("%i", newInfo->captures));
00099 if (postGame) {
00100 trap_Cvar_Set("ui_scoreAccuracy2", va("%i%%", newInfo->accuracy));
00101 trap_Cvar_Set("ui_scoreImpressives2", va("%i", newInfo->impressives));
00102 trap_Cvar_Set("ui_scoreExcellents2", va("%i", newInfo->excellents));
00103 trap_Cvar_Set("ui_scoreDefends2", va("%i", newInfo->defends));
00104 trap_Cvar_Set("ui_scoreAssists2", va("%i", newInfo->assists));
00105 trap_Cvar_Set("ui_scoreGauntlets2", va("%i", newInfo->gauntlets));
00106 trap_Cvar_Set("ui_scoreScore2", va("%i", newInfo->score));
00107 trap_Cvar_Set("ui_scorePerfect2", va("%i", newInfo->perfects));
00108 trap_Cvar_Set("ui_scoreTeam2", va("%i to %i", newInfo->redScore, newInfo->blueScore));
00109 trap_Cvar_Set("ui_scoreBase2", va("%i", newInfo->baseScore));
00110 trap_Cvar_Set("ui_scoreTimeBonus2", va("%i", newInfo->timeBonus));
00111 trap_Cvar_Set("ui_scoreSkillBonus2", va("%i", newInfo->skillBonus));
00112 trap_Cvar_Set("ui_scoreShutoutBonus2", va("%i", newInfo->shutoutBonus));
00113 trap_Cvar_Set("ui_scoreTime2", va("%02i:%02i", newInfo->time / 60, newInfo->time % 60));
00114 trap_Cvar_Set("ui_scoreCaptures2", va("%i", newInfo->captures));
00115 }
00116 }
|
|
|
Definition at line 469 of file ui_atoms.c. References trap_R_SetColor(). Referenced by _UI_Init(), and _UI_Refresh().
00469 {
00470 trap_R_SetColor( rgba );
00471 }
|
|
|
Definition at line 389 of file ui_atoms.c.
00389 {
00390 }
|
|
|
Definition at line 59 of file ui_atoms.c. References EXEC_APPEND, and trap_Cmd_ExecuteText().
00059 {
00060 trap_Cmd_ExecuteText( EXEC_APPEND, "d1\n" );
00061 }
|
|
|
Definition at line 473 of file ui_atoms.c. References trap_UpdateScreen().
00473 {
00474 trap_UpdateScreen();
00475 }
|
|
|
Definition at line 10 of file ui_atoms.c. |
|
|
Definition at line 39 of file ui_atoms.c. |