#include "ui_local.h"
Include dependency graph for ui_main.c:

Go to the source code of this file.
|
|
Definition at line 602 of file ui_main.c. Referenced by _UI_Refresh(). |
|
||||||||||||||||||||||||||||
|
Definition at line 267 of file ui_main.c. References _UI_DrawSides(), _UI_DrawTopBottom(), height, NULL, trap_R_SetColor(), width, x, and y. 00267 {
00268 trap_R_SetColor( color );
00269
00270 _UI_DrawTopBottom(x, y, width, height, size);
00271 _UI_DrawSides(x, y, width, height, size);
00272
00273 trap_R_SetColor( NULL );
00274 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 247 of file ui_main.c. References h(), trap_R_DrawStretchPic(), UI_AdjustFrom640(), uiInfo_t::uiDC, uiInfo, w, displayContextDef_t::whiteShader, x, displayContextDef_t::xscale, and y. Referenced by _UI_DrawRect(). 00247 {
00248 UI_AdjustFrom640( &x, &y, &w, &h );
00249 size *= uiInfo.uiDC.xscale;
00250 trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00251 trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00252 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 254 of file ui_main.c. References h(), trap_R_DrawStretchPic(), UI_AdjustFrom640(), uiInfo_t::uiDC, uiInfo, w, displayContextDef_t::whiteShader, x, y, and displayContextDef_t::yscale. Referenced by _UI_DrawRect(). 00254 {
00255 UI_AdjustFrom640( &x, &y, &w, &h );
00256 size *= uiInfo.uiDC.yscale;
00257 trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00258 trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00259 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 5306 of file ui_main.c. References Menus_AnyFullScreenVisible(), and qboolean. Referenced by vmMain(). 05306 {
05307 return Menus_AnyFullScreenVisible();
05308 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 5175 of file ui_main.c. References down, K_ESCAPE, KEYCATCH_UI, Menu_Count(), Menu_GetFocused(), Menu_HandleKey(), Menus_AnyFullScreenVisible(), Menus_CloseAll(), trap_Cvar_Set(), trap_Key_ClearStates(), trap_Key_GetCatcher(), and trap_Key_SetCatcher(). Referenced by vmMain(). 05175 {
05176
05177 if (Menu_Count() > 0) {
05178 menuDef_t *menu = Menu_GetFocused();
05179 if (menu) {
05180 if (key == K_ESCAPE && down && !Menus_AnyFullScreenVisible()) {
05181 Menus_CloseAll();
05182 } else {
05183 Menu_HandleKey(menu, key, down );
05184 }
05185 } else {
05186 trap_Key_SetCatcher( trap_Key_GetCatcher() & ~KEYCATCH_UI );
05187 trap_Key_ClearStates();
05188 trap_Cvar_Set( "cl_paused", "0" );
05189 }
05190 }
05191
05192 //if ((s > 0) && (s != menu_null_sound)) {
05193 // trap_S_StartLocalSound( s, CHAN_LOCAL_SOUND );
05194 //}
05195 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 5202 of file ui_main.c. References displayContextDef_t::cursorx, displayContextDef_t::cursory, Display_MouseMove(), Menu_Count(), NULL, uiInfo_t::uiDC, and uiInfo. Referenced by vmMain(). 05203 {
05204 // update mouse screen position
05205 uiInfo.uiDC.cursorx += dx;
05206 if (uiInfo.uiDC.cursorx < 0)
05207 uiInfo.uiDC.cursorx = 0;
05208 else if (uiInfo.uiDC.cursorx > SCREEN_WIDTH)
05209 uiInfo.uiDC.cursorx = SCREEN_WIDTH;
05210
05211 uiInfo.uiDC.cursory += dy;
05212 if (uiInfo.uiDC.cursory < 0)
05213 uiInfo.uiDC.cursory = 0;
05214 else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT)
05215 uiInfo.uiDC.cursory = SCREEN_HEIGHT;
05216
05217 if (Menu_Count() > 0) {
05218 //menuDef_t *menu = Menu_GetFocused();
05219 //Menu_HandleMouseMove(menu, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory);
05220 Display_MouseMove(NULL, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory);
05221 }
05222
05223 }
|
Here is the call graph for this function:

|
|
Definition at line 603 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::cursor, displayContextDef_t::cursorx, displayContextDef_t::cursory, displayContextDef_t::debug, displayContextDef_t::FPS, displayContextDef_t::frameTime, i, Menu_Count(), Menu_PaintAll(), NULL, qfalse, displayContextDef_t::realTime, UI_BuildFindPlayerList(), UI_BuildServerStatus(), UI_DoServerRefresh(), UI_DrawHandlePic(), UI_FPS_FRAMES, UI_SetColor(), UI_UpdateCvars(), uiInfo_t::uiDC, and uiInfo. Referenced by vmMain(). 00604 {
00605 static int index;
00606 static int previousTimes[UI_FPS_FRAMES];
00607
00608 //if ( !( trap_Key_GetCatcher() & KEYCATCH_UI ) ) {
00609 // return;
00610 //}
00611
00612 uiInfo.uiDC.frameTime = realtime - uiInfo.uiDC.realTime;
00613 uiInfo.uiDC.realTime = realtime;
00614
00615 previousTimes[index % UI_FPS_FRAMES] = uiInfo.uiDC.frameTime;
00616 index++;
00617 if ( index > UI_FPS_FRAMES ) {
00618 int i, total;
00619 // average multiple frames together to smooth changes out a bit
00620 total = 0;
00621 for ( i = 0 ; i < UI_FPS_FRAMES ; i++ ) {
00622 total += previousTimes[i];
00623 }
00624 if ( !total ) {
00625 total = 1;
00626 }
00627 uiInfo.uiDC.FPS = 1000 * UI_FPS_FRAMES / total;
00628 }
00629
00630
00631
00632 UI_UpdateCvars();
00633
00634 if (Menu_Count() > 0) {
00635 // paint all the menus
00636 Menu_PaintAll();
00637 // refresh server browser list
00638 UI_DoServerRefresh();
00639 // refresh server status
00640 UI_BuildServerStatus(qfalse);
00641 // refresh find player list
00642 UI_BuildFindPlayerList(qfalse);
00643 }
00644
00645 // draw cursor
00646 UI_SetColor( NULL );
00647 if (Menu_Count() > 0) {
00648 UI_DrawHandlePic( uiInfo.uiDC.cursorx-16, uiInfo.uiDC.cursory-16, 32, 32, uiInfo.uiDC.Assets.cursor);
00649 }
00650
00651 #ifndef NDEBUG
00652 if (uiInfo.uiDC.debug)
00653 {
00654 // cursor coordinates
00655 //FIXME
00656 //UI_DrawString( 0, 0, va("(%d,%d)",uis.cursorx,uis.cursory), UI_LEFT|UI_SMALLFONT, colorRed );
00657 }
00658 #endif
00659
00660 }
|
Here is the call graph for this function:

|
|
Definition at line 5234 of file ui_main.c. References uiInfo_t::inGameLoad, vmCvar_t::integer, KEYCATCH_UI, Menu_Count(), Menus_ActivateByName(), Menus_CloseAll(), strlen(), trap_Cvar_Set(), trap_Cvar_VariableStringBuffer(), trap_Key_ClearStates(), trap_Key_GetCatcher(), trap_Key_SetCatcher(), UI_BuildPlayerList(), UI_LoadNonIngame(), ui_singlePlayerActive, uiInfo, UIMENU_BAD_CD_KEY, UIMENU_INGAME, UIMENU_MAIN, UIMENU_NEED_CD, UIMENU_NONE, UIMENU_POSTGAME, UIMENU_TEAM, v, and vec3_t. Referenced by UI_ShowPostGame(), and vmMain(). 05234 {
05235 char buf[256];
05236
05237 // this should be the ONLY way the menu system is brought up
05238 // enusure minumum menu data is cached
05239 if (Menu_Count() > 0) {
05240 vec3_t v;
05241 v[0] = v[1] = v[2] = 0;
05242 switch ( menu ) {
05243 case UIMENU_NONE:
05244 trap_Key_SetCatcher( trap_Key_GetCatcher() & ~KEYCATCH_UI );
05245 trap_Key_ClearStates();
05246 trap_Cvar_Set( "cl_paused", "0" );
05247 Menus_CloseAll();
05248
05249 return;
05250 case UIMENU_MAIN:
05251 //trap_Cvar_Set( "sv_killserver", "1" );
05252 trap_Key_SetCatcher( KEYCATCH_UI );
05253 //trap_S_StartLocalSound( trap_S_RegisterSound("sound/misc/menu_background.wav", qfalse) , CHAN_LOCAL_SOUND );
05254 //trap_S_StartBackgroundTrack("sound/misc/menu_background.wav", NULL);
05255 if (uiInfo.inGameLoad) {
05256 UI_LoadNonIngame();
05257 }
05258 Menus_CloseAll();
05259 Menus_ActivateByName("main");
05260 trap_Cvar_VariableStringBuffer("com_errorMessage", buf, sizeof(buf));
05261 if (strlen(buf)) {
05262 if (!ui_singlePlayerActive.integer) {
05263 Menus_ActivateByName("error_popmenu");
05264 } else {
05265 trap_Cvar_Set("com_errorMessage", "");
05266 }
05267 }
05268 return;
05269 case UIMENU_TEAM:
05270 trap_Key_SetCatcher( KEYCATCH_UI );
05271 Menus_ActivateByName("team");
05272 return;
05273 case UIMENU_NEED_CD:
05274 // no cd check in TA
05275 //trap_Key_SetCatcher( KEYCATCH_UI );
05276 //Menus_ActivateByName("needcd");
05277 //UI_ConfirmMenu( "Insert the CD", NULL, NeedCDAction );
05278 return;
05279 case UIMENU_BAD_CD_KEY:
05280 // no cd check in TA
05281 //trap_Key_SetCatcher( KEYCATCH_UI );
05282 //Menus_ActivateByName("badcd");
05283 //UI_ConfirmMenu( "Bad CD Key", NULL, NeedCDKeyAction );
05284 return;
05285 case UIMENU_POSTGAME:
05286 //trap_Cvar_Set( "sv_killserver", "1" );
05287 trap_Key_SetCatcher( KEYCATCH_UI );
05288 if (uiInfo.inGameLoad) {
05289 UI_LoadNonIngame();
05290 }
05291 Menus_CloseAll();
05292 Menus_ActivateByName("endofgame");
05293 //UI_ConfirmMenu( "Bad CD Key", NULL, NeedCDKeyAction );
05294 return;
05295 case UIMENU_INGAME:
05296 trap_Cvar_Set( "cl_paused", "1" );
05297 trap_Key_SetCatcher( KEYCATCH_UI );
05298 UI_BuildPlayerList();
05299 Menus_CloseAll();
05300 Menus_ActivateByName("ingame");
05301 return;
05302 }
05303 }
05304 }
|
Here is the call graph for this function:

|
|
Definition at line 667 of file ui_main.c. References trap_LAN_SaveCachedServers(). Referenced by vmMain(). 00667 {
00668 trap_LAN_SaveCachedServers();
00669 }
|
Here is the call graph for this function:

|
|
Definition at line 4620 of file ui_main.c. References uiInfo_t::aliasCount, uiInfo_t::aliasList, COM_ParseExt(), Com_Printf(), p, Q_stricmp(), qboolean, qtrue, String_Parse(), token, and uiInfo. Referenced by UI_ParseTeamInfo(). 04620 {
04621 char *token;
04622
04623 token = COM_ParseExt(p, qtrue);
04624
04625 if (token[0] != '{') {
04626 return qfalse;
04627 }
04628
04629 while ( 1 ) {
04630 token = COM_ParseExt(p, qtrue);
04631
04632 if (Q_stricmp(token, "}") == 0) {
04633 return qtrue;
04634 }
04635
04636 if ( !token || token[0] == 0 ) {
04637 return qfalse;
04638 }
04639
04640 if (token[0] == '{') {
04641 // three tokens per line, character name, bot alias, and preferred action a - all purpose, d - defense, o - offense
04642 if (!String_Parse(p, &uiInfo.aliasList[uiInfo.aliasCount].name) || !String_Parse(p, &uiInfo.aliasList[uiInfo.aliasCount].ai) || !String_Parse(p, &uiInfo.aliasList[uiInfo.aliasCount].action)) {
04643 return qfalse;
04644 }
04645
04646 Com_Printf("Loaded character alias %s using character ai %s.\n", uiInfo.aliasList[uiInfo.aliasCount].name, uiInfo.aliasList[uiInfo.aliasCount].ai);
04647 if (uiInfo.aliasCount < MAX_ALIASES) {
04648 uiInfo.aliasCount++;
04649 } else {
04650 Com_Printf("Too many aliases, last alias replaced!\n");
04651 }
04652
04653 token = COM_ParseExt(p, qtrue);
04654 if (token[0] != '}') {
04655 return qfalse;
04656 }
04657 }
04658 }
04659
04660 return qfalse;
04661 }
|
Here is the call graph for this function:

|
|
Definition at line 5890 of file ui_main.c. References trap_Cvar_VariableValue(). 05890 {
05891 int maxPing;
05892
05893 maxPing = (int)trap_Cvar_VariableValue( "cl_maxPing" );
05894 if( maxPing < 100 ) {
05895 maxPing = 100;
05896 }
05897 return maxPing;
05898 }
|
Here is the call graph for this function:

|
|
Definition at line 697 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::bigFont, cachedAssets_t::cursor, cachedAssets_t::cursorStr, cachedAssets_t::fadeAmount, cachedAssets_t::fadeClamp, cachedAssets_t::fadeCycle, cachedAssets_t::fontRegistered, cachedAssets_t::gradientBar, cachedAssets_t::itemFocusSound, memset(), cachedAssets_t::menuBuzzSound, cachedAssets_t::menuEnterSound, cachedAssets_t::menuExitSound, PC_Color_Parse(), PC_Float_Parse(), PC_Int_Parse(), PC_String_Parse(), pc_token_t, Q_stricmp(), qboolean, qfalse, cachedAssets_t::shadowColor, cachedAssets_t::shadowFadeClamp, cachedAssets_t::shadowX, cachedAssets_t::shadowY, cachedAssets_t::smallFont, pc_token_s::string, cachedAssets_t::textFont, token, trap_PC_ReadToken(), trap_R_RegisterFont(), trap_R_RegisterShaderNoMip(), trap_S_RegisterSound(), uiInfo_t::uiDC, and uiInfo. Referenced by UI_ParseMenu(). 00697 {
00698 pc_token_t token;
00699 const char *tempStr;
00700
00701 if (!trap_PC_ReadToken(handle, &token))
00702 return qfalse;
00703 if (Q_stricmp(token.string, "{") != 0) {
00704 return qfalse;
00705 }
00706
00707 while ( 1 ) {
00708
00709 memset(&token, 0, sizeof(pc_token_t));
00710
00711 if (!trap_PC_ReadToken(handle, &token))
00712 return qfalse;
00713
00714 if (Q_stricmp(token.string, "}") == 0) {
00715 return qtrue;
00716 }
00717
00718 // font
00719 if (Q_stricmp(token.string, "font") == 0) {
00720 int pointSize;
00721 if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle,&pointSize)) {
00722 return qfalse;
00723 }
00724 trap_R_RegisterFont(tempStr, pointSize, &uiInfo.uiDC.Assets.textFont);
00725 uiInfo.uiDC.Assets.fontRegistered = qtrue;
00726 continue;
00727 }
00728
00729 if (Q_stricmp(token.string, "smallFont") == 0) {
00730 int pointSize;
00731 if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle,&pointSize)) {
00732 return qfalse;
00733 }
00734 trap_R_RegisterFont(tempStr, pointSize, &uiInfo.uiDC.Assets.smallFont);
00735 continue;
00736 }
00737
00738 if (Q_stricmp(token.string, "bigFont") == 0) {
00739 int pointSize;
00740 if (!PC_String_Parse(handle, &tempStr) || !PC_Int_Parse(handle,&pointSize)) {
00741 return qfalse;
00742 }
00743 trap_R_RegisterFont(tempStr, pointSize, &uiInfo.uiDC.Assets.bigFont);
00744 continue;
00745 }
00746
00747
00748 // gradientbar
00749 if (Q_stricmp(token.string, "gradientbar") == 0) {
00750 if (!PC_String_Parse(handle, &tempStr)) {
00751 return qfalse;
00752 }
00753 uiInfo.uiDC.Assets.gradientBar = trap_R_RegisterShaderNoMip(tempStr);
00754 continue;
00755 }
00756
00757 // enterMenuSound
00758 if (Q_stricmp(token.string, "menuEnterSound") == 0) {
00759 if (!PC_String_Parse(handle, &tempStr)) {
00760 return qfalse;
00761 }
00762 uiInfo.uiDC.Assets.menuEnterSound = trap_S_RegisterSound( tempStr, qfalse );
00763 continue;
00764 }
00765
00766 // exitMenuSound
00767 if (Q_stricmp(token.string, "menuExitSound") == 0) {
00768 if (!PC_String_Parse(handle, &tempStr)) {
00769 return qfalse;
00770 }
00771 uiInfo.uiDC.Assets.menuExitSound = trap_S_RegisterSound( tempStr, qfalse );
00772 continue;
00773 }
00774
00775 // itemFocusSound
00776 if (Q_stricmp(token.string, "itemFocusSound") == 0) {
00777 if (!PC_String_Parse(handle, &tempStr)) {
00778 return qfalse;
00779 }
00780 uiInfo.uiDC.Assets.itemFocusSound = trap_S_RegisterSound( tempStr, qfalse );
00781 continue;
00782 }
00783
00784 // menuBuzzSound
00785 if (Q_stricmp(token.string, "menuBuzzSound") == 0) {
00786 if (!PC_String_Parse(handle, &tempStr)) {
00787 return qfalse;
00788 }
00789 uiInfo.uiDC.Assets.menuBuzzSound = trap_S_RegisterSound( tempStr, qfalse );
00790 continue;
00791 }
00792
00793 if (Q_stricmp(token.string, "cursor") == 0) {
00794 if (!PC_String_Parse(handle, &uiInfo.uiDC.Assets.cursorStr)) {
00795 return qfalse;
00796 }
00797 uiInfo.uiDC.Assets.cursor = trap_R_RegisterShaderNoMip( uiInfo.uiDC.Assets.cursorStr);
00798 continue;
00799 }
00800
00801 if (Q_stricmp(token.string, "fadeClamp") == 0) {
00802 if (!PC_Float_Parse(handle, &uiInfo.uiDC.Assets.fadeClamp)) {
00803 return qfalse;
00804 }
00805 continue;
00806 }
00807
00808 if (Q_stricmp(token.string, "fadeCycle") == 0) {
00809 if (!PC_Int_Parse(handle, &uiInfo.uiDC.Assets.fadeCycle)) {
00810 return qfalse;
00811 }
00812 continue;
00813 }
00814
00815 if (Q_stricmp(token.string, "fadeAmount") == 0) {
00816 if (!PC_Float_Parse(handle, &uiInfo.uiDC.Assets.fadeAmount)) {
00817 return qfalse;
00818 }
00819 continue;
00820 }
00821
00822 if (Q_stricmp(token.string, "shadowX") == 0) {
00823 if (!PC_Float_Parse(handle, &uiInfo.uiDC.Assets.shadowX)) {
00824 return qfalse;
00825 }
00826 continue;
00827 }
00828
00829 if (Q_stricmp(token.string, "shadowY") == 0) {
00830 if (!PC_Float_Parse(handle, &uiInfo.uiDC.Assets.shadowY)) {
00831 return qfalse;
00832 }
00833 continue;
00834 }
00835
00836 if (Q_stricmp(token.string, "shadowColor") == 0) {
00837 if (!PC_Color_Parse(handle, &uiInfo.uiDC.Assets.shadowColor)) {
00838 return qfalse;
00839 }
00840 uiInfo.uiDC.Assets.shadowFadeClamp = uiInfo.uiDC.Assets.shadowColor[3];
00841 continue;
00842 }
00843
00844 }
00845 return qfalse;
00846 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 4563 of file ui_main.c. References characterInfo::base, uiInfo_t::characterCount, uiInfo_t::characterList, COM_ParseExt(), Com_Printf(), characterInfo::headImage, characterInfo::imageName, p, Q_stricmp(), qboolean, qtrue, String_Alloc(), String_Parse(), token, uiInfo, and va(). Referenced by UI_ParseTeamInfo(). 04563 {
04564 char *token;
04565 const char *tempStr;
04566
04567 token = COM_ParseExt(p, qtrue);
04568
04569 if (token[0] != '{') {
04570 return qfalse;
04571 }
04572
04573
04574 while ( 1 ) {
04575 token = COM_ParseExt(p, qtrue);
04576
04577 if (Q_stricmp(token, "}") == 0) {
04578 return qtrue;
04579 }
04580
04581 if ( !token || token[0] == 0 ) {
04582 return qfalse;
04583 }
04584
04585 if (token[0] == '{') {
04586 // two tokens per line, character name and sex
04587 if (!String_Parse(p, &uiInfo.characterList[uiInfo.characterCount].name) || !String_Parse(p, &tempStr)) {
04588 return qfalse;
04589 }
04590
04591 uiInfo.characterList[uiInfo.characterCount].headImage = -1;
04592 uiInfo.characterList[uiInfo.characterCount].imageName = String_Alloc(va("models/players/heads/%s/icon_default.tga", uiInfo.characterList[uiInfo.characterCount].name));
04593
04594 if (tempStr && (!Q_stricmp(tempStr, "female"))) {
04595 uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("Janet"));
04596 } else if (tempStr && (!Q_stricmp(tempStr, "male"))) {
04597 uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("James"));
04598 } else {
04599 uiInfo.characterList[uiInfo.characterCount].base = String_Alloc(va("%s",tempStr));
04600 }
04601
04602 Com_Printf("Loaded %s character %s.\n", uiInfo.characterList[uiInfo.characterCount].base, uiInfo.characterList[uiInfo.characterCount].name);
04603 if (uiInfo.characterCount < MAX_HEADS) {
04604 uiInfo.characterCount++;
04605 } else {
04606 Com_Printf("Too many characters, last character replaced!\n");
04607 }
04608
04609 token = COM_ParseExt(p, qtrue);
04610 if (token[0] != '}') {
04611 return qfalse;
04612 }
04613 }
04614 }
04615
04616 return qfalse;
04617 }
|
Here is the call graph for this function:

|
|
Definition at line 848 of file ui_main.c. References displayContextDef_t::Assets, Com_Printf(), glyphInfo_t::glyph, fontInfo_t::glyphs, i, cachedAssets_t::textFont, uiInfo_t::uiDC, and uiInfo. 00848 {
00849 int i;
00850 Com_Printf("Font Info\n");
00851 Com_Printf("=========\n");
00852 for ( i = 32; i < 96; i++) {
00853 Com_Printf("Glyph handle %i: %i\n", i, uiInfo.uiDC.Assets.textFont.glyphs[i].glyph);
00854 }
00855 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 4714 of file ui_main.c. References COM_ParseExt(), Com_Printf(), uiInfo_t::gameTypes, Int_Parse(), uiInfo_t::joinGameTypes, uiInfo_t::numGameTypes, uiInfo_t::numJoinGameTypes, p, Q_stricmp(), qboolean, qtrue, String_Parse(), token, and uiInfo. Referenced by UI_ParseGameInfo(). 04714 {
04715 char *token;
04716
04717 token = COM_ParseExt(p, qtrue);
04718
04719 if (token[0] != '{') {
04720 return qfalse;
04721 }
04722
04723 if (join) {
04724 uiInfo.numJoinGameTypes = 0;
04725 } else {
04726 uiInfo.numGameTypes = 0;
04727 }
04728
04729 while ( 1 ) {
04730 token = COM_ParseExt(p, qtrue);
04731
04732 if (Q_stricmp(token, "}") == 0) {
04733 return qtrue;
04734 }
04735
04736 if ( !token || token[0] == 0 ) {
04737 return qfalse;
04738 }
04739
04740 if (token[0] == '{') {
04741 // two tokens per line, character name and sex
04742 if (join) {
04743 if (!String_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gameType) || !Int_Parse(p, &uiInfo.joinGameTypes[uiInfo.numJoinGameTypes].gtEnum)) {
04744 return qfalse;
04745 }
04746 } else {
04747 if (!String_Parse(p, &uiInfo.gameTypes[uiInfo.numGameTypes].gameType) || !Int_Parse(p, &uiInfo.gameTypes[uiInfo.numGameTypes].gtEnum)) {
04748 return qfalse;
04749 }
04750 }
04751
04752 if (join) {
04753 if (uiInfo.numJoinGameTypes < MAX_GAMETYPES) {
04754 uiInfo.numJoinGameTypes++;
04755 } else {
04756 Com_Printf("Too many net game types, last one replace!\n");
04757 }
04758 } else {
04759 if (uiInfo.numGameTypes < MAX_GAMETYPES) {
04760 uiInfo.numGameTypes++;
04761 } else {
04762 Com_Printf("Too many game types, last one replace!\n");
04763 }
04764 }
04765
04766 token = COM_ParseExt(p, qtrue);
04767 if (token[0] != '}') {
04768 return qfalse;
04769 }
04770 }
04771 }
04772 return qfalse;
04773 }
|
Here is the call graph for this function:

|
|
Definition at line 673 of file ui_main.c. References f, fileHandle_t, FS_READ, MAX_MENUFILE, S_COLOR_RED, trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_Read(), trap_Print(), and va(). Referenced by UI_ParseGameInfo(), and UI_ParseTeamInfo(). 00673 {
00674 int len;
00675 fileHandle_t f;
00676 static char buf[MAX_MENUFILE];
00677
00678 len = trap_FS_FOpenFile( filename, &f, FS_READ );
00679 if ( !f ) {
00680 trap_Print( va( S_COLOR_RED "menu file not found: %s, using default\n", filename ) );
00681 return defaultMenu;
00682 }
00683 if ( len >= MAX_MENUFILE ) {
00684 trap_Print( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i", filename, len, MAX_MENUFILE ) );
00685 trap_FS_FCloseFile( f );
00686 return defaultMenu;
00687 }
00688
00689 trap_FS_Read( buf, len, f );
00690 buf[len] = 0;
00691 trap_FS_FCloseFile( f );
00692 //COM_Compress(buf);
00693 return buf;
00694
00695 }
|
Here is the call graph for this function:

|
|
Definition at line 910 of file ui_main.c. References pc_token_t, qboolean, pc_token_s::string, token, trap_PC_ReadToken(), and UI_ParseMenu(). Referenced by UI_LoadMenus(). 00910 {
00911 pc_token_t token;
00912
00913 if (!trap_PC_ReadToken(handle, &token))
00914 return qfalse;
00915 if (token.string[0] != '{') {
00916 return qfalse;
00917 }
00918
00919 while ( 1 ) {
00920
00921 if (!trap_PC_ReadToken(handle, &token))
00922 return qfalse;
00923
00924 if ( token.string[0] == 0 ) {
00925 return qfalse;
00926 }
00927
00928 if ( token.string[0] == '}' ) {
00929 return qtrue;
00930 }
00931
00932 UI_ParseMenu(token.string);
00933 }
00934 return qfalse;
00935 }
|
Here is the call graph for this function:

|
|
Definition at line 4775 of file ui_main.c. References mapInfo::cinematic, COM_ParseExt(), Com_Printf(), Int_Parse(), mapInfo::levelShot, uiInfo_t::mapCount, uiInfo_t::mapList, p, Q_stricmp(), qboolean, qtrue, String_Parse(), token, trap_R_RegisterShaderNoMip(), mapInfo::typeBits, uiInfo, and va(). Referenced by UI_ParseGameInfo(). 04775 {
04776 char *token;
04777
04778 token = COM_ParseExt(p, qtrue);
04779
04780 if (token[0] != '{') {
04781 return qfalse;
04782 }
04783
04784 uiInfo.mapCount = 0;
04785
04786 while ( 1 ) {
04787 token = COM_ParseExt(p, qtrue);
04788
04789 if (Q_stricmp(token, "}") == 0) {
04790 return qtrue;
04791 }
04792
04793 if ( !token || token[0] == 0 ) {
04794 return qfalse;
04795 }
04796
04797 if (token[0] == '{') {
04798 if (!String_Parse(p, &uiInfo.mapList[uiInfo.mapCount].mapName) || !String_Parse(p, &uiInfo.mapList[uiInfo.mapCount].mapLoadName)
04799 ||!Int_Parse(p, &uiInfo.mapList[uiInfo.mapCount].teamMembers) ) {
04800 return qfalse;
04801 }
04802
04803 if (!String_Parse(p, &uiInfo.mapList[uiInfo.mapCount].opponentName)) {
04804 return qfalse;
04805 }
04806
04807 uiInfo.mapList[uiInfo.mapCount].typeBits = 0;
04808
04809 while (1) {
04810 token = COM_ParseExt(p, qtrue);
04811 if (token[0] >= '0' && token[0] <= '9') {
04812 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << (token[0] - 0x030));
04813 if (!Int_Parse(p, &uiInfo.mapList[uiInfo.mapCount].timeToBeat[token[0] - 0x30])) {
04814 return qfalse;
04815 }
04816 } else {
04817 break;
04818 }
04819 }
04820
04821 //mapList[mapCount].imageName = String_Alloc(va("levelshots/%s", mapList[mapCount].mapLoadName));
04822 //if (uiInfo.mapCount == 0) {
04823 // only load the first cinematic, selection loads the others
04824 // uiInfo.mapList[uiInfo.mapCount].cinematic = trap_CIN_PlayCinematic(va("%s.roq",uiInfo.mapList[uiInfo.mapCount].mapLoadName), qfalse, qfalse, qtrue, 0, 0, 0, 0);
04825 //}
04826 uiInfo.mapList[uiInfo.mapCount].cinematic = -1;
04827 uiInfo.mapList[uiInfo.mapCount].levelShot = trap_R_RegisterShaderNoMip(va("levelshots/%s_small", uiInfo.mapList[uiInfo.mapCount].mapLoadName));
04828
04829 if (uiInfo.mapCount < MAX_MAPS) {
04830 uiInfo.mapCount++;
04831 } else {
04832 Com_Printf("Too many maps, last one replaced!\n");
04833 }
04834 }
04835 }
04836 return qfalse;
04837 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||
|
Definition at line 4003 of file ui_main.c. Referenced by BotAddressedToBot(), FindClientByName(), FindEnemyByName(), and UI_BuildFindPlayerList(). 04003 {
04004 int i;
04005
04006 while(*str) {
04007 for (i = 0; charset[i] && str[i]; i++) {
04008 if (toupper(charset[i]) != toupper(str[i])) break;
04009 }
04010 if (!charset[i]) return str;
04011 str++;
04012 }
04013 return NULL;
04014 }
|
Here is the call graph for this function:

|
|
Definition at line 4503 of file ui_main.c. References teamInfo::cinematic, COM_ParseExt(), Com_Printf(), i, teamInfo::imageName, p, Q_stricmp(), qboolean, qtrue, String_Parse(), uiInfo_t::teamCount, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, teamInfo::teamMembers, token, trap_R_RegisterShaderNoMip(), uiInfo, and va(). Referenced by UI_ParseTeamInfo(). 04503 {
04504 char *token;
04505 const char *tempStr;
04506 int i;
04507
04508 token = COM_ParseExt(p, qtrue);
04509
04510 if (token[0] != '{') {
04511 return qfalse;
04512 }
04513
04514 while ( 1 ) {
04515
04516 token = COM_ParseExt(p, qtrue);
04517
04518 if (Q_stricmp(token, "}") == 0) {
04519 return qtrue;
04520 }
04521
04522 if ( !token || token[0] == 0 ) {
04523 return qfalse;
04524 }
04525
04526 if (token[0] == '{') {
04527 // seven tokens per line, team name and icon, and 5 team member names
04528 if (!String_Parse(p, &uiInfo.teamList[uiInfo.teamCount].teamName) || !String_Parse(p, &tempStr)) {
04529 return qfalse;
04530 }
04531
04532
04533 uiInfo.teamList[uiInfo.teamCount].imageName = tempStr;
04534 uiInfo.teamList[uiInfo.teamCount].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[uiInfo.teamCount].imageName);
04535 uiInfo.teamList[uiInfo.teamCount].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[uiInfo.teamCount].imageName));
04536 uiInfo.teamList[uiInfo.teamCount].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[uiInfo.teamCount].imageName));
04537
04538 uiInfo.teamList[uiInfo.teamCount].cinematic = -1;
04539
04540 for (i = 0; i < TEAM_MEMBERS; i++) {
04541 uiInfo.teamList[uiInfo.teamCount].teamMembers[i] = NULL;
04542 if (!String_Parse(p, &uiInfo.teamList[uiInfo.teamCount].teamMembers[i])) {
04543 return qfalse;
04544 }
04545 }
04546
04547 Com_Printf("Loaded team %s with team icon %s.\n", uiInfo.teamList[uiInfo.teamCount].teamName, tempStr);
04548 if (uiInfo.teamCount < MAX_TEAMS) {
04549 uiInfo.teamCount++;
04550 } else {
04551 Com_Printf("Too many teams, last team replaced!\n");
04552 }
04553 token = COM_ParseExt(p, qtrue);
04554 if (token[0] != '}') {
04555 return qfalse;
04556 }
04557 }
04558 }
04559
04560 return qfalse;
04561 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 311 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::bigFont, count, fontInfo_t::glyphs, fontInfo_t::glyphScale, glyphInfo_t::height, limit, max, Q_IsColorString, s, cachedAssets_t::smallFont, strlen(), cachedAssets_t::textFont, ui_bigFont, ui_smallFont, uiInfo_t::uiDC, uiInfo, and vmCvar_t::value. 00311 {
00312 int len, count;
00313 float max;
00314 glyphInfo_t *glyph;
00315 float useScale;
00316 const char *s = text; // bk001206 - unsigned
00317 fontInfo_t *font = &uiInfo.uiDC.Assets.textFont;
00318 if (scale <= ui_smallFont.value) {
00319 font = &uiInfo.uiDC.Assets.smallFont;
00320 } else if (scale >= ui_bigFont.value) {
00321 font = &uiInfo.uiDC.Assets.bigFont;
00322 }
00323 useScale = scale * font->glyphScale;
00324 max = 0;
00325 if (text) {
00326 len = strlen(text);
00327 if (limit > 0 && len > limit) {
00328 len = limit;
00329 }
00330 count = 0;
00331 while (s && *s && count < len) {
00332 if ( Q_IsColorString(s) ) {
00333 s += 2;
00334 continue;
00335 } else {
00336 glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
00337 if (max < glyph->height) {
00338 max = glyph->height;
00339 }
00340 s++;
00341 count++;
00342 }
00343 }
00344 }
00345 return max * useScale;
00346 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||
|
Definition at line 356 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::bigFont, colorBlack, ColorIndex, count, g_color_table, glyphInfo_t::glyph, fontInfo_t::glyphs, fontInfo_t::glyphScale, glyphInfo_t::imageHeight, glyphInfo_t::imageWidth, ITEM_TEXTSTYLE_SHADOWED, limit, memcpy(), NULL, Q_IsColorString, glyphInfo_t::s, s, glyphInfo_t::s2, cachedAssets_t::smallFont, strlen(), glyphInfo_t::t, glyphInfo_t::t2, Text_PaintChar(), cachedAssets_t::textFont, glyphInfo_t::top, trap_R_SetColor(), ui_bigFont, ui_smallFont, uiInfo_t::uiDC, uiInfo, vmCvar_t::value, x, glyphInfo_t::xSkip, and y. Referenced by Text_PaintCenter(), UI_DrawAllMapsSelection(), UI_DrawBotName(), UI_DrawBotSkill(), UI_DrawClanName(), UI_DrawGameType(), UI_DrawGLInfo(), UI_DrawHandicap(), UI_DrawJoinGameType(), UI_DrawKeyBindStatus(), UI_DrawMapTimeToBeat(), UI_DrawNetFilter(), UI_DrawNetGameType(), UI_DrawNetSource(), UI_DrawOpponentName(), UI_DrawRedBlue(), UI_DrawSelectedPlayer(), UI_DrawServerRefreshDate(), UI_DrawSkill(), UI_DrawTeamMember(), UI_DrawTeamName(), UI_DrawTier(), UI_DrawTierGameType(), and UI_DrawTierMapName(). 00356 {
00357 int len, count;
00358 vec4_t newColor;
00359 glyphInfo_t *glyph;
00360 float useScale;
00361 fontInfo_t *font = &uiInfo.uiDC.Assets.textFont;
00362 if (scale <= ui_smallFont.value) {
00363 font = &uiInfo.uiDC.Assets.smallFont;
00364 } else if (scale >= ui_bigFont.value) {
00365 font = &uiInfo.uiDC.Assets.bigFont;
00366 }
00367 useScale = scale * font->glyphScale;
00368 if (text) {
00369 const char *s = text; // bk001206 - unsigned
00370 trap_R_SetColor( color );
00371 memcpy(&newColor[0], &color[0], sizeof(vec4_t));
00372 len = strlen(text);
00373 if (limit > 0 && len > limit) {
00374 len = limit;
00375 }
00376 count = 0;
00377 while (s && *s && count < len) {
00378 glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
00379 //int yadj = Assets.textFont.glyphs[text[i]].bottom + Assets.textFont.glyphs[text[i]].top;
00380 //float yadj = scale * (Assets.textFont.glyphs[text[i]].imageHeight - Assets.textFont.glyphs[text[i]].height);
00381 if ( Q_IsColorString( s ) ) {
00382 memcpy( newColor, g_color_table[ColorIndex(*(s+1))], sizeof( newColor ) );
00383 newColor[3] = color[3];
00384 trap_R_SetColor( newColor );
00385 s += 2;
00386 continue;
00387 } else {
00388 float yadj = useScale * glyph->top;
00389 if (style == ITEM_TEXTSTYLE_SHADOWED || style == ITEM_TEXTSTYLE_SHADOWEDMORE) {
00390 int ofs = style == ITEM_TEXTSTYLE_SHADOWED ? 1 : 2;
00391 colorBlack[3] = newColor[3];
00392 trap_R_SetColor( colorBlack );
00393 Text_PaintChar(x + ofs, y - yadj + ofs,
00394 glyph->imageWidth,
00395 glyph->imageHeight,
00396 useScale,
00397 glyph->s,
00398 glyph->t,
00399 glyph->s2,
00400 glyph->t2,
00401 glyph->glyph);
00402 trap_R_SetColor( newColor );
00403 colorBlack[3] = 1.0;
00404 }
00405 Text_PaintChar(x, y - yadj,
00406 glyph->imageWidth,
00407 glyph->imageHeight,
00408 useScale,
00409 glyph->s,
00410 glyph->t,
00411 glyph->s2,
00412 glyph->t2,
00413 glyph->glyph);
00414
00415 x += (glyph->xSkip * useScale) + adjust;
00416 s++;
00417 count++;
00418 }
00419 }
00420 trap_R_SetColor( NULL );
00421 }
00422 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||
|
Definition at line 523 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::bigFont, ColorIndex, count, g_color_table, glyphInfo_t::glyph, fontInfo_t::glyphs, fontInfo_t::glyphScale, glyphInfo_t::imageHeight, glyphInfo_t::imageWidth, limit, max, memcpy(), NULL, Q_IsColorString, glyphInfo_t::s, s, glyphInfo_t::s2, cachedAssets_t::smallFont, strlen(), glyphInfo_t::t, glyphInfo_t::t2, Text_PaintChar(), Text_Width(), cachedAssets_t::textFont, glyphInfo_t::top, trap_R_SetColor(), ui_bigFont, ui_smallFont, uiInfo_t::uiDC, uiInfo, vmCvar_t::value, x, glyphInfo_t::xSkip, and y. Referenced by UI_DrawServerMOTD(). 00523 {
00524 int len, count;
00525 vec4_t newColor;
00526 glyphInfo_t *glyph;
00527 if (text) {
00528 const char *s = text; // bk001206 - unsigned
00529 float max = *maxX;
00530 float useScale;
00531 fontInfo_t *font = &uiInfo.uiDC.Assets.textFont;
00532 if (scale <= ui_smallFont.value) {
00533 font = &uiInfo.uiDC.Assets.smallFont;
00534 } else if (scale > ui_bigFont.value) {
00535 font = &uiInfo.uiDC.Assets.bigFont;
00536 }
00537 useScale = scale * font->glyphScale;
00538 trap_R_SetColor( color );
00539 len = strlen(text);
00540 if (limit > 0 && len > limit) {
00541 len = limit;
00542 }
00543 count = 0;
00544 while (s && *s && count < len) {
00545 glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
00546 if ( Q_IsColorString( s ) ) {
00547 memcpy( newColor, g_color_table[ColorIndex(*(s+1))], sizeof( newColor ) );
00548 newColor[3] = color[3];
00549 trap_R_SetColor( newColor );
00550 s += 2;
00551 continue;
00552 } else {
00553 float yadj = useScale * glyph->top;
00554 if (Text_Width(s, useScale, 1) + x > max) {
00555 *maxX = 0;
00556 break;
00557 }
00558 Text_PaintChar(x, y - yadj,
00559 glyph->imageWidth,
00560 glyph->imageHeight,
00561 useScale,
00562 glyph->s,
00563 glyph->t,
00564 glyph->s2,
00565 glyph->t2,
00566 glyph->glyph);
00567 x += (glyph->xSkip * useScale) + adjust;
00568 *maxX = x;
00569 count++;
00570 s++;
00571 }
00572 }
00573 trap_R_SetColor( NULL );
00574 }
00575
00576 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
Definition at line 5345 of file ui_main.c. References ITEM_TEXTSTYLE_SHADOWEDMORE, Text_Paint(), Text_Width(), x, and y. Referenced by Text_PaintCenter_AutoWrapped(), UI_DisplayDownloadInfo(), and UI_DrawConnectScreen(). 05345 {
05346 int len = Text_Width(text, scale, 0);
05347 Text_Paint(x - len / 2, y, scale, color, text, 0, 0, ITEM_TEXTSTYLE_SHADOWEDMORE);
05348 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||
|
Definition at line 5350 of file ui_main.c. References Q_strncpyz(), Text_PaintCenter(), Text_Width(), width, x, and y. Referenced by UI_DrawConnectScreen(). 05350 {
05351 int width;
05352 char *s1,*s2,*s3;
05353 char c_bcp;
05354 char buf[1024];
05355
05356 if (!str || str[0]=='\0')
05357 return;
05358
05359 Q_strncpyz(buf, str, sizeof(buf));
05360 s1 = s2 = s3 = buf;
05361
05362 while (1) {
05363 do {
05364 s3++;
05365 } while (*s3!=' ' && *s3!='\0');
05366 c_bcp = *s3;
05367 *s3 = '\0';
05368 width = Text_Width(s1, scale, 0);
05369 *s3 = c_bcp;
05370 if (width > xmax) {
05371 if (s1==s2)
05372 {
05373 // fuck, don't have a clean cut, we'll overflow
05374 s2 = s3;
05375 }
05376 *s2 = '\0';
05377 Text_PaintCenter(x, y, scale, color, s1, adjust);
05378 y += ystep;
05379 if (c_bcp == '\0')
05380 {
05381 // that was the last word
05382 // we could start a new loop, but that wouldn't be much use
05383 // even if the word is too long, we would overflow it (see above)
05384 // so just print it now if needed
05385 s2++;
05386 if (*s2 != '\0') // if we are printing an overflowing line we have s2 == s3
05387 Text_PaintCenter(x, y, scale, color, s2, adjust);
05388 break;
05389 }
05390 s2++;
05391 s1 = s2;
05392 s3 = s2;
05393 }
05394 else
05395 {
05396 s2 = s3;
05397 if (c_bcp == '\0') // we reached the end
05398 {
05399 Text_PaintCenter(x, y, scale, color, s1, adjust);
05400 break;
05401 }
05402 }
05403 }
05404 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 348 of file ui_main.c. References h(), height, s, t, trap_R_DrawStretchPic(), UI_AdjustFrom640(), w, width, x, and y. Referenced by Text_Paint(), Text_Paint_Limit(), and Text_PaintWithCursor(). 00348 {
00349 float w, h;
00350 w = width * scale;
00351 h = height * scale;
00352 UI_AdjustFrom640( &x, &y, &w, &h );
00353 trap_R_DrawStretchPic( x, y, w, h, s, t, s2, t2, hShader );
00354 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 424 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::bigFont, colorBlack, ColorIndex, count, g_color_table, glyphInfo_t::glyph, fontInfo_t::glyphs, fontInfo_t::glyphScale, glyphInfo_t::imageHeight, glyphInfo_t::imageWidth, ITEM_TEXTSTYLE_SHADOWED, limit, memcpy(), NULL, Q_IsColorString, displayContextDef_t::realTime, glyphInfo_t::s, s, glyphInfo_t::s2, cachedAssets_t::smallFont, strlen(), glyphInfo_t::t, glyphInfo_t::t2, Text_PaintChar(), cachedAssets_t::textFont, glyphInfo_t::top, trap_R_SetColor(), ui_bigFont, ui_smallFont, uiInfo_t::uiDC, uiInfo, vmCvar_t::value, x, glyphInfo_t::xSkip, and y. 00424 {
00425 int len, count;
00426 vec4_t newColor;
00427 glyphInfo_t *glyph, *glyph2;
00428 float yadj;
00429 float useScale;
00430 fontInfo_t *font = &uiInfo.uiDC.Assets.textFont;
00431 if (scale <= ui_smallFont.value) {
00432 font = &uiInfo.uiDC.Assets.smallFont;
00433 } else if (scale >= ui_bigFont.value) {
00434 font = &uiInfo.uiDC.Assets.bigFont;
00435 }
00436 useScale = scale * font->glyphScale;
00437 if (text) {
00438 const char *s = text; // bk001206 - unsigned
00439 trap_R_SetColor( color );
00440 memcpy(&newColor[0], &color[0], sizeof(vec4_t));
00441 len = strlen(text);
00442 if (limit > 0 && len > limit) {
00443 len = limit;
00444 }
00445 count = 0;
00446 glyph2 = &font->glyphs[ (int) cursor]; // bk001206 - possible signed char
00447 while (s && *s && count < len) {
00448 glyph = &font->glyphs[(int)*s]; // TTimo: FIXME: getting nasty warnings without the cast, hopefully this doesn't break the VM build
00449 //int yadj = Assets.textFont.glyphs[text[i]].bottom + Assets.textFont.glyphs[text[i]].top;
00450 //float yadj = scale * (Assets.textFont.glyphs[text[i]].imageHeight - Assets.textFont.glyphs[text[i]].height);
00451 if ( Q_IsColorString( s ) ) {
00452 memcpy( newColor, g_color_table[ColorIndex(*(s+1))], sizeof( newColor ) );
00453 newColor[3] = color[3];
00454 trap_R_SetColor( newColor );
00455 s += 2;
00456 continue;
00457 } else {
00458 yadj = useScale * glyph->top;
00459 if (style == ITEM_TEXTSTYLE_SHADOWED || style == ITEM_TEXTSTYLE_SHADOWEDMORE) {
00460 int ofs = style == ITEM_TEXTSTYLE_SHADOWED ? 1 : 2;
00461 colorBlack[3] = newColor[3];
00462 trap_R_SetColor( colorBlack );
00463 Text_PaintChar(x + ofs, y - yadj + ofs,
00464 glyph->imageWidth,
00465 glyph->imageHeight,
00466 useScale,
00467 glyph->s,
00468 glyph->t,
00469 glyph->s2,
00470 glyph->t2,
00471 glyph->glyph);
00472 colorBlack[3] = 1.0;
00473 trap_R_SetColor( newColor );
00474 }
00475 Text_PaintChar(x, y - yadj,
00476 glyph->imageWidth,
00477 glyph->imageHeight,
00478 useScale,
00479 glyph->s,
00480 glyph->t,
00481 glyph->s2,
00482 glyph->t2,
00483 glyph->glyph);
00484
00485 yadj = useScale * glyph2->top;
00486 if (count == cursorPos && !((uiInfo.uiDC.realTime/BLINK_DIVISOR) & 1)) {
00487 Text_PaintChar(x, y - yadj,
00488 glyph2->imageWidth,
00489 glyph2->imageHeight,
00490 useScale,
00491 glyph2->s,
00492 glyph2->t,
00493 glyph2->s2,
00494 glyph2->t2,
00495 glyph2->glyph);
00496 }
00497
00498 x += (glyph->xSkip * useScale);
00499 s++;
00500 count++;
00501 }
00502 }
00503 // need to paint cursor at end of text
00504 if (cursorPos == len && !((uiInfo.uiDC.realTime/BLINK_DIVISOR) & 1)) {
00505 yadj = useScale * glyph2->top;
00506 Text_PaintChar(x, y - yadj,
00507 glyph2->imageWidth,
00508 glyph2->imageHeight,
00509 useScale,
00510 glyph2->s,
00511 glyph2->t,
00512 glyph2->s2,
00513 glyph2->t2,
00514 glyph2->glyph);
00515
00516 }
00517
00518 trap_R_SetColor( NULL );
00519 }
00520 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 276 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::bigFont, count, fontInfo_t::glyphs, fontInfo_t::glyphScale, limit, Q_IsColorString, s, cachedAssets_t::smallFont, strlen(), cachedAssets_t::textFont, ui_bigFont, ui_smallFont, uiInfo_t::uiDC, uiInfo, vmCvar_t::value, and glyphInfo_t::xSkip. Referenced by Text_Paint_Limit(), Text_PaintCenter(), Text_PaintCenter_AutoWrapped(), UI_DrawServerMOTD(), and UI_OwnerDrawWidth(). 00276 {
00277 int count,len;
00278 float out;
00279 glyphInfo_t *glyph;
00280 float useScale;
00281 const char *s = text;
00282 fontInfo_t *font = &uiInfo.uiDC.Assets.textFont;
00283 if (scale <= ui_smallFont.value) {
00284 font = &uiInfo.uiDC.Assets.smallFont;
00285 } else if (scale >= ui_bigFont.value) {
00286 font = &uiInfo.uiDC.Assets.bigFont;
00287 }
00288 useScale = scale * font->glyphScale;
00289 out = 0;
00290 if (text) {
00291 len = strlen(text);
00292 if (limit > 0 && len > limit) {
00293 len = limit;
00294 }
00295 count = 0;
00296 while (s && *s && count < len) {
00297 if ( Q_IsColorString(s) ) {
00298 s += 2;
00299 continue;
00300 } else {
00301 glyph = &font->glyphs[(int)*s];
00302 out += glyph->xSkip;
00303 s++;
00304 count++;
00305 }
00306 }
00307 }
00308 return out * useScale;
00309 }
|
Here is the call graph for this function:

|
|
Definition at line 1423 of file ui_main.c. References aliasInfo::ai, uiInfo_t::aliasCount, uiInfo_t::aliasList, j, name, aliasInfo::name, Q_stricmp(), and uiInfo. Referenced by UI_OpponentLeaderHead(), and UI_StartSkirmish(). 01423 {
01424 int j;
01425 for (j = 0; j < uiInfo.aliasCount; j++) {
01426 if (Q_stricmp(uiInfo.aliasList[j].name, name) == 0) {
01427 return uiInfo.aliasList[j].ai;
01428 }
01429 }
01430 return "James";
01431 }
|
Here is the call graph for this function:

|
|
Definition at line 1434 of file ui_main.c. References uiInfo_t::characterCount, uiInfo_t::characterList, j, characterInfo::name, name, Q_stricmp(), and uiInfo. Referenced by UI_AIIndexFromName(). 01434 {
01435 int j;
01436 for (j = 0; j < uiInfo.characterCount; j++) {
01437 if (Q_stricmp(name, uiInfo.characterList[j].name) == 0) {
01438 return j;
01439 }
01440 }
01441 return 0;
01442 }
|
Here is the call graph for this function:

|
|
Definition at line 1446 of file ui_main.c. References aliasInfo::ai, uiInfo_t::aliasCount, uiInfo_t::aliasList, j, name, aliasInfo::name, Q_stricmp(), UI_AIIndex(), and uiInfo. 01446 {
01447 int j;
01448 for (j = 0; j < uiInfo.aliasCount; j++) {
01449 if (Q_stricmp(uiInfo.aliasList[j].name, name) == 0) {
01450 return UI_AIIndex(uiInfo.aliasList[j].ai);
01451 }
01452 }
01453 return 0;
01454 }
|
Here is the call graph for this function:

|
|
Definition at line 3692 of file ui_main.c. References serverStatus_s::displayServers, vmCvar_t::integer, serverStatus_s::numDisplayServers, offset, uiInfo_t::serverStatus, serverStatus_s::sortDir, serverStatus_s::sortKey, trap_LAN_CompareServers(), UI_InsertServerIntoDisplayList(), ui_netSource, and uiInfo. Referenced by UI_BuildServerDisplayList(). 03692 {
03693 int mid, offset, res, len;
03694
03695 // use binary search to insert server
03696 len = uiInfo.serverStatus.numDisplayServers;
03697 mid = len;
03698 offset = 0;
03699 res = 0;
03700 while(mid > 0) {
03701 mid = len >> 1;
03702 //
03703 res = trap_LAN_CompareServers( ui_netSource.integer, uiInfo.serverStatus.sortKey,
03704 uiInfo.serverStatus.sortDir, num, uiInfo.serverStatus.displayServers[offset+mid]);
03705 // if equal
03706 if (res == 0) {
03707 UI_InsertServerIntoDisplayList(num, offset+mid);
03708 return;
03709 }
03710 // if larger
03711 else if (res == 1) {
03712 offset += mid;
03713 len -= mid;
03714 }
03715 // if smaller
03716 else {
03717 len -= mid;
03718 }
03719 }
03720 if (res == 1) {
03721 offset++;
03722 }
03723 UI_InsertServerIntoDisplayList(num, offset);
03724 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2556 of file ui_main.c. References uiInfo_t::botIndex, uiInfo_t::characterCount, K_ENTER, K_MOUSE1, K_MOUSE2, qboolean, trap_Cvar_VariableValue(), UI_GetNumBots(), uiInfo, and value. Referenced by UI_OwnerDrawHandleKey(). 02556 {
02557 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02558 int game = trap_Cvar_VariableValue("g_gametype");
02559 int value = uiInfo.botIndex;
02560
02561 if (key == K_MOUSE2) {
02562 value--;
02563 } else {
02564 value++;
02565 }
02566
02567 if (game >= GT_TEAM) {
02568 if (value >= uiInfo.characterCount + 2) {
02569 value = 0;
02570 } else if (value < 0) {
02571 value = uiInfo.characterCount + 2 - 1;
02572 }
02573 } else {
02574 if (value >= UI_GetNumBots() + 2) {
02575 value = 0;
02576 } else if (value < 0) {
02577 value = UI_GetNumBots() + 2 - 1;
02578 }
02579 }
02580 uiInfo.botIndex = value;
02581 return qtrue;
02582 }
02583 return qfalse;
02584 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2586 of file ui_main.c. References K_ENTER, K_MOUSE1, K_MOUSE2, numSkillLevels, qboolean, uiInfo_t::skillIndex, and uiInfo. Referenced by UI_OwnerDrawHandleKey(). 02586 {
02587 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02588 if (key == K_MOUSE2) {
02589 uiInfo.skillIndex--;
02590 } else {
02591 uiInfo.skillIndex++;
02592 }
02593 if (uiInfo.skillIndex >= numSkillLevels) {
02594 uiInfo.skillIndex = 0;
02595 } else if (uiInfo.skillIndex < 0) {
02596 uiInfo.skillIndex = numSkillLevels-1;
02597 }
02598 return qtrue;
02599 }
02600 return qfalse;
02601 }
|
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 4955 of file ui_main.c. References Com_sprintf(), COM_StripExtension(), filelist, i, j, k, uiInfo_t::q3HeadCount, uiInfo_t::q3HeadIcons, uiInfo_t::q3HeadNames, Q_stricmp(), Q_stricmpn(), strcmp(), strlen(), trap_FS_GetFileList(), trap_R_RegisterShaderNoMip(), uiInfo, and va(). Referenced by _UI_Init(). 04956 {
04957 int numdirs;
04958 int numfiles;
04959 char dirlist[2048];
04960 char filelist[2048];
04961 char skinname[64];
04962 char scratch[256];
04963 char* dirptr;
04964 char* fileptr;
04965 int i;
04966 int j, k, dirty;
04967 int dirlen;
04968 int filelen;
04969
04970 uiInfo.q3HeadCount = 0;
04971
04972 // iterate directory of all player models
04973 numdirs = trap_FS_GetFileList("models/players", "/", dirlist, 2048 );
04974 dirptr = dirlist;
04975 for (i=0; i<numdirs && uiInfo.q3HeadCount < MAX_PLAYERMODELS; i++,dirptr+=dirlen+1)
04976 {
04977 dirlen = strlen(dirptr);
04978
04979 if (dirlen && dirptr[dirlen-1]=='/') dirptr[dirlen-1]='\0';
04980
04981 if (!strcmp(dirptr,".") || !strcmp(dirptr,".."))
04982 continue;
04983
04984 // iterate all skin files in directory
04985 numfiles = trap_FS_GetFileList( va("models/players/%s",dirptr), "tga", filelist, 2048 );
04986 fileptr = filelist;
04987 for (j=0; j<numfiles && uiInfo.q3HeadCount < MAX_PLAYERMODELS;j++,fileptr+=filelen+1)
04988 {
04989 filelen = strlen(fileptr);
04990
04991 COM_StripExtension(fileptr,skinname);
04992
04993 // look for icon_????
04994 if (Q_stricmpn(skinname, "icon_", 5) == 0 && !(Q_stricmp(skinname,"icon_blue") == 0 || Q_stricmp(skinname,"icon_red") == 0))
04995 {
04996 if (Q_stricmp(skinname, "icon_default") == 0) {
04997 Com_sprintf( scratch, sizeof(scratch), dirptr);
04998 } else {
04999 Com_sprintf( scratch, sizeof(scratch), "%s/%s",dirptr, skinname + 5);
05000 }
05001 dirty = 0;
05002 for(k=0;k<uiInfo.q3HeadCount;k++) {
05003 if (!Q_stricmp(scratch, uiInfo.q3HeadNames[uiInfo.q3HeadCount])) {
05004 dirty = 1;
05005 break;
05006 }
05007 }
05008 if (!dirty) {
05009 Com_sprintf( uiInfo.q3HeadNames[uiInfo.q3HeadCount], sizeof(uiInfo.q3HeadNames[uiInfo.q3HeadCount]), scratch);
05010 uiInfo.q3HeadIcons[uiInfo.q3HeadCount++] = trap_R_RegisterShaderNoMip(va("models/players/%s/%s",dirptr,skinname));
05011 }
05012 }
05013
05014 }
05015 }
05016
05017 }
|
Here is the call graph for this function:

|
|
Definition at line 3731 of file ui_main.c. References AS_LOCAL, atoi, count, FEEDER_SERVERS, gameTypeInfo::gtEnum, i, Info_ValueForKey(), vmCvar_t::integer, uiInfo_t::joinGameTypes, MAX_STRING_CHARS, Menu_SetFeederSelection(), serverStatus_s::motd, serverStatus_s::motdLen, serverStatus_s::motdWidth, serverStatus_s::nextDisplayRefresh, NULL, serverStatus_s::numDisplayServers, serverStatus_s::numPlayersOnServers, Q_stricmp(), qfalse, qtrue, displayContextDef_t::realTime, serverStatus_s::refreshtime, serverFilters, uiInfo_t::serverStatus, strcpy(), strlen(), trap_Cvar_VariableStringBuffer(), trap_LAN_GetServerCount(), trap_LAN_GetServerInfo(), trap_LAN_GetServerPing(), trap_LAN_MarkServerVisible(), trap_LAN_ServerIsVisible(), UI_BinaryServerInsertion(), ui_browserShowEmpty, ui_browserShowFull, ui_joinGameType, ui_netSource, UI_RemoveServerFromDisplayList(), ui_serverFilterType, uiInfo_t::uiDC, and uiInfo. Referenced by UI_DoServerRefresh(), UI_JoinGameType_HandleKey(), UI_NetFilter_HandleKey(), UI_NetSource_HandleKey(), and UI_RunMenuScript(). 03731 {
03732 int i, count, clients, maxClients, ping, game, len, visible;
03733 char info[MAX_STRING_CHARS];
03734 // qboolean startRefresh = qtrue; TTimo: unused
03735 static int numinvisible;
03736
03737 if (!(force || uiInfo.uiDC.realTime > uiInfo.serverStatus.nextDisplayRefresh)) {
03738 return;
03739 }
03740 // if we shouldn't reset
03741 if ( force == 2 ) {
03742 force = 0;
03743 }
03744
03745 // do motd updates here too
03746 trap_Cvar_VariableStringBuffer( "cl_motdString", uiInfo.serverStatus.motd, sizeof(uiInfo.serverStatus.motd) );
03747 len = strlen(uiInfo.serverStatus.motd);
03748 if (len == 0) {
03749 strcpy(uiInfo.serverStatus.motd, "Welcome to Team Arena!");
03750 len = strlen(uiInfo.serverStatus.motd);
03751 }
03752 if (len != uiInfo.serverStatus.motdLen) {
03753 uiInfo.serverStatus.motdLen = len;
03754 uiInfo.serverStatus.motdWidth = -1;
03755 }
03756
03757 if (force) {
03758 numinvisible = 0;
03759 // clear number of displayed servers
03760 uiInfo.serverStatus.numDisplayServers = 0;
03761 uiInfo.serverStatus.numPlayersOnServers = 0;
03762 // set list box index to zero
03763 Menu_SetFeederSelection(NULL, FEEDER_SERVERS, 0, NULL);
03764 // mark all servers as visible so we store ping updates for them
03765 trap_LAN_MarkServerVisible(ui_netSource.integer, -1, qtrue);
03766 }
03767
03768 // get the server count (comes from the master)
03769 count = trap_LAN_GetServerCount(ui_netSource.integer);
03770 if (count == -1 || (ui_netSource.integer == AS_LOCAL && count == 0) ) {
03771 // still waiting on a response from the master
03772 uiInfo.serverStatus.numDisplayServers = 0;
03773 uiInfo.serverStatus.numPlayersOnServers = 0;
03774 uiInfo.serverStatus.nextDisplayRefresh = uiInfo.uiDC.realTime + 500;
03775 return;
03776 }
03777
03778 visible = qfalse;
03779 for (i = 0; i < count; i++) {
03780 // if we already got info for this server
03781 if (!trap_LAN_ServerIsVisible(ui_netSource.integer, i)) {
03782 continue;
03783 }
03784 visible = qtrue;
03785 // get the ping for this server
03786 ping = trap_LAN_GetServerPing(ui_netSource.integer, i);
03787 if (ping > 0 || ui_netSource.integer == AS_FAVORITES) {
03788
03789 trap_LAN_GetServerInfo(ui_netSource.integer, i, info, MAX_STRING_CHARS);
03790
03791 clients = atoi(Info_ValueForKey(info, "clients"));
03792 uiInfo.serverStatus.numPlayersOnServers += clients;
03793
03794 if (ui_browserShowEmpty.integer == 0) {
03795 if (clients == 0) {
03796 trap_LAN_MarkServerVisible(ui_netSource.integer, i, qfalse);
03797 continue;
03798 }
03799 }
03800
03801 if (ui_browserShowFull.integer == 0) {
03802 maxClients = atoi(Info_ValueForKey(info, "sv_maxclients"));
03803 if (clients == maxClients) {
03804 trap_LAN_MarkServerVisible(ui_netSource.integer, i, qfalse);
03805 continue;
03806 }
03807 }
03808
03809 if (uiInfo.joinGameTypes[ui_joinGameType.integer].gtEnum != -1) {
03810 game = atoi(Info_ValueForKey(info, "gametype"));
03811 if (game != uiInfo.joinGameTypes[ui_joinGameType.integer].gtEnum) {
03812 trap_LAN_MarkServerVisible(ui_netSource.integer, i, qfalse);
03813 continue;
03814 }
03815 }
03816
03817 if (ui_serverFilterType.integer > 0) {
03818 if (Q_stricmp(Info_ValueForKey(info, "game"), serverFilters[ui_serverFilterType.integer].basedir) != 0) {
03819 trap_LAN_MarkServerVisible(ui_netSource.integer, i, qfalse);
03820 continue;
03821 }
03822 }
03823 // make sure we never add a favorite server twice
03824 if (ui_netSource.integer == AS_FAVORITES) {
03825 UI_RemoveServerFromDisplayList(i);
03826 }
03827 // insert the server into the list
03828 UI_BinaryServerInsertion(i);
03829 // done with this server
03830 if (ping > 0) {
03831 trap_LAN_MarkServerVisible(ui_netSource.integer, i, qfalse);
03832 numinvisible++;
03833 }
03834 }
03835 }
03836
03837 uiInfo.serverStatus.refreshtime = uiInfo.uiDC.realTime;
03838
03839 // if there were no servers visible for ping updates
03840 if (!visible) {
03841 // UI_StopServerRefresh();
03842 // uiInfo.serverStatus.nextDisplayRefresh = 0;
03843 }
03844 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2611 of file ui_main.c. References uiInfo_t::currentCrosshair, K_ENTER, K_MOUSE1, K_MOUSE2, NUM_CROSSHAIRS, qboolean, trap_Cvar_Set(), uiInfo, and va(). Referenced by UI_OwnerDrawHandleKey(). 02611 {
02612 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02613 if (key == K_MOUSE2) {
02614 uiInfo.currentCrosshair--;
02615 } else {
02616 uiInfo.currentCrosshair++;
02617 }
02618
02619 if (uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
02620 uiInfo.currentCrosshair = 0;
02621 } else if (uiInfo.currentCrosshair < 0) {
02622 uiInfo.currentCrosshair = NUM_CROSSHAIRS - 1;
02623 }
02624 trap_Cvar_Set("cg_drawCrosshair", va("%d", uiInfo.currentCrosshair));
02625 return qtrue;
02626 }
02627 return qfalse;
02628 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 5406 of file ui_main.c. References colorWhite, n, displayContextDef_t::realTime, s, Text_PaintCenter(), trap_Cvar_VariableValue(), UI_PrintTime(), UI_ReadableSize(), UI_SetColor(), uiInfo_t::uiDC, uiInfo, and va(). Referenced by UI_DrawConnectScreen(). 05406 {
05407 static char dlText[] = "Downloading:";
05408 static char etaText[] = "Estimated time left:";
05409 static char xferText[] = "Transfer rate:";
05410
05411 int downloadSize, downloadCount, downloadTime;
05412 char dlSizeBuf[64], totalSizeBuf[64], xferRateBuf[64], dlTimeBuf[64];
05413 int xferRate;
05414 int leftWidth;
05415 const char *s;
05416
05417 downloadSize = trap_Cvar_VariableValue( "cl_downloadSize" );
05418 downloadCount = trap_Cvar_VariableValue( "cl_downloadCount" );
05419 downloadTime = trap_Cvar_VariableValue( "cl_downloadTime" );
05420
05421 leftWidth = 320;
05422
05423 UI_SetColor(colorWhite);
05424 Text_PaintCenter(centerPoint, yStart + 112, scale, colorWhite, dlText, 0);
05425 Text_PaintCenter(centerPoint, yStart + 192, scale, colorWhite, etaText, 0);
05426 Text_PaintCenter(centerPoint, yStart + 248, scale, colorWhite, xferText, 0);
05427
05428 if (downloadSize > 0) {
05429 s = va( "%s (%d%%)", downloadName, downloadCount * 100 / downloadSize );
05430 } else {
05431 s = downloadName;
05432 }
05433
05434 Text_PaintCenter(centerPoint, yStart+136, scale, colorWhite, s, 0);
05435
05436 UI_ReadableSize( dlSizeBuf, sizeof dlSizeBuf, downloadCount );
05437 UI_ReadableSize( totalSizeBuf, sizeof totalSizeBuf, downloadSize );
05438
05439 if (downloadCount < 4096 || !downloadTime) {
05440 Text_PaintCenter(leftWidth, yStart+216, scale, colorWhite, "estimating", 0);
05441 Text_PaintCenter(leftWidth, yStart+160, scale, colorWhite, va("(%s of %s copied)", dlSizeBuf, totalSizeBuf), 0);
05442 } else {
05443 if ((uiInfo.uiDC.realTime - downloadTime) / 1000) {
05444 xferRate = downloadCount / ((uiInfo.uiDC.realTime - downloadTime) / 1000);
05445 } else {
05446 xferRate = 0;
05447 }
05448 UI_ReadableSize( xferRateBuf, sizeof xferRateBuf, xferRate );
05449
05450 // Extrapolate estimated completion time
05451 if (downloadSize && xferRate) {
05452 int n = downloadSize / xferRate; // estimated time for entire d/l in secs
05453
05454 // We do it in K (/1024) because we'd overflow around 4MB
05455 UI_PrintTime ( dlTimeBuf, sizeof dlTimeBuf,
05456 (n - (((downloadCount/1024) * n) / (downloadSize/1024))) * 1000);
05457
05458 Text_PaintCenter(leftWidth, yStart+216, scale, colorWhite, dlTimeBuf, 0);
05459 Text_PaintCenter(leftWidth, yStart+160, scale, colorWhite, va("(%s of %s copied)", dlSizeBuf, totalSizeBuf), 0);
05460 } else {
05461 Text_PaintCenter(leftWidth, yStart+216, scale, colorWhite, "estimating", 0);
05462 if (downloadSize) {
05463 Text_PaintCenter(leftWidth, yStart+160, scale, colorWhite, va("(%s of %s copied)", dlSizeBuf, totalSizeBuf), 0);
05464 } else {
05465 Text_PaintCenter(leftWidth, yStart+160, scale, colorWhite, va("(%s copied)", dlSizeBuf), 0);
05466 }
05467 }
05468
05469 if (xferRate) {
05470 Text_PaintCenter(leftWidth, yStart+272, scale, colorWhite, va("%s/Sec", xferRateBuf), 0);
05471 }
05472 }
05473 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 1620 of file ui_main.c. References vmCvar_t::integer, uiInfo_t::mapCount, uiInfo_t::mapList, mapInfo::mapName, rect, Text_Paint(), ui_currentMap, ui_currentNetMap, and uiInfo. Referenced by UI_OwnerDraw(). 01620 {
01621 int map = (net) ? ui_currentNetMap.integer : ui_currentMap.integer;
01622 if (map >= 0 && map < uiInfo.mapCount) {
01623 Text_Paint(rect->x, rect->y, scale, color, uiInfo.mapList[map].mapName, 0, 0, textStyle);
01624 }
01625 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1748 of file ui_main.c. References uiInfo_t::botIndex, uiInfo_t::characterCount, uiInfo_t::characterList, characterInfo::name, rect, Text_Paint(), trap_Cvar_VariableValue(), UI_GetBotNameByNumber(), UI_GetNumBots(), uiInfo, and value. Referenced by UI_OwnerDraw(). 01748 {
01749 int value = uiInfo.botIndex;
01750 int game = trap_Cvar_VariableValue("g_gametype");
01751 const char *text = "";
01752 if (game >= GT_TEAM) {
01753 if (value >= uiInfo.characterCount) {
01754 value = 0;
01755 }
01756 text = uiInfo.characterList[value].name;
01757 } else {
01758 if (value >= UI_GetNumBots()) {
01759 value = 0;
01760 }
01761 text = UI_GetBotNameByNumber(value);
01762 }
01763 Text_Paint(rect->x, rect->y, scale, color, text, 0, 0, textStyle);
01764 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1766 of file ui_main.c. References rect, uiInfo_t::skillIndex, skillLevels, Text_Paint(), and uiInfo. Referenced by UI_OwnerDraw(). 01766 {
01767 if (uiInfo.skillIndex >= 0 && uiInfo.skillIndex < numSkillLevels) {
01768 Text_Paint(rect->x, rect->y, scale, color, skillLevels[uiInfo.skillIndex], 0, 0, textStyle);
01769 }
01770 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 592 of file ui_main.c. References h(), SCREEN_HEIGHT, SCREEN_WIDTH, UI_DrawHandlePic(), w, x, and y. 00592 {
00593 int x, y;
00594 x = (SCREEN_WIDTH - w) / 2;
00595 y = (SCREEN_HEIGHT - h) / 2;
00596 UI_DrawHandlePic(x, y, w, h, image);
00597 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 4939 of file ui_main.c. References h(), trap_CIN_DrawCinematic(), trap_CIN_SetExtents(), w, x, and y. 04939 {
04940 trap_CIN_SetExtents(handle, x, y, w, h);
04941 trap_CIN_DrawCinematic(handle);
04942 }
|
Here is the call graph for this function:

|
||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1024 of file ui_main.c. References rect, Text_Paint(), and UI_Cvar_VariableString(). Referenced by UI_OwnerDraw(). 01024 {
01025 Text_Paint(rect->x, rect->y, scale, color, UI_Cvar_VariableString("ui_teamName"), 0, 0, textStyle);
01026 }
|
Here is the call graph for this function:

|
|
Definition at line 5483 of file ui_main.c. References mfield_t::buffer, CA_CHALLENGING, CA_CONNECTED, CA_CONNECTING, CA_LOADING, CA_PRIMED, menucommon_s::callback, color_white, colorWhite, uiClientState_t::connectPacketCount, uiClientState_t::connState, CS_SERVERINFO, Cvar_VariableString(), menufield_s::field, Field_Clear(), menufield_s::generic, Info_ValueForKey(), ITEM_TEXTSTYLE_SHADOWEDMORE, lastConnState, lastLoadingText, Menu_AddItem(), Menu_Cache(), Menu_Paint(), menu_text_color, uiStatic_t::menuBackShader, Menus_FindByName(), uiClientState_t::messageString, MField_Draw(), menucommon_s::name, passwordField, Q_stricmp(), Q_strncpyz(), qtrue, s, SCREEN_HEIGHT, SCREEN_WIDTH, uiClientState_t::servername, strcpy(), Text_PaintCenter(), Text_PaintCenter_AutoWrapped(), trap_Cvar_VariableStringBuffer(), trap_GetClientState(), trap_GetConfigString(), menucommon_s::type, UI_BIGFONT, UI_CENTER, UI_DisplayDownloadInfo(), UI_DrawHandlePic(), UI_DrawProportionalString(), UI_DrawProportionalString_AutoWrapped(), UI_DROPSHADOW, UI_SetColor(), UI_SMALLFONT, uis, uiClientState_t::updateInfoString, va(), mfield_t::widthInChars, menucommon_s::x, and menucommon_s::y. Referenced by vmMain(). 05483 {
05484 char *s;
05485 uiClientState_t cstate;
05486 char info[MAX_INFO_VALUE];
05487 char text[256];
05488 float centerPoint, yStart, scale;
05489
05490 menuDef_t *menu = Menus_FindByName("Connect");
05491
05492
05493 if ( !overlay && menu ) {
05494 Menu_Paint(menu, qtrue);
05495 }
05496
05497 if (!overlay) {
05498 centerPoint = 320;
05499 yStart = 130;
05500 scale = 0.5f;
05501 } else {
05502 centerPoint = 320;
05503 yStart = 32;
05504 scale = 0.6f;
05505 return;
05506 }
05507
05508 // see what information we should display
05509 trap_GetClientState( &cstate );
05510
05511 info[0] = '\0';
05512 if( trap_GetConfigString( CS_SERVERINFO, info, sizeof(info) ) ) {
05513 Text_PaintCenter(centerPoint, yStart, scale, colorWhite, va( "Loading %s", Info_ValueForKey( info, "mapname" )), 0);
05514 }
05515
05516 if (!Q_stricmp(cstate.servername,"localhost")) {
05517 Text_PaintCenter(centerPoint, yStart + 48, scale, colorWhite, va("Starting up..."), ITEM_TEXTSTYLE_SHADOWEDMORE);
05518 } else {
05519 strcpy(text, va("Connecting to %s", cstate.servername));
05520 Text_PaintCenter(centerPoint, yStart + 48, scale, colorWhite,text , ITEM_TEXTSTYLE_SHADOWEDMORE);
05521 }
05522
05523 // display global MOTD at bottom
05524 Text_PaintCenter(centerPoint, 600, scale, colorWhite, Info_ValueForKey( cstate.updateInfoString, "motd" ), 0);
05525 // print any server info (server full, bad version, etc)
05526 if ( cstate.connState < CA_CONNECTED ) {
05527 Text_PaintCenter_AutoWrapped(centerPoint, yStart + 176, 630, 20, scale, colorWhite, cstate.messageString, 0);
05528 }
05529
05530 if ( lastConnState > cstate.connState ) {
05531 lastLoadingText[0] = '\0';
05532 }
05533 lastConnState = cstate.connState;
05534
05535 switch ( cstate.connState ) {
05536 case CA_CONNECTING:
05537 s = va("Awaiting connection...%i", cstate.connectPacketCount);
05538 break;
05539 case CA_CHALLENGING:
05540 s = va("Awaiting challenge...%i", cstate.connectPacketCount);
05541 break;
05542 case CA_CONNECTED: {
05543 char downloadName[MAX_INFO_VALUE];
05544
05545 trap_Cvar_VariableStringBuffer( "cl_downloadName", downloadName, sizeof(downloadName) );
05546 if (*downloadName) {
05547 UI_DisplayDownloadInfo( downloadName, centerPoint, yStart, scale );
05548 return;
05549 }
05550 }
05551 s = "Awaiting gamestate...";
05552 break;
05553 case CA_LOADING:
05554 return;
05555 case CA_PRIMED:
05556 return;
05557 default:
05558 return;
05559 }
05560
05561
05562 if (Q_stricmp(cstate.servername,"localhost")) {
05563 Text_PaintCenter(centerPoint, yStart + 80, scale, colorWhite, s, 0);
05564 }
05565
05566 // password required / connection rejected information goes here
05567 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 1776 of file ui_main.c. References displayContextDef_t::Assets, cachedAssets_t::crosshairShader, uiInfo_t::currentCrosshair, NULL, rect, trap_R_SetColor(), UI_DrawHandlePic(), uiInfo_t::uiDC, and uiInfo. Referenced by UI_OwnerDraw(). 01776 {
01777 trap_R_SetColor( color );
01778 if (uiInfo.currentCrosshair < 0 || uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
01779 uiInfo.currentCrosshair = 0;
01780 }
01781 UI_DrawHandlePic( rect->x, rect->y - rect->h, rect->w, rect->h, uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]);
01782 trap_R_SetColor( NULL );
01783 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 1189 of file ui_main.c. References displayContextDef_t::Assets, uiInfo_t::effectsColor, cachedAssets_t::fxBasePic, cachedAssets_t::fxPic, rect, UI_DrawHandlePic(), uiInfo_t::uiDC, and uiInfo. Referenced by UI_OwnerDraw(). 01189 {
01190 UI_DrawHandlePic( rect->x, rect->y - 14, 128, 8, uiInfo.uiDC.Assets.fxBasePic );
01191 UI_DrawHandlePic( rect->x + uiInfo.effectsColor * 16 + 8, rect->y - 16, 16, 12, uiInfo.uiDC.Assets.fxPic[uiInfo.effectsColor] );
01192 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1046 of file ui_main.c. References uiInfo_t::gameTypes, vmCvar_t::integer, rect, Text_Paint(), ui_gameType, and uiInfo. Referenced by UI_OwnerDraw(). 01046 {
01047 Text_Paint(rect->x, rect->y, scale, color, uiInfo.gameTypes[ui_gameType.integer].gameType, 0, 0, textStyle);
01048 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1931 of file ui_main.c. References glconfig_t::colorBits, glconfig_t::depthBits, glconfig_t::extensions_string, displayContextDef_t::glconfig, i, Q_strncpyz(), rect, glconfig_t::renderer_string, glconfig_t::stencilBits, Text_Paint(), uiInfo_t::uiDC, uiInfo, va(), glconfig_t::vendor_string, glconfig_t::version_string, and y. Referenced by UI_OwnerDraw(). 01931 {
01932 char * eptr;
01933 char buff[1024];
01934 const char *lines[64];
01935 int y, numLines, i;
01936
01937 Text_Paint(rect->x + 2, rect->y, scale, color, va("VENDOR: %s", uiInfo.uiDC.glconfig.vendor_string), 0, 30, textStyle);
01938 Text_Paint(rect->x + 2, rect->y + 15, scale, color, va("VERSION: %s: %s", uiInfo.uiDC.glconfig.version_string,uiInfo.uiDC.glconfig.renderer_string), 0, 30, textStyle);
01939 Text_Paint(rect->x + 2, rect->y + 30, scale, color, va ("PIXELFORMAT: color(%d-bits) Z(%d-bits) stencil(%d-bits)", uiInfo.uiDC.glconfig.colorBits, uiInfo.uiDC.glconfig.depthBits, uiInfo.uiDC.glconfig.stencilBits), 0, 30, textStyle);
01940
01941 // build null terminated extension strings
01942 // TTimo: https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=399
01943 // in TA this was not directly crashing, but displaying a nasty broken shader right in the middle
01944 // brought down the string size to 1024, there's not much that can be shown on the screen anyway
01945 Q_strncpyz(buff, uiInfo.uiDC.glconfig.extensions_string, 1024);
01946 eptr = buff;
01947 y = rect->y + 45;
01948 numLines = 0;
01949 while ( y < rect->y + rect->h && *eptr )
01950 {
01951 while ( *eptr && *eptr == ' ' )
01952 *eptr++ = '\0';
01953
01954 // track start of valid string
01955 if (*eptr && *eptr != ' ') {
01956 lines[numLines++] = eptr;
01957 }
01958
01959 while ( *eptr && *eptr != ' ' )
01960 eptr++;
01961 }
01962
01963 i = 0;
01964 while (i < numLines) {
01965 Text_Paint(rect->x + 2, y, scale, color, lines[i++], 0, 20, textStyle);
01966 if (i < numLines) {
01967 Text_Paint(rect->x + rect->w / 2, y, scale, color, lines[i++], 0, 20, textStyle);
01968 }
01969 y += 10;
01970 if (y > rect->y + rect->h - 11) {
01971 break;
01972 }
01973 }
01974
01975
01976 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1015 of file ui_main.c. References Com_Clamp(), h(), handicapValues, i, rect, Text_Paint(), and trap_Cvar_VariableValue(). Referenced by UI_OwnerDraw(). 01015 {
01016 int i, h;
01017
01018 h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") );
01019 i = 20 - h / 5;
01020
01021 Text_Paint(rect->x, rect->y, scale, color, handicapValues[i], 0, 0, textStyle);
01022 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1058 of file ui_main.c. References vmCvar_t::integer, uiInfo_t::joinGameTypes, uiInfo_t::numJoinGameTypes, rect, Text_Paint(), trap_Cvar_Set(), ui_joinGameType, and uiInfo. Referenced by UI_OwnerDraw(). 01058 {
01059 if (ui_joinGameType.integer < 0 || ui_joinGameType.integer > uiInfo.numJoinGameTypes) {
01060 trap_Cvar_Set("ui_joinGameType", "0");
01061 }
01062 Text_Paint(rect->x, rect->y, scale, color, uiInfo.joinGameTypes[ui_joinGameType.integer].gameType , 0, 0, textStyle);
01063 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1922 of file ui_main.c. References Display_KeyBindPending(), rect, and Text_Paint(). Referenced by UI_OwnerDraw(). 01922 {
01923 // int ofs = 0; TTimo: unused
01924 if (Display_KeyBindPending()) {
01925 Text_Paint(rect->x, rect->y, scale, color, "Waiting for new key... Press ESCAPE to cancel", 0, 0, textStyle);
01926 } else {
01927 Text_Paint(rect->x, rect->y, scale, color, "Press ENTER or CLICK to change, Press BACKSPACE to clear", 0, 0, textStyle);
01928 }
01929 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1219 of file ui_main.c. References uiInfo_t::gameTypes, gameTypeInfo::gtEnum, vmCvar_t::integer, uiInfo_t::mapCount, uiInfo_t::mapList, rect, Text_Paint(), time(), mapInfo::timeToBeat, trap_Cvar_Set(), ui_currentMap, ui_gameType, uiInfo, and va(). Referenced by UI_OwnerDraw(). 01219 {
01220 int minutes, seconds, time;
01221 if (ui_currentMap.integer < 0 || ui_currentMap.integer > uiInfo.mapCount) {
01222 ui_currentMap.integer = 0;
01223 trap_Cvar_Set("ui_currentMap", "0");
01224 }
01225
01226 time = uiInfo.mapList[ui_currentMap.integer].timeToBeat[uiInfo.gameTypes[ui_gameType.integer].gtEnum];
01227
01228 minutes = time / 60;
01229 seconds = time % 60;
01230
01231 Text_Paint(rect->x, rect->y, scale, color, va("%02i:%02i", minutes, seconds), 0, 0, textStyle);
01232 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1346 of file ui_main.c. References vmCvar_t::integer, rect, serverFilters, Text_Paint(), ui_serverFilterType, and va(). Referenced by UI_OwnerDraw(). 01346 {
01347 if (ui_serverFilterType.integer < 0 || ui_serverFilterType.integer > numServerFilters) {
01348 ui_serverFilterType.integer = 0;
01349 }
01350 Text_Paint(rect->x, rect->y, scale, color, va("Filter: %s", serverFilters[ui_serverFilterType.integer].description), 0, 0, textStyle);
01351 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1050 of file ui_main.c. References uiInfo_t::gameTypes, vmCvar_t::integer, uiInfo_t::numGameTypes, rect, Text_Paint(), trap_Cvar_Set(), ui_netGameType, and uiInfo. Referenced by UI_OwnerDraw(). 01050 {
01051 if (ui_netGameType.integer < 0 || ui_netGameType.integer > uiInfo.numGameTypes) {
01052 trap_Cvar_Set("ui_netGameType", "0");
01053 trap_Cvar_Set("ui_actualNetGameType", "0");
01054 }
01055 Text_Paint(rect->x, rect->y, scale, color, uiInfo.gameTypes[ui_netGameType.integer].gameType , 0, 0, textStyle);
01056 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 1329 of file ui_main.c. References serverStatus_s::currentServerCinematic, vmCvar_t::integer, uiInfo_t::mapCount, rect, uiInfo_t::serverStatus, trap_CIN_DrawCinematic(), trap_CIN_RunCinematic(), trap_CIN_SetExtents(), trap_Cvar_Set(), ui_currentNetMap, UI_DrawNetMapPreview(), and uiInfo. Referenced by UI_OwnerDraw(). 01329 {
01330 if (ui_currentNetMap.integer < 0 || ui_currentNetMap.integer > uiInfo.mapCount) {
01331 ui_currentNetMap.integer = 0;
01332 trap_Cvar_Set("ui_currentNetMap", "0");
01333 }
01334
01335 if (uiInfo.serverStatus.currentServerCinematic >= 0) {
01336 trap_CIN_RunCinematic(uiInfo.serverStatus.currentServerCinematic);
01337 trap_CIN_SetExtents(uiInfo.serverStatus.currentServerCinematic, rect->x, rect->y, rect->w, rect->h);
01338 trap_CIN_DrawCinematic(uiInfo.serverStatus.currentServerCinematic);
01339 } else {
01340 UI_DrawNetMapPreview(rect, scale, color);
01341 }
01342 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 1320 of file ui_main.c. References serverStatus_s::currentServerPreview, rect, uiInfo_t::serverStatus, trap_R_RegisterShaderNoMip(), UI_DrawHandlePic(), and uiInfo. Referenced by UI_DrawNetMapCinematic(), and UI_OwnerDraw(). 01320 {
01321
01322 if (uiInfo.serverStatus.currentServerPreview > 0) {
01323 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.serverStatus.currentServerPreview);
01324 } else {
01325 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, trap_R_RegisterShaderNoMip("menu/art/unknownmap"));
01326 }
01327 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1313 of file ui_main.c. References vmCvar_t::integer, netSources, rect, Text_Paint(), ui_netSource, and va(). Referenced by UI_OwnerDraw(). 01313 {
01314 if (ui_netSource.integer < 0 || ui_netSource.integer > numNetSources) {
01315 ui_netSource.integer = 0;
01316 }
01317 Text_Paint(rect->x, rect->y, scale, color, va("Source: %s", netSources[ui_netSource.integer]), 0, 0, textStyle);
01318 }
|
Here is the call graph for this function:

|
|
Definition at line 1480 of file ui_main.c. References LEGS_IDLE, memset(), qfalse, displayContextDef_t::realTime, rect, strcpy(), TORSO_STAND, UI_Cvar_VariableString(), UI_DrawPlayer(), UI_PlayerInfo_SetInfo(), UI_PlayerInfo_SetModel(), UI_RegisterClientModelname(), uiInfo_t::uiDC, uiInfo, updateOpponentModel, vec3_origin, vec3_t, VectorClear, and WP_MACHINEGUN. Referenced by UI_OwnerDraw(). 01480 {
01481 static playerInfo_t info2;
01482 char model[MAX_QPATH];
01483 char headmodel[MAX_QPATH];
01484 char team[256];
01485 vec3_t viewangles;
01486 vec3_t moveangles;
01487
01488 if (updateOpponentModel) {
01489
01490 strcpy(model, UI_Cvar_VariableString("ui_opponentModel"));
01491 strcpy(headmodel, UI_Cvar_VariableString("ui_opponentModel"));
01492 team[0] = '\0';
01493
01494 memset( &info2, 0, sizeof(playerInfo_t) );
01495 viewangles[YAW] = 180 - 10;
01496 viewangles[PITCH] = 0;
01497 viewangles[ROLL] = 0;
01498 VectorClear( moveangles );
01499 UI_PlayerInfo_SetModel( &info2, model, headmodel, "");
01500 UI_PlayerInfo_SetInfo( &info2, LEGS_IDLE, TORSO_STAND, viewangles, vec3_origin, WP_MACHINEGUN, qfalse );
01501 UI_RegisterClientModelname( &info2, model, headmodel, team);
01502 updateOpponentModel = qfalse;
01503 }
01504
01505 UI_DrawPlayer( rect->x, rect->y, rect->w, rect->h, &info2, uiInfo.uiDC.realTime / 2);
01506
01507 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1581 of file ui_main.c. References i, teamInfo::imageName, NULL, rect, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_Cvar_VariableString(), UI_DrawHandlePic(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01581 {
01582 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
01583 if (uiInfo.teamList[i].teamIcon == -1) {
01584 uiInfo.teamList[i].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[i].imageName);
01585 uiInfo.teamList[i].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[i].imageName));
01586 uiInfo.teamList[i].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[i].imageName));
01587 }
01588
01589 trap_R_SetColor( color );
01590 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.teamList[i].teamIcon );
01591 trap_R_SetColor( NULL );
01592 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1594 of file ui_main.c. References i, teamInfo::imageName, NULL, rect, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_Cvar_VariableString(), UI_DrawHandlePic(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01594 {
01595 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
01596 if (uiInfo.teamList[i].teamIcon == -1) {
01597 uiInfo.teamList[i].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[i].imageName);
01598 uiInfo.teamList[i].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[i].imageName));
01599 uiInfo.teamList[i].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[i].imageName));
01600 }
01601
01602 trap_R_SetColor( color );
01603 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.teamList[i].teamIcon_Metal );
01604 trap_R_SetColor( NULL );
01605 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1607 of file ui_main.c. References i, teamInfo::imageName, NULL, rect, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_Cvar_VariableString(), UI_DrawHandlePic(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01607 {
01608 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
01609 if (uiInfo.teamList[i].teamIcon == -1) {
01610 uiInfo.teamList[i].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[i].imageName);
01611 uiInfo.teamList[i].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[i].imageName));
01612 uiInfo.teamList[i].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[i].imageName));
01613 }
01614
01615 trap_R_SetColor( color );
01616 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.teamList[i].teamIcon_Name );
01617 trap_R_SetColor( NULL );
01618 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1627 of file ui_main.c. References rect, Text_Paint(), and UI_Cvar_VariableString(). Referenced by UI_OwnerDraw(). 01627 {
01628 Text_Paint(rect->x, rect->y, scale, color, UI_Cvar_VariableString("ui_opponentName"), 0, 0, textStyle);
01629 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1541 of file ui_main.c. References i, teamInfo::imageName, NULL, rect, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_Cvar_VariableString(), UI_DrawHandlePic(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01541 {
01542 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
01543
01544 if (uiInfo.teamList[i].teamIcon == -1) {
01545 uiInfo.teamList[i].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[i].imageName);
01546 uiInfo.teamList[i].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[i].imageName));
01547 uiInfo.teamList[i].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[i].imageName));
01548 }
01549
01550 trap_R_SetColor( color );
01551 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.teamList[i].teamIcon );
01552 trap_R_SetColor( NULL );
01553 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1555 of file ui_main.c. References i, teamInfo::imageName, NULL, rect, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_Cvar_VariableString(), UI_DrawHandlePic(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01555 {
01556 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
01557 if (uiInfo.teamList[i].teamIcon == -1) {
01558 uiInfo.teamList[i].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[i].imageName);
01559 uiInfo.teamList[i].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[i].imageName));
01560 uiInfo.teamList[i].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[i].imageName));
01561 }
01562
01563 trap_R_SetColor( color );
01564 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.teamList[i].teamIcon_Metal );
01565 trap_R_SetColor( NULL );
01566 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1568 of file ui_main.c. References i, teamInfo::imageName, NULL, rect, teamInfo::teamIcon, teamInfo::teamIcon_Metal, teamInfo::teamIcon_Name, uiInfo_t::teamList, trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_Cvar_VariableString(), UI_DrawHandlePic(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01568 {
01569 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
01570 if (uiInfo.teamList[i].teamIcon == -1) {
01571 uiInfo.teamList[i].teamIcon = trap_R_RegisterShaderNoMip(uiInfo.teamList[i].imageName);
01572 uiInfo.teamList[i].teamIcon_Metal = trap_R_RegisterShaderNoMip(va("%s_metal",uiInfo.teamList[i].imageName));
01573 uiInfo.teamList[i].teamIcon_Name = trap_R_RegisterShaderNoMip(va("%s_name", uiInfo.teamList[i].imageName));
01574 }
01575
01576 trap_R_SetColor( color );
01577 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.teamList[i].teamIcon_Name );
01578 trap_R_SetColor( NULL );
01579 }
|
Here is the call graph for this function:

|
|
Definition at line 1271 of file ui_main.c. References head, LEGS_IDLE, memset(), q3Model, qfalse, displayContextDef_t::realTime, rect, strcpy(), TORSO_STAND, trap_Cvar_VariableValue(), UI_Cvar_VariableString(), UI_DrawPlayer(), UI_PlayerInfo_SetInfo(), UI_PlayerInfo_SetModel(), uiInfo_t::uiDC, uiInfo, updateModel, vec3_origin, vec3_t, VectorClear, and WP_MACHINEGUN. Referenced by UI_OwnerDraw(). 01271 {
01272 static playerInfo_t info;
01273 char model[MAX_QPATH];
01274 char team[256];
01275 char head[256];
01276 vec3_t viewangles;
01277 vec3_t moveangles;
01278
01279 if (trap_Cvar_VariableValue("ui_Q3Model")) {
01280 strcpy(model, UI_Cvar_VariableString("model"));
01281 strcpy(head, UI_Cvar_VariableString("headmodel"));
01282 if (!q3Model) {
01283 q3Model = qtrue;
01284 updateModel = qtrue;
01285 }
01286 team[0] = '\0';
01287 } else {
01288
01289 strcpy(team, UI_Cvar_VariableString("ui_teamName"));
01290 strcpy(model, UI_Cvar_VariableString("team_model"));
01291 strcpy(head, UI_Cvar_VariableString("team_headmodel"));
01292 if (q3Model) {
01293 q3Model = qfalse;
01294 updateModel = qtrue;
01295 }
01296 }
01297 if (updateModel) {
01298 memset( &info, 0, sizeof(playerInfo_t) );
01299 viewangles[YAW] = 180 - 10;
01300 viewangles[PITCH] = 0;
01301 viewangles[ROLL] = 0;
01302 VectorClear( moveangles );
01303 UI_PlayerInfo_SetModel( &info, model, head, team);
01304 UI_PlayerInfo_SetInfo( &info, LEGS_IDLE, TORSO_STAND, viewangles, vec3_origin, WP_MACHINEGUN, qfalse );
01305 // UI_RegisterClientModelname( &info, model, head, team);
01306 updateModel = qfalse;
01307 }
01308
01309 UI_DrawPlayer( rect->x, rect->y, rect->w, rect->h, &info, uiInfo.uiDC.realTime / 2);
01310
01311 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 1127 of file ui_main.c. References CIN_loop, CIN_silent, uiInfo_t::movieIndex, uiInfo_t::movieList, uiInfo_t::previewMovie, rect, trap_CIN_DrawCinematic(), trap_CIN_PlayCinematic(), trap_CIN_RunCinematic(), trap_CIN_SetExtents(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01127 {
01128 if (uiInfo.previewMovie > -2) {
01129 uiInfo.previewMovie = trap_CIN_PlayCinematic(va("%s.roq", uiInfo.movieList[uiInfo.movieIndex]), 0, 0, 0, 0, (CIN_loop | CIN_silent) );
01130 if (uiInfo.previewMovie >= 0) {
01131 trap_CIN_RunCinematic(uiInfo.previewMovie);
01132 trap_CIN_SetExtents(uiInfo.previewMovie, rect->x, rect->y, rect->w, rect->h);
01133 trap_CIN_DrawCinematic(uiInfo.previewMovie);
01134 } else {
01135 uiInfo.previewMovie = -2;
01136 }
01137 }
01138
01139 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1772 of file ui_main.c. References rect, uiInfo_t::redBlue, Text_Paint(), and uiInfo. Referenced by UI_OwnerDraw(). 01772 {
01773 Text_Paint(rect->x, rect->y, scale, color, (uiInfo.redBlue == 0) ? "Red" : "Blue", 0, 0, textStyle);
01774 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1839 of file ui_main.c. References uiInfo_t::playerRefresh, displayContextDef_t::realTime, rect, uiInfo_t::teamLeader, Text_Paint(), UI_BuildPlayerList(), UI_Cvar_VariableString(), uiInfo_t::uiDC, and uiInfo. Referenced by UI_OwnerDraw(). 01839 {
01840 if (uiInfo.uiDC.realTime > uiInfo.playerRefresh) {
01841 uiInfo.playerRefresh = uiInfo.uiDC.realTime + 3000;
01842 UI_BuildPlayerList();
01843 }
01844 Text_Paint(rect->x, rect->y, scale, color, (uiInfo.teamLeader) ? UI_Cvar_VariableString("cg_selectedPlayerName") : UI_Cvar_VariableString("name") , 0, 0, textStyle);
01845 }
|
Here is the call graph for this function:

|
||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1847 of file ui_main.c. References vmCvar_t::integer, LerpColor(), PULSE_DIVISOR, Q_strncpyz(), displayContextDef_t::realTime, rect, serverStatus_s::refreshActive, uiInfo_t::serverStatus, sin(), Text_Paint(), trap_LAN_GetServerCount(), UI_Cvar_VariableString(), ui_netSource, uiInfo_t::uiDC, uiInfo, and va(). Referenced by UI_OwnerDraw(). 01847 {
01848 if (uiInfo.serverStatus.refreshActive) {
01849 vec4_t lowLight, newColor;
01850 lowLight[0] = 0.8 * color[0];
01851 lowLight[1] = 0.8 * color[1];
01852 lowLight[2] = 0.8 * color[2];
01853 lowLight[3] = 0.8 * color[3];
01854 LerpColor(color,lowLight,newColor,0.5+0.5*sin(uiInfo.uiDC.realTime / PULSE_DIVISOR));
01855 Text_Paint(rect->x, rect->y, scale, newColor, va("Getting info for %d servers (ESC to cancel)", trap_LAN_GetServerCount(ui_netSource.integer)), 0, 0, textStyle);
01856 } else {
01857 char buff[64];
01858 Q_strncpyz(buff, UI_Cvar_VariableString(va("ui_lastServerRefresh_%i", ui_netSource.integer)), 64);
01859 Text_Paint(rect->x, rect->y, scale, color, va("Refresh Time: %s", buff), 0, 0, textStyle);
01860 }
01861 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1143 of file ui_main.c. References i, rect, skillLevels, Text_Paint(), and trap_Cvar_VariableValue(). Referenced by UI_OwnerDraw(). 01143 {
01144 int i;
01145 i = trap_Cvar_VariableValue( "g_spSkill" );
01146 if (i < 1 || i > numSkillLevels) {
01147 i = 1;
01148 }
01149 Text_Paint(rect->x, rect->y, scale, color, skillLevels[i-1],0, 0, textStyle);
01150 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
Definition at line 1161 of file ui_main.c. References blue, uiInfo_t::characterCount, uiInfo_t::characterList, vmCvar_t::integer, characterInfo::name, rect, Text_Paint(), trap_Cvar_VariableValue(), ui_actualNetGameType, UI_GetBotNameByNumber(), UI_GetNumBots(), uiInfo, va(), and value. Referenced by UI_OwnerDraw(). 01161 {
01162 // 0 - None
01163 // 1 - Human
01164 // 2..NumCharacters - Bot
01165 int value = trap_Cvar_VariableValue(va(blue ? "ui_blueteam%i" : "ui_redteam%i", num));
01166 const char *text;
01167 if (value <= 0) {
01168 text = "Closed";
01169 } else if (value == 1) {
01170 text = "Human";
01171 } else {
01172 value -= 2;
01173
01174 if (ui_actualNetGameType.integer >= GT_TEAM) {
01175 if (value >= uiInfo.characterCount) {
01176 value = 0;
01177 }
01178 text = uiInfo.characterList[value].name;
01179 } else {
01180 if (value >= UI_GetNumBots()) {
01181 value = 0;
01182 }
01183 text = UI_GetBotNameByNumber(value);
01184 }
01185 }
01186 Text_Paint(rect->x, rect->y, scale, color, text, 0, 0, textStyle);
01187 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 1153 of file ui_main.c. References blue, i, rect, uiInfo_t::teamCount, uiInfo_t::teamList, teamInfo::teamName, Text_Paint(), UI_Cvar_VariableString(), UI_TeamIndexFromName(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01153 {
01154 int i;
01155 i = UI_TeamIndexFromName(UI_Cvar_VariableString((blue) ? "ui_blueTeam" : "ui_redTeam"));
01156 if (i >= 0 && i < uiInfo.teamCount) {
01157 Text_Paint(rect->x, rect->y, scale, color, va("%s: %s", (blue) ? "Blue" : "Red", uiInfo.teamList[i].teamName),0, 0, textStyle);
01158 }
01159 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1354 of file ui_main.c. References i, rect, Text_Paint(), uiInfo_t::tierCount, uiInfo_t::tierList, tierInfo::tierName, trap_Cvar_VariableValue(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01354 {
01355 int i;
01356 i = trap_Cvar_VariableValue( "ui_currentTier" );
01357 if (i < 0 || i >= uiInfo.tierCount) {
01358 i = 0;
01359 }
01360 Text_Paint(rect->x, rect->y, scale, color, va("Tier: %s", uiInfo.tierList[i].tierName),0, 0, textStyle);
01361 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1401 of file ui_main.c. References tierInfo::gameTypes, uiInfo_t::gameTypes, i, j, rect, Text_Paint(), uiInfo_t::tierCount, uiInfo_t::tierList, trap_Cvar_VariableValue(), and uiInfo. Referenced by UI_OwnerDraw(). 01401 {
01402 int i, j;
01403 i = trap_Cvar_VariableValue( "ui_currentTier" );
01404 if (i < 0 || i >= uiInfo.tierCount) {
01405 i = 0;
01406 }
01407 j = trap_Cvar_VariableValue("ui_currentMap");
01408 if (j < 0 || j > MAPS_PER_TIER) {
01409 j = 0;
01410 }
01411
01412 Text_Paint(rect->x, rect->y, scale, color, uiInfo.gameTypes[uiInfo.tierList[i].gameTypes[j]].gameType , 0, 0, textStyle);
01413 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 1363 of file ui_main.c. References i, tierInfo::mapHandles, tierInfo::maps, rect, uiInfo_t::tierCount, uiInfo_t::tierList, trap_Cvar_VariableValue(), trap_R_RegisterShaderNoMip(), UI_DrawHandlePic(), uiInfo, and va(). Referenced by UI_OwnerDraw(). 01363 {
01364 int i;
01365 i = trap_Cvar_VariableValue( "ui_currentTier" );
01366 if (i < 0 || i >= uiInfo.tierCount) {
01367 i = 0;
01368 }
01369
01370 if (uiInfo.tierList[i].mapHandles[index] == -1) {
01371 uiInfo.tierList[i].mapHandles[index] = trap_R_RegisterShaderNoMip(va("levelshots/%s", uiInfo.tierList[i].maps[index]));
01372 }
01373
01374 UI_DrawHandlePic( rect->x, rect->y, rect->w, rect->h, uiInfo.tierList[i].mapHandles[index]);
01375 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 1387 of file ui_main.c. References i, j, tierInfo::maps, rect, Text_Paint(), uiInfo_t::tierCount, uiInfo_t::tierList, trap_Cvar_VariableValue(), UI_EnglishMapName(), and uiInfo. Referenced by UI_OwnerDraw(). 01387 {
01388 int i, j;
01389 i = trap_Cvar_VariableValue( "ui_currentTier" );
01390 if (i < 0 || i >= uiInfo.tierCount) {
01391 i = 0;
01392 }
01393 j = trap_Cvar_VariableValue("ui_currentMap");
01394 if (j < 0 || j > MAPS_PER_TIER) {
01395 j = 0;
01396 }
01397
01398 Text_Paint(rect->x, rect->y, scale, color, UI_EnglishMapName(uiInfo.tierList[i].maps[j]), 0, 0, textStyle);
01399 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2279 of file ui_main.c. References uiInfo_t::effectsColor, K_ENTER, K_MOUSE1, K_MOUSE2, qboolean, trap_Cvar_SetValue(), uiInfo, and uitogamecode. Referenced by UI_OwnerDrawHandleKey(). 02279 {
02280 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02281
02282 if (key == K_MOUSE2) {
02283 uiInfo.effectsColor--;
02284 } else {
02285 uiInfo.effectsColor++;
02286 }
02287
02288 if( uiInfo.effectsColor > 6 ) {
02289 uiInfo.effectsColor = 0;
02290 } else if (uiInfo.effectsColor < 0) {
02291 uiInfo.effectsColor = 6;
02292 }
02293
02294 trap_Cvar_SetValue( "color1", uitogamecode[uiInfo.effectsColor] );
02295 return qtrue;
02296 }
02297 return qfalse;
02298 }
|
Here is the call graph for this function:

|
|
Definition at line 1377 of file ui_main.c. References i, uiInfo_t::mapCount, uiInfo_t::mapList, mapInfo::mapLoadName, mapInfo::mapName, Q_stricmp(), and uiInfo. Referenced by UI_DrawTierMapName(). 01377 {
01378 int i;
01379 for (i = 0; i < uiInfo.mapCount; i++) {
01380 if (Q_stricmp(map, uiInfo.mapList[i].mapLoadName) == 0) {
01381 return uiInfo.mapList[i].mapName;
01382 }
01383 }
01384 return "";
01385 }
|
Here is the call graph for this function:

|
|
Definition at line 4190 of file ui_main.c. References uiInfo_t::demoCount, FEEDER_MAPS, uiInfo_t::modCount, uiInfo_t::movieCount, uiInfo_t::myTeamCount, serverStatus_s::numDisplayServers, uiInfo_t::numFoundPlayerServers, serverStatusInfo_t::numLines, uiInfo_t::playerCount, uiInfo_t::playerRefresh, uiInfo_t::q3HeadCount, qfalse, qtrue, displayContextDef_t::realTime, uiInfo_t::serverStatus, uiInfo_t::serverStatusInfo, UI_BuildPlayerList(), UI_HeadCountByTeam(), UI_MapCountByGameType(), uiInfo_t::uiDC, and uiInfo. 04190 {
04191 if (feederID == FEEDER_HEADS) {
04192 return UI_HeadCountByTeam();
04193 } else if (feederID == FEEDER_Q3HEADS) {
04194 return uiInfo.q3HeadCount;
04195 } else if (feederID == FEEDER_CINEMATICS) {
04196 return uiInfo.movieCount;
04197 } else if (feederID == FEEDER_MAPS || feederID == FEEDER_ALLMAPS) {
04198 return UI_MapCountByGameType(feederID == FEEDER_MAPS ? qtrue : qfalse);
04199 } else if (feederID == FEEDER_SERVERS) {
04200 return uiInfo.serverStatus.numDisplayServers;
04201 } else if (feederID == FEEDER_SERVERSTATUS) {
04202 return uiInfo.serverStatusInfo.numLines;
04203 } else if (feederID == FEEDER_FINDPLAYER) {
04204 return uiInfo.numFoundPlayerServers;
04205 } else if (feederID == FEEDER_PLAYER_LIST) {
04206 if (uiInfo.uiDC.realTime > uiInfo.playerRefresh) {
04207 uiInfo.playerRefresh = uiInfo.uiDC.realTime + 3000;
04208 UI_BuildPlayerList();
04209 }
04210 return uiInfo.playerCount;
04211 } else if (feederID == FEEDER_TEAM_LIST) {
04212 if (uiInfo.uiDC.realTime > uiInfo.playerRefresh) {
04213 uiInfo.playerRefresh = uiInfo.uiDC.realTime + 3000;
04214 UI_BuildPlayerList();
04215 }
04216 return uiInfo.myTeamCount;
04217 } else if (feederID == FEEDER_MODS) {
04218 return uiInfo.modCount;
04219 } else if (feederID == FEEDER_DEMOS) {
04220 return uiInfo.demoCount;
04221 }
04222 return 0;
04223 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 4392 of file ui_main.c. References uiInfo_t::characterCount, uiInfo_t::characterList, FEEDER_ALLMAPS, characterInfo::headImage, mapInfo::imageName, characterInfo::imageName, mapInfo::levelShot, uiInfo_t::mapCount, uiInfo_t::mapList, uiInfo_t::q3HeadCount, uiInfo_t::q3HeadIcons, qhandle_t, trap_R_RegisterShaderNoMip(), UI_SelectedHead(), UI_SelectedMap(), and uiInfo. 04392 {
04393 if (feederID == FEEDER_HEADS) {
04394 int actual;
04395 UI_SelectedHead(index, &actual);
04396 index = actual;
04397 if (index >= 0 && index < uiInfo.characterCount) {
04398 if (uiInfo.characterList[index].headImage == -1) {
04399 uiInfo.characterList[index].headImage = trap_R_RegisterShaderNoMip(uiInfo.characterList[index].imageName);
04400 }
04401 return uiInfo.characterList[index].headImage;
04402 }
04403 } else if (feederID == FEEDER_Q3HEADS) {
04404 if (index >= 0 && index < uiInfo.q3HeadCount) {
04405 return uiInfo.q3HeadIcons[index];
04406 }
04407 } else if (feederID == FEEDER_ALLMAPS || feederID == FEEDER_MAPS) {
04408 int actual;
04409 UI_SelectedMap(index, &actual);
04410 index = actual;
04411 if (index >= 0 && index < uiInfo.mapCount) {
04412 if (uiInfo.mapList[index].levelShot == -1) {
04413 uiInfo.mapList[index].levelShot = trap_R_RegisterShaderNoMip(uiInfo.mapList[index].imageName);
04414 }
04415 return uiInfo.mapList[index].levelShot;
04416 }
04417 }
04418 return 0;
04419 }
|
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 4280 of file ui_main.c. References atoi, Com_sprintf(), uiInfo_t::demoCount, uiInfo_t::demoList, serverStatus_s::displayServers, FEEDER_MAPS, uiInfo_t::foundPlayerServerNames, Info_ValueForKey(), vmCvar_t::integer, serverStatusInfo_t::lines, MAX_STRING_CHARS, uiInfo_t::modCount, modInfo_t::modDescr, uiInfo_t::modList, modInfo_t::modName, uiInfo_t::movieCount, uiInfo_t::movieList, uiInfo_t::myTeamCount, netnames, serverStatus_s::numDisplayServers, uiInfo_t::numFoundPlayerServers, serverStatusInfo_t::numLines, uiInfo_t::playerCount, uiInfo_t::playerNames, uiInfo_t::q3HeadCount, uiInfo_t::q3HeadNames, displayContextDef_t::realTime, uiInfo_t::serverStatus, uiInfo_t::serverStatusInfo, SORT_CLIENTS, SORT_GAME, SORT_HOST, SORT_MAP, SORT_PING, SORT_PUNKBUSTER, teamArenaGameTypes, uiInfo_t::teamNames, trap_LAN_GetServerInfo(), ui_netSource, UI_SelectedHead(), UI_SelectedMap(), uiInfo_t::uiDC, and uiInfo. 04280 {
04281 static char info[MAX_STRING_CHARS];
04282 static char hostname[1024];
04283 static char clientBuff[32];
04284 static int lastColumn = -1;
04285 static int lastTime = 0;
04286 *handle = -1;
04287 if (feederID == FEEDER_HEADS) {
04288 int actual;
04289 return UI_SelectedHead(index, &actual);
04290 } else if (feederID == FEEDER_Q3HEADS) {
04291 if (index >= 0 && index < uiInfo.q3HeadCount) {
04292 return uiInfo.q3HeadNames[index];
04293 }
04294 } else if (feederID == FEEDER_MAPS || feederID == FEEDER_ALLMAPS) {
04295 int actual;
04296 return UI_SelectedMap(index, &actual);
04297 } else if (feederID == FEEDER_SERVERS) {
04298 if (index >= 0 && index < uiInfo.serverStatus.numDisplayServers) {
04299 int ping, game, punkbuster;
04300 if (lastColumn != column || lastTime > uiInfo.uiDC.realTime + 5000) {
04301 trap_LAN_GetServerInfo(ui_netSource.integer, uiInfo.serverStatus.displayServers[index], info, MAX_STRING_CHARS);
04302 lastColumn = column;
04303 lastTime = uiInfo.uiDC.realTime;
04304 }
04305 ping = atoi(Info_ValueForKey(info, "ping"));
04306 if (ping == -1) {
04307 // if we ever see a ping that is out of date, do a server refresh
04308 // UI_UpdatePendingPings();
04309 }
04310 switch (column) {
04311 case SORT_HOST :
04312 if (ping <= 0) {
04313 return Info_ValueForKey(info, "addr");
04314 } else {
04315 if ( ui_netSource.integer == AS_LOCAL ) {
04316 Com_sprintf( hostname, sizeof(hostname), "%s [%s]",
04317 Info_ValueForKey(info, "hostname"),
04318 netnames[atoi(Info_ValueForKey(info, "nettype"))] );
04319 return hostname;
04320 }
04321 else {
04322 Com_sprintf( hostname, sizeof(hostname), "%s", Info_ValueForKey(info, "hostname"));
04323 return hostname;
04324 }
04325 }
04326 case SORT_MAP : return Info_ValueForKey(info, "mapname");
04327 case SORT_CLIENTS :
04328 Com_sprintf( clientBuff, sizeof(clientBuff), "%s (%s)", Info_ValueForKey(info, "clients"), Info_ValueForKey(info, "sv_maxclients"));
04329 return clientBuff;
04330 case SORT_GAME :
04331 game = atoi(Info_ValueForKey(info, "gametype"));
04332 if (game >= 0 && game < numTeamArenaGameTypes) {
04333 return teamArenaGameTypes[game];
04334 } else {
04335 return "Unknown";
04336 }
04337 case SORT_PING :
04338 if (ping <= 0) {
04339 return "...";
04340 } else {
04341 return Info_ValueForKey(info, "ping");
04342 }
04343 case SORT_PUNKBUSTER:
04344 punkbuster = atoi(Info_ValueForKey(info, "punkbuster"));
04345 if ( punkbuster ) {
04346 return "Yes";
04347 } else {
04348 return "No";
04349 }
04350 }
04351 }
04352 } else if (feederID == FEEDER_SERVERSTATUS) {
04353 if ( index >= 0 && index < uiInfo.serverStatusInfo.numLines ) {
04354 if ( column >= 0 && column < 4 ) {
04355 return uiInfo.serverStatusInfo.lines[index][column];
04356 }
04357 }
04358 } else if (feederID == FEEDER_FINDPLAYER) {
04359 if ( index >= 0 && index < uiInfo.numFoundPlayerServers ) {
04360 //return uiInfo.foundPlayerServerAddresses[index];
04361 return uiInfo.foundPlayerServerNames[index];
04362 }
04363 } else if (feederID == FEEDER_PLAYER_LIST) {
04364 if (index >= 0 && index < uiInfo.playerCount) {
04365 return uiInfo.playerNames[index];
04366 }
04367 } else if (feederID == FEEDER_TEAM_LIST) {
04368 if (index >= 0 && index < uiInfo.myTeamCount) {
04369 return uiInfo.teamNames[index];
04370 }
04371 } else if (feederID == FEEDER_MODS) {
04372 if (index >= 0 && index < uiInfo.modCount) {
04373 if (uiInfo.modList[index].modDescr && *uiInfo.modList[index].modDescr) {
04374 return uiInfo.modList[index].modDescr;
04375 } else {
04376 return uiInfo.modList[index].modName;
04377 }
04378 }
04379 } else if (feederID == FEEDER_CINEMATICS) {
04380 if (index >= 0 && index < uiInfo.movieCount) {
04381 return uiInfo.movieList[index];
04382 }
04383 } else if (feederID == FEEDER_DEMOS) {
04384 if (index >= 0 && index < uiInfo.demoCount) {
04385 return uiInfo.demoList[index];
04386 }
04387 }
04388 return "";
04389 }
|
Here is the call graph for this function:

|
||||||||||||
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 2327 of file ui_main.c. References FEEDER_MAPS, uiInfo_t::gameTypes, gameTypeInfo::gtEnum, vmCvar_t::integer, K_ENTER, K_MOUSE1, K_MOUSE2, uiInfo_t::mapList, Menu_SetFeederSelection(), NULL, uiInfo_t::numGameTypes, qboolean, qtrue, trap_Cvar_Set(), ui_currentMap, ui_gameType, UI_LoadBestScores(), UI_MapCountByGameType(), UI_SetCapFragLimits(), uiInfo, and va(). Referenced by UI_OwnerDrawHandleKey(), UI_RunMenuScript(), and UI_StartSkirmish(). 02327 {
02328 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02329 int oldCount = UI_MapCountByGameType(qtrue);
02330
02331 // hard coded mess here
02332 if (key == K_MOUSE2) {
02333 ui_gameType.integer--;
02334 if (ui_gameType.integer == 2) {
02335 ui_gameType.integer = 1;
02336 } else if (ui_gameType.integer < 2) {
02337 ui_gameType.integer = uiInfo.numGameTypes - 1;
02338 }
02339 } else {
02340 ui_gameType.integer++;
02341 if (ui_gameType.integer >= uiInfo.numGameTypes) {
02342 ui_gameType.integer = 1;
02343 } else if (ui_gameType.integer == 2) {
02344 ui_gameType.integer = 3;
02345 }
02346 }
02347
02348 if (uiInfo.gameTypes[ui_gameType.integer].gtEnum == GT_TOURNAMENT) {
02349 trap_Cvar_Set("ui_Q3Model", "1");
02350 } else {
02351 trap_Cvar_Set("ui_Q3Model", "0");
02352 }
02353
02354 trap_Cvar_Set("ui_gameType", va("%d", ui_gameType.integer));
02355 UI_SetCapFragLimits(qtrue);
02356 UI_LoadBestScores(uiInfo.mapList[ui_currentMap.integer].mapLoadName, uiInfo.gameTypes[ui_gameType.integer].gtEnum);
02357 if (resetMap && oldCount != UI_MapCountByGameType(qtrue)) {
02358 trap_Cvar_Set( "ui_currentMap", "0");
02359 Menu_SetFeederSelection(NULL, FEEDER_MAPS, 0, NULL);
02360 }
02361 return qtrue;
02362 }
02363 return qfalse;
02364 }
|
Here is the call graph for this function:

|
|
Definition at line 4259 of file ui_main.c. References mapInfo::active, c, i, uiInfo_t::mapCount, uiInfo_t::mapList, and uiInfo. Referenced by UI_RunMenuScript(). 04259 {
04260 int i, c;
04261 c = 0;
04262 for (i = 0; i < uiInfo.mapCount; i++) {
04263 if (uiInfo.mapList[i].active) {
04264 if (i == actual) {
04265 return c;
04266 }
04267 c++;
04268 }
04269 }
04270 return 0;
04271 }
|
|
||||||||||||
|
Definition at line 3905 of file ui_main.c. References Com_sprintf(), i, MAX_SERVERSTATUS_LINES, memset(), name, NULL, p, Q_strncpyz(), strchr(), strlen(), trap_LAN_ServerStatus(), and UI_SortServerStatusInfo(). Referenced by UI_BuildFindPlayerList(), and UI_BuildServerStatus(). 03905 {
03906 char *p, *score, *ping, *name;
03907 int i, len;
03908
03909 if (!info) {
03910 trap_LAN_ServerStatus( serverAddress, NULL, 0);
03911 return qfalse;
03912 }
03913 memset(info, 0, sizeof(*info));
03914 if ( trap_LAN_ServerStatus( serverAddress, info->text, sizeof(info->text)) ) {
03915 Q_strncpyz(info->address, serverAddress, sizeof(info->address));
03916 p = info->text;
03917 info->numLines = 0;
03918 info->lines[info->numLines][0] = "Address";
03919 info->lines[info->numLines][1] = "";
03920 info->lines[info->numLines][2] = "";
03921 info->lines[info->numLines][3] = info->address;
03922 info->numLines++;
03923 // get the cvars
03924 while (p && *p) {
03925 p = strchr(p, '\\');
03926 if (!p) break;
03927 *p++ = '\0';
03928 if (*p == '\\')
03929 break;
03930 info->lines[info->numLines][0] = p;
03931 info->lines[info->numLines][1] = "";
03932 info->lines[info->numLines][2] = "";
03933 p = strchr(p, '\\');
03934 if (!p) break;
03935 *p++ = '\0';
03936 info->lines[info->numLines][3] = p;
03937
03938 info->numLines++;
03939 if (info->numLines >= MAX_SERVERSTATUS_LINES)
03940 break;
03941 }
03942 // get the player list
03943 if (info->numLines < MAX_SERVERSTATUS_LINES-3) {
03944 // empty line
03945 info->lines[info->numLines][0] = "";
03946 info->lines[info->numLines][1] = "";
03947 info->lines[info->numLines][2] = "";
03948 info->lines[info->numLines][3] = "";
03949 info->numLines++;
03950 // header
03951 info->lines[info->numLines][0] = "num";
03952 info->lines[info->numLines][1] = "score";
03953 info->lines[info->numLines][2] = "ping";
03954 info->lines[info->numLines][3] = "name";
03955 info->numLines++;
03956 // parse players
03957 i = 0;
03958 len = 0;
03959 while (p && *p) {
03960 if (*p == '\\')
03961 *p++ = '\0';
03962 if (!p)
03963 break;
03964 score = p;
03965 p = strchr(p, ' ');
03966 if (!p)
03967 break;
03968 *p++ = '\0';
03969 ping = p;
03970 p = strchr(p, ' ');
03971 if (!p)
03972 break;
03973 *p++ = '\0';
03974 name = p;
03975 Com_sprintf(&info->pings[len], sizeof(info->pings)-len, "%d", i);
03976 info->lines[info->numLines][0] = &info->pings[len];
03977 len += strlen(&info->pings[len]) + 1;
03978 info->lines[info->numLines][1] = score;
03979 info->lines[info->numLines][2] = ping;
03980 info->lines[info->numLines][3] = name;
03981 info->numLines++;
03982 if (info->numLines >= MAX_SERVERSTATUS_LINES)
03983 break;
03984 p = strchr(p, '\\');
03985 if (!p)
03986 break;
03987 *p++ = '\0';
03988 //
03989 i++;
03990 }
03991 }
03992 UI_SortServerStatusInfo( info );
03993 return qtrue;
03994 }
03995 return qfalse;
03996 }
|
Here is the call graph for this function:

|
|
Definition at line 3540 of file ui_main.c. 03540 {
03541 }
|
|
|
Definition at line 2740 of file ui_main.c. 02740 {
02741 return 0;
02742 }
|
|
||||||||||||||||
|
Definition at line 2259 of file ui_main.c. References Com_Clamp(), h(), K_ENTER, K_MOUSE1, K_MOUSE2, qboolean, trap_Cvar_Set(), trap_Cvar_VariableValue(), and va(). Referenced by UI_OwnerDrawHandleKey(). 02259 {
02260 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02261 int h;
02262 h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") );
02263 if (key == K_MOUSE2) {
02264 h -= 5;
02265 } else {
02266 h += 5;
02267 }
02268 if (h > 100) {
02269 h = 5;
02270 } else if (h < 0) {
02271 h = 100;
02272 }
02273 trap_Cvar_Set( "handicap", va( "%i", h) );
02274 return qtrue;
02275 }
02276 return qfalse;
02277 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 3574 of file ui_main.c. References Com_sprintf(), FS_READ, qboolean, test(), and trap_FS_FOpenFile(). Referenced by UI_HeadCountByTeam(). 03574 {
03575 char test[1024];
03576
03577 Com_sprintf( test, sizeof( test ), "models/players/%s/%s/lower_default.skin", base, team );
03578
03579 if (trap_FS_FOpenFile(test, 0, FS_READ)) {
03580 return qtrue;
03581 }
03582 Com_sprintf( test, sizeof( test ), "models/players/characters/%s/%s/lower_default.skin", base, team );
03583
03584 if (trap_FS_FOpenFile(test, 0, FS_READ)) {
03585 return qtrue;
03586 }
03587 return qfalse;
03588 }
|
Here is the call graph for this function:

|
|
Definition at line 3595 of file ui_main.c. References characterInfo::active, aliasInfo::ai, uiInfo_t::aliasCount, uiInfo_t::aliasList, characterInfo::base, c, uiInfo_t::characterCount, uiInfo_t::characterList, characterInfo::headImage, i, init(), j, k, characterInfo::name, aliasInfo::name, Q_stricmp(), characterInfo::reference, uiInfo_t::teamCount, uiInfo_t::teamList, teamInfo::teamMembers, teamInfo::teamName, UI_Cvar_VariableString(), UI_hasSkinForBase(), UI_TeamIndexFromName(), and uiInfo. Referenced by UI_ClanName_HandleKey(), and UI_FeederCount(). 03595 {
03596 static int init = 0;
03597 int i, j, k, c, tIndex;
03598
03599 c = 0;
03600 if (!init) {
03601 for (i = 0; i < uiInfo.characterCount; i++) {
03602 uiInfo.characterList[i].reference = 0;
03603 for (j = 0; j < uiInfo.teamCount; j++) {
03604 if (UI_hasSkinForBase(uiInfo.characterList[i].base, uiInfo.teamList[j].teamName)) {
03605 uiInfo.characterList[i].reference |= (1<<j);
03606 }
03607 }
03608 }
03609 init = 1;
03610 }
03611
03612 tIndex = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
03613
03614 // do names
03615 for (i = 0; i < uiInfo.characterCount; i++) {
03616 uiInfo.characterList[i].active = qfalse;
03617 for(j = 0; j < TEAM_MEMBERS; j++) {
03618 if (uiInfo.teamList[tIndex].teamMembers[j] != NULL) {
03619 if (uiInfo.characterList[i].reference&(1<<tIndex)) {// && Q_stricmp(uiInfo.teamList[tIndex].teamMembers[j], uiInfo.characterList[i].name)==0) {
03620 uiInfo.characterList[i].active = qtrue;
03621 c++;
03622 break;
03623 }
03624 }
03625 }
03626 }
03627
03628 // and then aliases
03629 for(j = 0; j < TEAM_MEMBERS; j++) {
03630 for(k = 0; k < uiInfo.aliasCount; k++) {
03631 if (uiInfo.aliasList[k].name != NULL) {
03632 if (Q_stricmp(uiInfo.teamList[tIndex].teamMembers[j], uiInfo.aliasList[k].name)==0) {
03633 for (i = 0; i < uiInfo.characterCount; i++) {
03634 if (uiInfo.characterList[i].headImage != -1 && uiInfo.characterList[i].reference&(1<<tIndex) && Q_stricmp(uiInfo.aliasList[k].ai, uiInfo.characterList[i].name)==0) {
03635 if (uiInfo.characterList[i].active == qfalse) {
03636 uiInfo.characterList[i].active = qtrue;
03637 c++;
03638 }
03639 break;
03640 }
03641 }
03642 }
03643 }
03644 }
03645 }
03646 return c;
03647 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 3654 of file ui_main.c. References serverStatus_s::displayServers, i, serverStatus_s::numDisplayServers, uiInfo_t::serverStatus, and uiInfo. Referenced by UI_BinaryServerInsertion(). 03654 {
03655 int i;
03656
03657 if (position < 0 || position > uiInfo.serverStatus.numDisplayServers ) {
03658 return;
03659 }
03660 //
03661 uiInfo.serverStatus.numDisplayServers++;
03662 for (i = uiInfo.serverStatus.numDisplayServers; i > position; i--) {
03663 uiInfo.serverStatus.displayServers[i] = uiInfo.serverStatus.displayServers[i-1];
03664 }
03665 uiInfo.serverStatus.displayServers[position] = num;
03666 }
|
|
||||||||||||||||
|
Definition at line 2391 of file ui_main.c. References vmCvar_t::integer, K_ENTER, K_MOUSE1, K_MOUSE2, uiInfo_t::numJoinGameTypes, qboolean, qtrue, trap_Cvar_Set(), UI_BuildServerDisplayList(), ui_joinGameType, uiInfo, and va(). Referenced by UI_OwnerDrawHandleKey(). 02391 {
02392 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02393
02394 if (key == K_MOUSE2) {
02395 ui_joinGameType.integer--;
02396 } else {
02397 ui_joinGameType.integer++;
02398 }
02399
02400 if (ui_joinGameType.integer < 0) {
02401 ui_joinGameType.integer = uiInfo.numJoinGameTypes - 1;
02402 } else if (ui_joinGameType.integer >= uiInfo.numJoinGameTypes) {
02403 ui_joinGameType.integer = 0;
02404 }
02405
02406 trap_Cvar_Set( "ui_joinGameType", va("%d", ui_joinGameType.integer));
02407 UI_BuildServerDisplayList(qtrue);
02408 return qtrue;
02409 }
02410 return qfalse;
02411 }
|
Here is the call graph for this function:

|
|
Definition at line 984 of file ui_main.c. References Menu_GetFocused(), Menus_ActivateByName(), Menus_CloseAll(), windowDef_t::name, NULL, qtrue, strcpy(), String_Init(), UI_Cvar_VariableString(), UI_LoadArenas(), UI_LoadMenus(), UI_ParseGameInfo(), and menuDef_t::window. Referenced by UI_ConsoleCommand(). 00984 {
00985 char lastName[1024];
00986 menuDef_t *menu = Menu_GetFocused();
00987 char *menuSet = UI_Cvar_VariableString("ui_menuFiles");
00988 if (menu && menu->window.name) {
00989 strcpy(lastName, menu->window.name);
00990 }
00991 if (menuSet == NULL || menuSet[0] == '\0') {
00992 menuSet = "ui/menus.txt";
00993 }
00994
00995 String_Init();
00996
00997 #ifdef PRE_RELEASE_TADEMO
00998 UI_ParseGameInfo("demogameinfo.txt");
00999 #else
01000 UI_ParseGameInfo("gameinfo.txt");
01001 UI_LoadArenas();
01002 #endif
01003
01004 UI_LoadMenus(menuSet, qtrue);
01005 Menus_CloseAll();
01006 Menus_ActivateByName(lastName);
01007
01008 }
|
Here is the call graph for this function:

|
|
Definition at line 2903 of file ui_main.c. References Com_sprintf(), uiInfo_t::demoCount, uiInfo_t::demoList, i, Q_stricmp(), Q_strupr(), String_Alloc(), strlen(), trap_Cvar_VariableValue(), trap_FS_GetFileList(), and uiInfo. Referenced by UI_RunMenuScript(). 02903 {
02904 char demolist[4096];
02905 char demoExt[32];
02906 char *demoname;
02907 int i, len;
02908
02909 Com_sprintf(demoExt, sizeof(demoExt), "dm_%d", (int)trap_Cvar_VariableValue("protocol"));
02910
02911 uiInfo.demoCount = trap_FS_GetFileList( "demos", demoExt, demolist, 4096 );
02912
02913 Com_sprintf(demoExt, sizeof(demoExt), ".dm_%d", (int)trap_Cvar_VariableValue("protocol"));
02914
02915 if (uiInfo.demoCount) {
02916 if (uiInfo.demoCount > MAX_DEMOS) {
02917 uiInfo.demoCount = MAX_DEMOS;
02918 }
02919 demoname = demolist;
02920 for ( i = 0; i < uiInfo.demoCount; i++ ) {
02921 len = strlen( demoname );
02922 if (!Q_stricmp(demoname + len - strlen(demoExt), demoExt)) {
02923 demoname[len-strlen(demoExt)] = '\0';
02924 }
02925 Q_strupr(demoname);
02926 uiInfo.demoList[i] = String_Alloc(demoname);
02927 demoname += len + 1;
02928 }
02929 }
02930
02931 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 937 of file ui_main.c. References Com_Printf(), vmCvar_t::integer, Load_Menu(), Menu_Reset(), pc_token_t, Q_stricmp(), S_COLOR_RED, S_COLOR_YELLOW, pc_token_s::string, token, trap_Error(), trap_Milliseconds(), trap_PC_FreeSource(), trap_PC_LoadSource(), trap_PC_ReadToken(), ui_new, and va(). Referenced by _UI_Init(), UI_Load(), and UI_LoadNonIngame(). 00937 {
00938 pc_token_t token;
00939 int handle;
00940 int start;
00941
00942 start = trap_Milliseconds();
00943
00944 handle = trap_PC_LoadSource( menuFile );
00945 if (!handle) {
00946 trap_Error( va( S_COLOR_YELLOW "menu file not found: %s, using default\n", menuFile ) );
00947 handle = trap_PC_LoadSource( "ui/menus.txt" );
00948 if (!handle) {
00949 trap_Error( va( S_COLOR_RED "default menu file not found: ui/menus.txt, unable to continue!\n", menuFile ) );
00950 }
00951 }
00952
00953 ui_new.integer = 1;
00954
00955 if (reset) {
00956 Menu_Reset();
00957 }
00958
00959 while ( 1 ) {
00960 if (!trap_PC_ReadToken(handle, &token))
00961 break;
00962 if( token.string[0] == 0 || token.string[0] == '}') {
00963 break;
00964 }
00965
00966 if ( token.string[0] == '}' ) {
00967 break;
00968 }
00969
00970 if (Q_stricmp(token.string, "loadmenu") == 0) {
00971 if (Load_Menu(handle)) {
00972 continue;
00973 } else {
00974 break;
00975 }
00976 }
00977 }
00978
00979 Com_Printf("UI menu load time = %d milli seconds\n", trap_Milliseconds() - start);
00980
00981 trap_PC_FreeSource( handle );
00982 }
|
Here is the call graph for this function:

|
|
Definition at line 2816 of file ui_main.c. References i, uiInfo_t::modCount, modInfo_t::modDescr, uiInfo_t::modList, modInfo_t::modName, String_Alloc(), strlen(), trap_FS_GetFileList(), and uiInfo. Referenced by UI_RunMenuScript(). 02816 {
02817 int numdirs;
02818 char dirlist[2048];
02819 char *dirptr;
02820 char *descptr;
02821 int i;
02822 int dirlen;
02823
02824 uiInfo.modCount = 0;
02825 numdirs = trap_FS_GetFileList( "$modlist", "", dirlist, sizeof(dirlist) );
02826 dirptr = dirlist;
02827 for( i = 0; i < numdirs; i++ ) {
02828 dirlen = strlen( dirptr ) + 1;
02829 descptr = dirptr + dirlen;
02830 uiInfo.modList[uiInfo.modCount].modName = String_Alloc(dirptr);
02831 uiInfo.modList[uiInfo.modCount].modDescr = String_Alloc(descptr);
02832 dirptr += dirlen + strlen(descptr) + 1;
02833 uiInfo.modCount++;
02834 if (uiInfo.modCount >= MAX_MODS) {
02835 break;
02836 }
02837 }
02838
02839 }
|
Here is the call graph for this function:

|
|
Definition at line 2871 of file ui_main.c. References i, uiInfo_t::movieCount, uiInfo_t::movieList, Q_stricmp(), Q_strupr(), String_Alloc(), strlen(), trap_FS_GetFileList(), and uiInfo. Referenced by UI_RunMenuScript(). 02871 {
02872 char movielist[4096];
02873 char *moviename;
02874 int i, len;
02875
02876 uiInfo.movieCount = trap_FS_GetFileList( "video", "roq", movielist, 4096 );
02877
02878 if (uiInfo.movieCount) {
02879 if (uiInfo.movieCount > MAX_MOVIES) {
02880 uiInfo.movieCount = MAX_MOVIES;
02881 }
02882 moviename = movielist;
02883 for ( i = 0; i < uiInfo.movieCount; i++ ) {
02884 len = strlen( moviename );
02885 if (!Q_stricmp(moviename + len - 4,".roq")) {
02886 moviename[len-4] = '\0';
02887 }
02888 Q_strupr(moviename);
02889 uiInfo.movieList[i] = String_Alloc(moviename);
02890 moviename += len + 1;
02891 }
02892 }
02893
02894 }
|
Here is the call graph for this function:

|
|
Definition at line 5225 of file ui_main.c. References uiInfo_t::inGameLoad, NULL, qfalse, UI_Cvar_VariableString(), UI_LoadMenus(), and uiInfo. Referenced by _UI_SetActiveMenu(). 05225 {
05226 const char *menuSet = UI_Cvar_VariableString("ui_menuFiles");
05227 if (menuSet == NULL || menuSet[0] == '\0') {
05228 menuSet = "ui/menus.txt";
05229 }
05230 UI_LoadMenus(menuSet, qfalse);
05231 uiInfo.inGameLoad = qfalse;
05232 }
|
Here is the call graph for this function:

|
|
Definition at line 2847 of file ui_main.c. References count, i, strlen(), trap_FS_GetFileList(), and UI_ParseTeamInfo(). Referenced by _UI_Init(). 02847 {
02848 char teamList[4096];
02849 char *teamName;
02850 int i, len, count;
02851
02852 count = trap_FS_GetFileList( "", "team", teamList, 4096 );
02853
02854 if (count) {
02855 teamName = teamList;
02856 for ( i = 0; i < count; i++ ) {
02857 len = strlen( teamName );
02858 UI_ParseTeamInfo(teamName);
02859 teamName += len + 1;
02860 }
02861 }
02862
02863 }
|
Here is the call graph for this function:

|
|
Definition at line 3548 of file ui_main.c. References mapInfo::active, c, uiInfo_t::gameTypes, gameTypeInfo::gtEnum, i, vmCvar_t::integer, uiInfo_t::mapCount, uiInfo_t::mapList, mapInfo::typeBits, ui_gameType, ui_netGameType, and uiInfo. Referenced by UI_FeederCount(), UI_GameType_HandleKey(), UI_NetGameType_HandleKey(), UI_RunMenuScript(), and UI_StartSkirmish(). 03548 {
03549 int i, c, game;
03550 c = 0;
03551 game = singlePlayer ? uiInfo.gameTypes[ui_gameType.integer].gtEnum : uiInfo.gameTypes[ui_netGameType.integer].gtEnum;
03552 if (game == GT_SINGLE_PLAYER) {
03553 game++;
03554 }
03555 if (game == GT_TEAM) {
03556 game = GT_FFA;
03557 }
03558
03559 for (i = 0; i < uiInfo.mapCount; i++) {
03560 uiInfo.mapList[i].active = qfalse;
03561 if ( uiInfo.mapList[i].typeBits & (1 << game)) {
03562 if (singlePlayer) {
03563 if (!(uiInfo.mapList[i].typeBits & (1 << GT_SINGLE_PLAYER))) {
03564 continue;
03565 }
03566 }
03567 c++;
03568 uiInfo.mapList[i].active = qtrue;
03569 }
03570 }
03571 return c;
03572 }
|
|
||||||||||||||||
|
Definition at line 2524 of file ui_main.c. References vmCvar_t::integer, K_ENTER, K_MOUSE1, K_MOUSE2, numServerFilters, qboolean, qtrue, UI_BuildServerDisplayList(), and ui_serverFilterType. Referenced by UI_OwnerDrawHandleKey(). 02524 {
02525 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02526
02527 if (key == K_MOUSE2) {
02528 ui_serverFilterType.integer--;
02529 } else {
02530 ui_serverFilterType.integer++;
02531 }
02532
02533 if (ui_serverFilterType.integer >= numServerFilters) {
02534 ui_serverFilterType.integer = 0;
02535 } else if (ui_serverFilterType.integer < 0) {
02536 ui_serverFilterType.integer = numServerFilters - 1;
02537 }
02538 UI_BuildServerDisplayList(qtrue);
02539 return qtrue;
02540 }
02541 return qfalse;
02542 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2366 of file ui_main.c. References FEEDER_ALLMAPS, uiInfo_t::gameTypes, vmCvar_t::integer, K_ENTER, K_MOUSE1, K_MOUSE2, Menu_SetFeederSelection(), NULL, uiInfo_t::numGameTypes, qboolean, qfalse, trap_Cvar_Set(), UI_MapCountByGameType(), ui_netGameType, uiInfo, and va(). Referenced by UI_OwnerDrawHandleKey(). 02366 {
02367 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02368
02369 if (key == K_MOUSE2) {
02370 ui_netGameType.integer--;
02371 } else {
02372 ui_netGameType.integer++;
02373 }
02374
02375 if (ui_netGameType.integer < 0) {
02376 ui_netGameType.integer = uiInfo.numGameTypes - 1;
02377 } else if (ui_netGameType.integer >= uiInfo.numGameTypes) {
02378 ui_netGameType.integer = 0;
02379 }
02380
02381 trap_Cvar_Set( "ui_netGameType", va("%d", ui_netGameType.integer));
02382 trap_Cvar_Set( "ui_actualnetGameType", va("%d", uiInfo.gameTypes[ui_netGameType.integer].gtEnum));
02383 trap_Cvar_Set( "ui_currentNetMap", "0");
02384 UI_MapCountByGameType(qfalse);
02385 Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, NULL);
02386 return qtrue;
02387 }
02388 return qfalse;
02389 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2495 of file ui_main.c. References vmCvar_t::integer, K_ENTER, K_MOUSE1, K_MOUSE2, numNetSources, qboolean, qtrue, trap_Cvar_Set(), UI_BuildServerDisplayList(), ui_netSource, UI_StartServerRefresh(), and va(). Referenced by UI_OwnerDrawHandleKey(). 02495 {
02496 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02497
02498 if (key == K_MOUSE2) {
02499 ui_netSource.integer--;
02500 if (ui_netSource.integer == AS_MPLAYER)
02501 ui_netSource.integer--;
02502 } else {
02503 ui_netSource.integer++;
02504 if (ui_netSource.integer == AS_MPLAYER)
02505 ui_netSource.integer++;
02506 }
02507
02508 if (ui_netSource.integer >= numNetSources) {
02509 ui_netSource.integer = 0;
02510 } else if (ui_netSource.integer < 0) {
02511 ui_netSource.integer = numNetSources - 1;
02512 }
02513
02514 UI_BuildServerDisplayList(qtrue);
02515 if (ui_netSource.integer != AS_GLOBAL) {
02516 UI_StartServerRefresh(qtrue);
02517 }
02518 trap_Cvar_Set( "ui_netSource", va("%d", ui_netSource.integer));
02519 return qtrue;
02520 }
02521 return qfalse;
02522 }
|
Here is the call graph for this function:

|
|
Definition at line 1509 of file ui_main.c. References i, j, uiInfo_t::teamCount, uiInfo_t::teamList, teamInfo::teamName, trap_Cvar_Set(), UI_Cvar_VariableString(), UI_TeamIndexFromName(), and uiInfo. Referenced by UI_OpponentName_HandleKey(). 01509 {
01510 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
01511 int j = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
01512 i++;
01513 if (i >= uiInfo.teamCount) {
01514 i = 0;
01515 }
01516 if (i == j) {
01517 i++;
01518 if ( i >= uiInfo.teamCount) {
01519 i = 0;
01520 }
01521 }
01522 trap_Cvar_Set( "ui_opponentName", uiInfo.teamList[i].teamName );
01523 }
|
Here is the call graph for this function:

|
|
Definition at line 1459 of file ui_main.c. References UI_AIFromName(), and UI_OpponentLeaderName(). Referenced by UI_OpponentLeaderModel(). 01459 {
01460 const char *leader = UI_OpponentLeaderName();
01461 return UI_AIFromName(leader);
01462 }
|
Here is the call graph for this function:

|
|
Definition at line 1466 of file ui_main.c. References characterInfo::base, uiInfo_t::characterCount, uiInfo_t::characterList, head, i, characterInfo::name, Q_stricmp(), UI_OpponentLeaderHead(), and uiInfo. 01466 {
01467 int i;
01468 const char *head = UI_OpponentLeaderHead();
01469 for (i = 0; i < uiInfo.characterCount; i++) {
01470 if (Q_stricmp(head, uiInfo.characterList[i].name) == 0) {
01471 return uiInfo.characterList[i].base;
01472 }
01473 }
01474 return "James";
01475 }
|
Here is the call graph for this function:

|
|
Definition at line 1417 of file ui_main.c. References i, uiInfo_t::teamList, teamInfo::teamMembers, UI_Cvar_VariableString(), UI_TeamIndexFromName(), and uiInfo. Referenced by UI_OpponentLeaderHead(). 01417 {
01418 int i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_opponentName"));
01419 return uiInfo.teamList[i].teamMembers[0];
01420 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 2544 of file ui_main.c. References K_ENTER, K_MOUSE1, K_MOUSE2, qboolean, UI_NextOpponent(), and UI_PriorOpponent(). Referenced by UI_OwnerDrawHandleKey(). 02544 {
02545 if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
02546 if (key == K_MOUSE2) {
02547 UI_PriorOpponent();
02548 } else {
02549 UI_NextOpponent();
02550 }
02551 return qtrue;
02552 }
02553 return qfalse;
02554 }
|
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||