Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ui_local.h File Reference

#include "../game/q_shared.h"
#include "../cgame/tr_types.h"
#include "ui_public.h"
#include "keycodes.h"
#include "../game/bg_public.h"
#include "ui_shared.h"

Include dependency graph for ui_local.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _tag_menuframework
struct  aliasInfo
struct  characterInfo
struct  gameTypeInfo
struct  lerpFrame_t
struct  mapInfo
struct  menuaction_s
struct  menubitmap_s
struct  menucommon_s
struct  menufield_s
struct  menulist_s
struct  menuradiobutton_s
struct  menuslider_s
struct  menutext_s
struct  mfield_t
struct  modInfo_t
struct  pendingServer_t
struct  pendingServerStatus_t
struct  pinglist_t
struct  playerInfo_t
struct  postGameInfo_s
struct  serverFilter_s
struct  serverStatus_s
struct  serverStatusInfo_t
struct  teamInfo
struct  tierInfo
struct  uiInfo_t
struct  uiStatic_t

Defines

#define ASSET_BACKGROUND   "uiBackground"
#define GAMES_ALL   0
#define GAMES_CTF   4
#define GAMES_FFA   1
#define GAMES_TEAMPLAY   2
#define GAMES_TOURNEY   3
#define LCOLUMN_OFFSET   (-BIGCHAR_WIDTH )
#define MAPS_PER_TIER   3
#define MAX_ADDRESSLENGTH   64
#define MAX_ALIASES   64
#define MAX_DEMOS   256
#define MAX_DISPLAY_SERVERS   2048
#define MAX_EDIT_LINE   256
#define MAX_FAVORITESERVERS   16
#define MAX_FOUNDPLAYER_SERVERS   16
#define MAX_GAMETYPES   16
#define MAX_HEADNAME   32
#define MAX_HEADS   64
#define MAX_HOSTNAMELENGTH   22
#define MAX_LISTBOXWIDTH   59
#define MAX_MAPNAMELENGTH   16
#define MAX_MAPS   128
#define MAX_MENUDEPTH   8
#define MAX_MENUITEMS   96
#define MAX_MODS   64
#define MAX_MOVIES   256
#define MAX_PINGREQUESTS   32
#define MAX_PLAYERMODELS   256
#define MAX_SERVERSTATUS_LINES   128
#define MAX_SERVERSTATUS_TEXT   1024
#define MAX_SPMAPS   16
#define MAX_STATUSLENGTH   64
#define MAX_TEAMS   64
#define MAX_TIERS   16
#define MTYPE_ACTION   2
#define MTYPE_BITMAP   6
#define MTYPE_BTEXT   10
#define MTYPE_FIELD   4
#define MTYPE_NULL   0
#define MTYPE_PTEXT   9
#define MTYPE_RADIOBUTTON   5
#define MTYPE_SCROLLLIST   8
#define MTYPE_SLIDER   1
#define MTYPE_SPINCONTROL   3
#define MTYPE_TEXT   7
#define PLAYERS_PER_TEAM   5
#define QM_ACTIVATED   3
#define QM_GOTFOCUS   1
#define QM_LOSTFOCUS   2
#define QMF_BLINK   0x00000001
#define QMF_CENTER_JUSTIFY   0x00000008
#define QMF_GRAYED   0x00002000
#define QMF_HASMOUSEFOCUS   0x00000200
#define QMF_HIDDEN   0x00001000
#define QMF_HIGHLIGHT   0x00000040
#define QMF_HIGHLIGHT_IF_FOCUS   0x00000080
#define QMF_INACTIVE   0x00004000
#define QMF_LEFT_JUSTIFY   0x00000004
#define QMF_LOWERCASE   0x00040000
#define QMF_MOUSEONLY   0x00000800
#define QMF_NODEFAULTINIT   0x00008000
#define QMF_NOONOFFTEXT   0x00000400
#define QMF_NUMBERSONLY   0x00000020
#define QMF_OWNERDRAW   0x00010000
#define QMF_PULSE   0x00020000
#define QMF_PULSEIFFOCUS   0x00000100
#define QMF_RIGHT_JUSTIFY   0x00000010
#define QMF_SILENT   0x00100000
#define QMF_SMALLFONT   0x00000002
#define QMF_UPPERCASE   0x00080000
#define RCOLUMN_OFFSET   ( BIGCHAR_WIDTH )
#define SLIDER_RANGE   10
#define TEAM_MEMBERS   5
#define UI_FONT_THRESHOLD   0.1
#define UI_NUMFX   7

Typedefs

typedef _tag_menuframework menuframework_s
typedef postGameInfo_s postGameInfo_t
typedef serverFilter_s serverFilter_t
typedef serverStatus_s serverStatus_t

Enumerations

enum  awardType_t {
  AWARD_ACCURACY, AWARD_IMPRESSIVE, AWARD_EXCELLENT, AWARD_GAUNTLET,
  AWARD_FRAGS, AWARD_PERFECT
}

Functions

void _UI_SetActiveMenu (uiMenuCommand_t menu)
void ArenaServers_Cache (void)
void Bitmap_Draw (menubitmap_s *b)
void Bitmap_Init (menubitmap_s *b)
void ConfirmMenu_Cache (void)
void Controls_Cache (void)
void Demos_Cache (void)
void DriverInfo_Cache (void)
void GraphicsOptions_Cache (void)
void InGame_Cache (void)
void Login_Cache (void)
void MainMenu_Cache (void)
sfxHandle_t Menu_ActivateItem (menuframework_s *s, menucommon_s *item)
void Menu_AddItem (menuframework_s *menu, void *item)
void Menu_AdjustCursor (menuframework_s *menu, int dir)
void Menu_Cache (void)
sfxHandle_t Menu_DefaultKey (menuframework_s *s, int key)
void Menu_Draw (menuframework_s *menu)
void Menu_Focus (menucommon_s *m)
void * Menu_ItemAtCursor (menuframework_s *m)
void Menu_SetCursor (menuframework_s *s, int cursor)
void Menu_SetCursorToItem (menuframework_s *m, void *ptr)
void MenuField_Draw (menufield_s *f)
void MenuField_Init (menufield_s *m)
sfxHandle_t MenuField_Key (menufield_s *m, int *key)
void MField_CharEvent (mfield_t *edit, int ch)
void MField_Clear (mfield_t *edit)
void MField_Draw (mfield_t *edit, int x, int y, int style, vec4_t color)
void MField_KeyDownEvent (mfield_t *edit, int key)
void PlayerModel_Cache (void)
void PlayerSettings_Cache (void)
void Preferences_Cache (void)
void RankStatus_Cache (void)
void ScrollList_Draw (menulist_s *l)
sfxHandle_t ScrollList_Key (menulist_s *l, int key)
void ServerInfo_Cache (void)
void ServerOptions_Cache (void)
void Signup_Cache (void)
void SpecifyLeague_Cache (void)
void SpecifyServer_Cache (void)
void StartServer_Cache (void)
void TeamMain_Cache (void)
int trap_Argc (void)
void trap_Argv (int n, char *buffer, int bufferLength)
void trap_CIN_DrawCinematic (int handle)
int trap_CIN_PlayCinematic (const char *arg0, int xpos, int ypos, int width, int height, int bits)
e_status trap_CIN_RunCinematic (int handle)
void trap_CIN_SetExtents (int handle, int x, int y, int w, int h)
e_status trap_CIN_StopCinematic (int handle)
int trap_CM_LerpTag (orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, float frac, const char *tagName)
void trap_Cmd_ExecuteText (int exec_when, const char *text)
void trap_Cvar_Create (const char *var_name, const char *var_value, int flags)
void trap_Cvar_InfoStringBuffer (int bit, char *buffer, int bufsize)
void trap_Cvar_Register (vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags)
void trap_Cvar_Reset (const char *name)
void trap_Cvar_Set (const char *var_name, const char *value)
void trap_Cvar_SetValue (const char *var_name, float value)
void trap_Cvar_Update (vmCvar_t *vmCvar)
void trap_Cvar_VariableStringBuffer (const char *var_name, char *buffer, int bufsize)
float trap_Cvar_VariableValue (const char *var_name)
void trap_Error (const char *string)
void trap_FS_FCloseFile (fileHandle_t f)
int trap_FS_FOpenFile (const char *qpath, fileHandle_t *f, fsMode_t mode)
int trap_FS_GetFileList (const char *path, const char *extension, char *listbuf, int bufsize)
void trap_FS_Read (void *buffer, int len, fileHandle_t f)
int trap_FS_Seek (fileHandle_t f, long offset, int origin)
void trap_FS_Write (const void *buffer, int len, fileHandle_t f)
void trap_GetCDKey (char *buf, int buflen)
void trap_GetClientState (uiClientState_t *state)
void trap_GetClipboardData (char *buf, int bufsize)
int trap_GetConfigString (int index, char *buff, int buffsize)
void trap_GetGlconfig (glconfig_t *glconfig)
void trap_Key_ClearStates (void)
void trap_Key_GetBindingBuf (int keynum, char *buf, int buflen)
int trap_Key_GetCatcher (void)
qboolean trap_Key_GetOverstrikeMode (void)
qboolean trap_Key_IsDown (int keynum)
void trap_Key_KeynumToStringBuf (int keynum, char *buf, int buflen)
void trap_Key_SetBinding (int keynum, const char *binding)
void trap_Key_SetCatcher (int catcher)
void trap_Key_SetOverstrikeMode (qboolean state)
int trap_LAN_AddServer (int source, const char *name, const char *addr)
void trap_LAN_ClearPing (int n)
int trap_LAN_CompareServers (int source, int sortKey, int sortDir, int s1, int s2)
void trap_LAN_GetPing (int n, char *buf, int buflen, int *pingtime)
void trap_LAN_GetPingInfo (int n, char *buf, int buflen)
int trap_LAN_GetPingQueueCount (void)
void trap_LAN_GetServerAddressString (int source, int n, char *buf, int buflen)
int trap_LAN_GetServerCount (int source)
void trap_LAN_GetServerInfo (int source, int n, char *buf, int buflen)
int trap_LAN_GetServerPing (int source, int n)
void trap_LAN_LoadCachedServers ()
void trap_LAN_MarkServerVisible (int source, int n, qboolean visible)
void trap_LAN_RemoveServer (int source, const char *addr)
void trap_LAN_ResetPings (int n)
void trap_LAN_SaveCachedServers ()
int trap_LAN_ServerIsVisible (int source, int n)
int trap_LAN_ServerStatus (const char *serverAddress, char *serverStatus, int maxLen)
qboolean trap_LAN_UpdateVisiblePings (int source)
int trap_MemoryRemaining (void)
int trap_Milliseconds (void)
void trap_Print (const char *string)
void trap_R_AddLightToScene (const vec3_t org, float intensity, float r, float g, float b)
void trap_R_AddPolyToScene (qhandle_t hShader, int numVerts, const polyVert_t *verts)
void trap_R_AddRefEntityToScene (const refEntity_t *re)
void trap_R_ClearScene (void)
void trap_R_DrawStretchPic (float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader)
void trap_R_ModelBounds (clipHandle_t model, vec3_t mins, vec3_t maxs)
void trap_R_RegisterFont (const char *pFontname, int pointSize, fontInfo_t *font)
qhandle_t trap_R_RegisterModel (const char *name)
qhandle_t trap_R_RegisterShaderNoMip (const char *name)
qhandle_t trap_R_RegisterSkin (const char *name)
void trap_R_RemapShader (const char *oldShader, const char *newShader, const char *timeOffset)
void trap_R_RenderScene (const refdef_t *fd)
void trap_R_SetColor (const float *rgba)
int trap_RealTime (qtime_t *qtime)
sfxHandle_t trap_S_RegisterSound (const char *sample, qboolean compressed)
void trap_S_StartBackgroundTrack (const char *intro, const char *loop)
void trap_S_StartLocalSound (sfxHandle_t sfx, int channelNum)
void trap_S_StopBackgroundTrack (void)
void trap_SetCDKey (char *buf)
void trap_SetPbClStatus (int status)
void trap_UpdateScreen (void)
qboolean trap_VerifyCDKey (const char *key, const char *chksum)
void UI_AddBots_Cache (void)
void UI_AddBotsMenu (void)
void UI_AdjustFrom640 (float *x, float *y, float *w, float *h)
int UI_AdjustTimeByGame (int time)
void UI_ArenaServersMenu (void)
char * UI_Argv (int arg)
void UI_BotSelectMenu (char *bot)
void UI_BotSelectMenu_Cache (void)
qboolean UI_CanShowTierVideo (int tier)
void UI_CDKeyMenu (void)
void UI_CDKeyMenu_Cache (void)
void UI_CDKeyMenu_f (void)
void UI_CinematicsMenu (void)
void UI_CinematicsMenu_Cache (void)
void UI_CinematicsMenu_f (void)
float UI_ClampCvar (float min, float max, float value)
void UI_ClearScores ()
void UI_ConfirmMenu (const char *question, void(*draw)(void), void(*action)(qboolean result))
qboolean UI_ConsoleCommand (int realTime)
void UI_ControlsMenu (void)
void UI_CreditMenu (void)
qboolean UI_CursorInRect (int x, int y, int width, int height)
char * UI_Cvar_VariableString (const char *var_name)
void UI_DemosMenu (void)
void UI_DisplayOptionsMenu (void)
void UI_DisplayOptionsMenu_Cache (void)
void UI_DrawBannerString (int x, int y, const char *str, int style, vec4_t color)
void UI_DrawChar (int x, int y, int ch, int style, vec4_t color)
void UI_DrawConnectScreen (qboolean overlay)
void UI_DrawHandlePic (float x, float y, float w, float h, qhandle_t hShader)
void UI_DrawNamedPic (float x, float y, float width, float height, const char *picname)
void UI_DrawPlayer (float x, float y, float w, float h, playerInfo_t *pi, int time)
void UI_DrawProportionalString (int x, int y, const char *str, int style, vec4_t color)
void UI_DrawRect (float x, float y, float width, float height, const float *color)
void UI_DrawSides (float x, float y, float w, float h)
void UI_DrawString (int x, int y, const char *str, int style, vec4_t color)
void UI_DrawTextBox (int x, int y, int width, int lines)
void UI_DrawTopBottom (float x, float y, float w, float h)
void UI_FillRect (float x, float y, float width, float height, const float *color)
void UI_ForceMenuOff (void)
const char * UI_GetArenaInfoByMap (const char *map)
const char * UI_GetArenaInfoByNumber (int num)
int UI_GetAwardLevel (int award)
void UI_GetBestScore (int level, int *score, int *skill)
char * UI_GetBotInfoByName (const char *name)
char * UI_GetBotInfoByNumber (int num)
char * UI_GetBotNameByNumber (int num)
int UI_GetCurrentGame (void)
int UI_GetNumArenas (void)
int UI_GetNumBots (void)
int UI_GetNumSPArenas (void)
int UI_GetNumSPTiers (void)
const char * UI_GetSpecialArenaInfo (const char *tag)
void UI_GraphicsOptionsMenu (void)
void UI_InGameMenu (void)
void UI_Init (void)
void UI_InitGameinfo (void)
qboolean UI_IsFullscreen (void)
void UI_KeyEvent (int key)
void UI_LerpColor (vec4_t a, vec4_t b, vec4_t c, float t)
void UI_Load ()
void UI_LoadArenas (void)
void UI_LoadBestScores (const char *map, int game)
void UI_LoadBots (void)
void UI_LoadConfig_Cache (void)
void UI_LoadConfigMenu (void)
void UI_LoadMenus (const char *menuFile, qboolean reset)
void UI_LogAwardData (int award, int data)
void UI_LoginMenu (void)
void UI_MainMenu (void)
void UI_ModsMenu (void)
void UI_ModsMenu_Cache (void)
void UI_MouseEvent (int dx, int dy)
void UI_NetworkOptionsMenu (void)
void UI_NetworkOptionsMenu_Cache (void)
void UI_NewGame (void)
void UI_PlayerInfo_SetInfo (playerInfo_t *pi, int legsAnim, int torsoAnim, vec3_t viewAngles, vec3_t moveAngles, weapon_t weaponNum, qboolean chat)
void UI_PlayerInfo_SetModel (playerInfo_t *pi, const char *model, const char *headmodel, char *teamName)
void UI_PlayerModelMenu (void)
void UI_PlayerSettingsMenu (void)
void UI_PopMenu (void)
void UI_PreferencesMenu (void)
float UI_ProportionalSizeScale (int style)
int UI_ProportionalStringWidth (const char *str)
void UI_PushMenu (menuframework_s *menu)
void UI_RankStatusMenu (void)
void UI_Refresh (int realtime)
qboolean UI_RegisterClientModelname (playerInfo_t *pi, const char *modelSkinName, const char *headName, const char *teamName)
void UI_RegisterCvars (void)
void UI_RemoveBots_Cache (void)
void UI_RemoveBotsMenu (void)
void UI_Report ()
void UI_SaveConfigMenu (void)
void UI_SaveConfigMenu_Cache (void)
void UI_ServerInfoMenu (void)
void UI_SetActiveMenu (uiMenuCommand_t menu)
void UI_SetBestScore (int level, int score)
void UI_SetColor (const float *rgba)
void UI_SetupMenu (void)
void UI_SetupMenu_Cache (void)
void UI_ShowPostGame (qboolean newHigh)
qboolean UI_ShowTierVideo (int tier)
void UI_Shutdown (void)
void UI_SignupMenu (void)
void UI_SoundOptionsMenu (void)
void UI_SoundOptionsMenu_Cache (void)
void UI_SPArena_Start (const char *arenaInfo)
void UI_SpecifyLeagueMenu (void)
void UI_SpecifyServerMenu (void)
void UI_SPLevelMenu (void)
void UI_SPLevelMenu_Cache (void)
void UI_SPLevelMenu_f (void)
void UI_SPLevelMenu_ReInit (void)
void UI_SPPostgameMenu_Cache (void)
void UI_SPPostgameMenu_f (void)
void UI_SPSkillMenu (const char *arenaInfo)
void UI_SPSkillMenu_Cache (void)
void UI_SPUnlock_f (void)
void UI_SPUnlockMedals_f (void)
void UI_StartDemoLoop (void)
void UI_StartServerMenu (qboolean multiplayer)
void UI_TeamMainMenu (void)
void UI_TeamOrdersMenu (void)
void UI_TeamOrdersMenu_Cache (void)
void UI_TeamOrdersMenu_f (void)
int UI_TierCompleted (int levelWon)
void UI_UpdateCvars (void)
void UI_UpdateScreen (void)

Variables

vec4_t color_black
vec4_t color_blue
vec4_t color_dim
vec4_t color_orange
vec4_t color_red
vec4_t color_white
vec4_t color_yellow
vec4_t list_color
vec4_t listbar_color
qboolean m_entersound
vec4_t menu_black_color
sfxHandle_t menu_buzz_sound
vec4_t menu_dark_color
vec4_t menu_dim_color
vec4_t menu_grayed_color
vec4_t menu_highlight_color
sfxHandle_t menu_in_sound
sfxHandle_t menu_move_sound
sfxHandle_t menu_null_sound
sfxHandle_t menu_out_sound
vec4_t menu_red_color
vec4_t menu_text_color
vec4_t name_color
vec4_t text_color_disabled
vec4_t text_color_highlight
vec4_t text_color_normal
vmCvar_t ui_actualNetGameType
vmCvar_t ui_arenasFile
vmCvar_t ui_bigFont
vmCvar_t ui_botsFile
vmCvar_t ui_brassTime
vmCvar_t ui_browserGameType
vmCvar_t ui_browserMaster
vmCvar_t ui_browserShowEmpty
vmCvar_t ui_browserShowFull
vmCvar_t ui_browserSortKey
vmCvar_t ui_captureLimit
vmCvar_t ui_cdkey
vmCvar_t ui_cdkeychecked
vmCvar_t ui_ctf_capturelimit
vmCvar_t ui_ctf_friendly
vmCvar_t ui_ctf_timelimit
vmCvar_t ui_currentMap
vmCvar_t ui_currentNetMap
vmCvar_t ui_currentOpponent
vmCvar_t ui_currentTier
vmCvar_t ui_dedicated
vmCvar_t ui_drawCrosshair
vmCvar_t ui_drawCrosshairNames
vmCvar_t ui_ffa_fraglimit
vmCvar_t ui_ffa_timelimit
vmCvar_t ui_fragLimit
vmCvar_t ui_gameType
vmCvar_t ui_joinGameType
vmCvar_t ui_lastServerRefresh_0
vmCvar_t ui_lastServerRefresh_1
vmCvar_t ui_lastServerRefresh_2
vmCvar_t ui_lastServerRefresh_3
vmCvar_t ui_mapIndex
vmCvar_t ui_marks
char * ui_medalNames []
char * ui_medalPicNames []
char * ui_medalSounds []
vmCvar_t ui_menuFiles
vmCvar_t ui_netGameType
vmCvar_t ui_netSource
vmCvar_t ui_opponentName
vmCvar_t ui_scoreAccuracy
vmCvar_t ui_scoreAssists
vmCvar_t ui_scoreBase
vmCvar_t ui_scoreDefends
vmCvar_t ui_scoreExcellents
vmCvar_t ui_scoreGauntlets
vmCvar_t ui_scoreImpressives
vmCvar_t ui_scorePerfect
vmCvar_t ui_scoreScore
vmCvar_t ui_scoreShutoutBonus
vmCvar_t ui_scoreSkillBonus
vmCvar_t ui_scoreTeam
vmCvar_t ui_scoreTime
vmCvar_t ui_scoreTimeBonus
vmCvar_t ui_selectedPlayer
vmCvar_t ui_selectedPlayerName
vmCvar_t ui_server1
vmCvar_t ui_server10
vmCvar_t ui_server11
vmCvar_t ui_server12
vmCvar_t ui_server13
vmCvar_t ui_server14
vmCvar_t ui_server15
vmCvar_t ui_server16
vmCvar_t ui_server2
vmCvar_t ui_server3
vmCvar_t ui_server4
vmCvar_t ui_server5
vmCvar_t ui_server6
vmCvar_t ui_server7
vmCvar_t ui_server8
vmCvar_t ui_server9
vmCvar_t ui_serverFilterType
vmCvar_t ui_serverStatusTimeOut
vmCvar_t ui_singlePlayerActive
vmCvar_t ui_smallFont
vmCvar_t ui_spAwards
vmCvar_t ui_spScores1
vmCvar_t ui_spScores2
vmCvar_t ui_spScores3
vmCvar_t ui_spScores4
vmCvar_t ui_spScores5
vmCvar_t ui_spSelection
vmCvar_t ui_spSkill
vmCvar_t ui_spVideos
vmCvar_t ui_team_fraglimit
vmCvar_t ui_team_friendly
vmCvar_t ui_team_timelimit
vmCvar_t ui_tourney_fraglimit
vmCvar_t ui_tourney_timelimit
uiInfo_t uiInfo
uiStatic_t uis
sfxHandle_t weaponChangeSound


Define Documentation

#define ASSET_BACKGROUND   "uiBackground"
 

Definition at line 1112 of file ui_local.h.

#define GAMES_ALL   0
 

Definition at line 627 of file ui_local.h.

#define GAMES_CTF   4
 

Definition at line 631 of file ui_local.h.

#define GAMES_FFA   1
 

Definition at line 628 of file ui_local.h.

#define GAMES_TEAMPLAY   2
 

Definition at line 629 of file ui_local.h.

#define GAMES_TOURNEY   3
 

Definition at line 630 of file ui_local.h.

#define LCOLUMN_OFFSET   (-BIGCHAR_WIDTH )
 

Definition at line 141 of file ui_local.h.

#define MAPS_PER_TIER   3
 

Definition at line 632 of file ui_local.h.

#define MAX_ADDRESSLENGTH   64
 

Definition at line 616 of file ui_local.h.

#define MAX_ALIASES   64
 

Definition at line 608 of file ui_local.h.

#define MAX_DEMOS   256
 

Definition at line 635 of file ui_local.h.

#define MAX_DISPLAY_SERVERS   2048
 

Definition at line 622 of file ui_local.h.

#define MAX_EDIT_LINE   256
 

Definition at line 144 of file ui_local.h.

#define MAX_FAVORITESERVERS   16
 

Definition at line 471 of file ui_local.h.

#define MAX_FOUNDPLAYER_SERVERS   16
 

Definition at line 625 of file ui_local.h.

Referenced by UI_BuildFindPlayerList().

#define MAX_GAMETYPES   16
 

Definition at line 611 of file ui_local.h.

#define MAX_HEADNAME   32
 

Definition at line 609 of file ui_local.h.

#define MAX_HEADS   64
 

Definition at line 607 of file ui_local.h.

#define MAX_HOSTNAMELENGTH   22
 

Definition at line 617 of file ui_local.h.

#define MAX_LISTBOXWIDTH   59
 

Definition at line 620 of file ui_local.h.

#define MAX_MAPNAMELENGTH   16
 

Definition at line 618 of file ui_local.h.

#define MAX_MAPS   128
 

Definition at line 612 of file ui_local.h.

#define MAX_MENUDEPTH   8
 

Definition at line 146 of file ui_local.h.

#define MAX_MENUITEMS   96
 

Definition at line 147 of file ui_local.h.

#define MAX_MODS   64
 

Definition at line 634 of file ui_local.h.

#define MAX_MOVIES   256
 

Definition at line 636 of file ui_local.h.

#define MAX_PINGREQUESTS   32
 

Definition at line 615 of file ui_local.h.

#define MAX_PLAYERMODELS   256
 

Definition at line 637 of file ui_local.h.

#define MAX_SERVERSTATUS_LINES   128
 

Definition at line 623 of file ui_local.h.

Referenced by UI_GetServerStatusInfo().

#define MAX_SERVERSTATUS_TEXT   1024
 

Definition at line 624 of file ui_local.h.

#define MAX_SPMAPS   16
 

Definition at line 613 of file ui_local.h.

#define MAX_STATUSLENGTH   64
 

Definition at line 619 of file ui_local.h.

#define MAX_TEAMS   64
 

Definition at line 610 of file ui_local.h.

#define MAX_TIERS   16
 

Definition at line 633 of file ui_local.h.

#define MTYPE_ACTION   2
 

Definition at line 151 of file ui_local.h.

#define MTYPE_BITMAP   6
 

Definition at line 155 of file ui_local.h.

#define MTYPE_BTEXT   10
 

Definition at line 159 of file ui_local.h.

#define MTYPE_FIELD   4
 

Definition at line 153 of file ui_local.h.

#define MTYPE_NULL   0
 

Definition at line 149 of file ui_local.h.

#define MTYPE_PTEXT   9
 

Definition at line 158 of file ui_local.h.

#define MTYPE_RADIOBUTTON   5
 

Definition at line 154 of file ui_local.h.

#define MTYPE_SCROLLLIST   8
 

Definition at line 157 of file ui_local.h.

#define MTYPE_SLIDER   1
 

Definition at line 150 of file ui_local.h.

#define MTYPE_SPINCONTROL   3
 

Definition at line 152 of file ui_local.h.

#define MTYPE_TEXT   7
 

Definition at line 156 of file ui_local.h.

#define PLAYERS_PER_TEAM   5
 

Definition at line 614 of file ui_local.h.

#define QM_ACTIVATED   3
 

Definition at line 186 of file ui_local.h.

#define QM_GOTFOCUS   1
 

Definition at line 184 of file ui_local.h.

#define QM_LOSTFOCUS   2
 

Definition at line 185 of file ui_local.h.

#define QMF_BLINK   0x00000001
 

Definition at line 161 of file ui_local.h.

#define QMF_CENTER_JUSTIFY   0x00000008
 

Definition at line 164 of file ui_local.h.

#define QMF_GRAYED   0x00002000
 

Definition at line 174 of file ui_local.h.

#define QMF_HASMOUSEFOCUS   0x00000200
 

Definition at line 170 of file ui_local.h.

#define QMF_HIDDEN   0x00001000
 

Definition at line 173 of file ui_local.h.

#define QMF_HIGHLIGHT   0x00000040
 

Definition at line 167 of file ui_local.h.

#define QMF_HIGHLIGHT_IF_FOCUS   0x00000080
 

Definition at line 168 of file ui_local.h.

#define QMF_INACTIVE   0x00004000
 

Definition at line 175 of file ui_local.h.

#define QMF_LEFT_JUSTIFY   0x00000004
 

Definition at line 163 of file ui_local.h.

#define QMF_LOWERCASE   0x00040000
 

Definition at line 179 of file ui_local.h.

#define QMF_MOUSEONLY   0x00000800
 

Definition at line 172 of file ui_local.h.

#define QMF_NODEFAULTINIT   0x00008000
 

Definition at line 176 of file ui_local.h.

#define QMF_NOONOFFTEXT   0x00000400
 

Definition at line 171 of file ui_local.h.

#define QMF_NUMBERSONLY   0x00000020
 

Definition at line 166 of file ui_local.h.

#define QMF_OWNERDRAW   0x00010000
 

Definition at line 177 of file ui_local.h.

#define QMF_PULSE   0x00020000
 

Definition at line 178 of file ui_local.h.

#define QMF_PULSEIFFOCUS   0x00000100
 

Definition at line 169 of file ui_local.h.

#define QMF_RIGHT_JUSTIFY   0x00000010
 

Definition at line 165 of file ui_local.h.

#define QMF_SILENT   0x00100000
 

Definition at line 181 of file ui_local.h.

#define QMF_SMALLFONT   0x00000002
 

Definition at line 162 of file ui_local.h.

#define QMF_UPPERCASE   0x00080000
 

Definition at line 180 of file ui_local.h.

#define RCOLUMN_OFFSET   ( BIGCHAR_WIDTH )
 

Definition at line 140 of file ui_local.h.

#define SLIDER_RANGE   10
 

Definition at line 143 of file ui_local.h.

#define TEAM_MEMBERS   5
 

Definition at line 626 of file ui_local.h.

#define UI_FONT_THRESHOLD   0.1
 

Definition at line 621 of file ui_local.h.

#define UI_NUMFX   7
 

Definition at line 606 of file ui_local.h.


Typedef Documentation

typedef struct _tag_menuframework menuframework_s
 

typedef struct postGameInfo_s postGameInfo_t
 

Referenced by UI_CalcPostGameStats(), UI_ClearScores(), UI_LoadBestScores(), and UI_SetBestScores().

typedef struct serverFilter_s serverFilter_t
 

typedef struct serverStatus_s serverStatus_t
 


Enumeration Type Documentation

enum awardType_t
 

Enumeration values:
AWARD_ACCURACY 
AWARD_IMPRESSIVE 
AWARD_EXCELLENT 
AWARD_GAUNTLET 
AWARD_FRAGS 
AWARD_PERFECT 

Definition at line 1054 of file ui_local.h.

01054              {
01055     AWARD_ACCURACY,
01056     AWARD_IMPRESSIVE,
01057     AWARD_EXCELLENT,
01058     AWARD_GAUNTLET,
01059     AWARD_FRAGS,
01060     AWARD_PERFECT
01061 } awardType_t;


Function Documentation

void _UI_SetActiveMenu uiMenuCommand_t  menu  ) 
 

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:

void ArenaServers_Cache void   ) 
 

Definition at line 1613 of file ui_servers2.c.

References ART_ARROWS0, ART_ARROWS_DOWN, ART_ARROWS_UP, ART_BACK0, ART_BACK1, ART_CONNECT0, ART_CONNECT1, ART_CREATE0, ART_CREATE1, ART_PUNKBUSTER, ART_REFRESH0, ART_REFRESH1, ART_SPECIFY0, ART_SPECIFY1, ART_UNKNOWNMAP, and trap_R_RegisterShaderNoMip().

01613                                 {
01614     trap_R_RegisterShaderNoMip( ART_BACK0 );
01615     trap_R_RegisterShaderNoMip( ART_BACK1 );
01616     trap_R_RegisterShaderNoMip( ART_CREATE0 );
01617     trap_R_RegisterShaderNoMip( ART_CREATE1 );
01618     trap_R_RegisterShaderNoMip( ART_SPECIFY0 );
01619     trap_R_RegisterShaderNoMip( ART_SPECIFY1 );
01620     trap_R_RegisterShaderNoMip( ART_REFRESH0 );
01621     trap_R_RegisterShaderNoMip( ART_REFRESH1 );
01622     trap_R_RegisterShaderNoMip( ART_CONNECT0 );
01623     trap_R_RegisterShaderNoMip( ART_CONNECT1 );
01624     trap_R_RegisterShaderNoMip( ART_ARROWS0  );
01625     trap_R_RegisterShaderNoMip( ART_ARROWS_UP );
01626     trap_R_RegisterShaderNoMip( ART_ARROWS_DOWN );
01627     trap_R_RegisterShaderNoMip( ART_UNKNOWNMAP );
01628     trap_R_RegisterShaderNoMip( ART_PUNKBUSTER );
01629 }

Here is the call graph for this function:

void Bitmap_Draw menubitmap_s b  ) 
 

Definition at line 282 of file ui_qmenu.c.

References b, colorMdGrey, menubitmap_s::errorpic, menucommon_s::flags, menubitmap_s::focuscolor, menubitmap_s::focuspic, menubitmap_s::focusshader, menubitmap_s::generic, h(), menubitmap_s::height, Menu_ItemAtCursor(), menucommon_s::name, NULL, menucommon_s::parent, PULSE_DIVISOR, uiStatic_t::realtime, menubitmap_s::shader, sin(), trap_R_RegisterShaderNoMip(), trap_R_SetColor(), UI_DrawHandlePic(), uis, w, menubitmap_s::width, menucommon_s::x, x, menucommon_s::y, and y.

Referenced by Menu_Draw(), and ServerOptions_LevelshotDraw().

00283 {
00284     float   x;
00285     float   y;
00286     float   w;
00287     float   h;
00288     vec4_t  tempcolor;
00289     float*  color;
00290 
00291     x = b->generic.x;
00292     y = b->generic.y;
00293     w = b->width;
00294     h = b->height;
00295 
00296     if (b->generic.flags & QMF_RIGHT_JUSTIFY)
00297     {
00298         x = x - w;
00299     }
00300     else if (b->generic.flags & QMF_CENTER_JUSTIFY)
00301     {
00302         x = x - w/2;
00303     }
00304 
00305     // used to refresh shader
00306     if (b->generic.name && !b->shader)
00307     {
00308         b->shader = trap_R_RegisterShaderNoMip( b->generic.name );
00309         if (!b->shader && b->errorpic)
00310             b->shader = trap_R_RegisterShaderNoMip( b->errorpic );
00311     }
00312 
00313     if (b->focuspic && !b->focusshader)
00314         b->focusshader = trap_R_RegisterShaderNoMip( b->focuspic );
00315 
00316     if (b->generic.flags & QMF_GRAYED)
00317     {
00318         if (b->shader)
00319         {
00320             trap_R_SetColor( colorMdGrey );
00321             UI_DrawHandlePic( x, y, w, h, b->shader );
00322             trap_R_SetColor( NULL );
00323         }
00324     }
00325     else
00326     {
00327         if (b->shader)
00328             UI_DrawHandlePic( x, y, w, h, b->shader );
00329 
00330         // bk001204 - parentheses
00331         if (  ( (b->generic.flags & QMF_PULSE) 
00332             || (b->generic.flags & QMF_PULSEIFFOCUS) )
00333               && (Menu_ItemAtCursor( b->generic.parent ) == b))
00334         {   
00335             if (b->focuscolor)          
00336             {
00337                 tempcolor[0] = b->focuscolor[0];
00338                 tempcolor[1] = b->focuscolor[1];
00339                 tempcolor[2] = b->focuscolor[2];
00340                 color        = tempcolor;   
00341             }
00342             else
00343                 color = pulse_color;
00344             color[3] = 0.5+0.5*sin(uis.realtime/PULSE_DIVISOR);
00345 
00346             trap_R_SetColor( color );
00347             UI_DrawHandlePic( x, y, w, h, b->focusshader );
00348             trap_R_SetColor( NULL );
00349         }
00350         else if ((b->generic.flags & QMF_HIGHLIGHT) || ((b->generic.flags & QMF_HIGHLIGHT_IF_FOCUS) && (Menu_ItemAtCursor( b->generic.parent ) == b)))
00351         {   
00352             if (b->focuscolor)
00353             {
00354                 trap_R_SetColor( b->focuscolor );
00355                 UI_DrawHandlePic( x, y, w, h, b->focusshader );
00356                 trap_R_SetColor( NULL );
00357             }
00358             else
00359                 UI_DrawHandlePic( x, y, w, h, b->focusshader );
00360         }
00361     }
00362 }

Here is the call graph for this function:

void Bitmap_Init menubitmap_s b  ) 
 

Definition at line 241 of file ui_qmenu.c.

References b, menucommon_s::bottom, menucommon_s::flags, menubitmap_s::focusshader, menubitmap_s::generic, h(), menubitmap_s::height, menucommon_s::left, menucommon_s::right, menubitmap_s::shader, menucommon_s::top, w, menubitmap_s::width, menucommon_s::x, x, menucommon_s::y, and y.

Referenced by Menu_AddItem(), and UI_SPLevelMenu_SetMenuItems().

00242 {
00243     int x;
00244     int y;
00245     int w;
00246     int h;
00247 
00248     x = b->generic.x;
00249     y = b->generic.y;
00250     w = b->width;
00251     h = b->height;
00252     if( w < 0 ) {
00253         w = -w;
00254     }
00255     if( h < 0 ) {
00256         h = -h;
00257     }
00258 
00259     if (b->generic.flags & QMF_RIGHT_JUSTIFY)
00260     {
00261         x = x - w;
00262     }
00263     else if (b->generic.flags & QMF_CENTER_JUSTIFY)
00264     {
00265         x = x - w/2;
00266     }
00267 
00268     b->generic.left   = x;
00269     b->generic.right  = x + w;
00270     b->generic.top    = y;
00271     b->generic.bottom = y + h;
00272 
00273     b->shader      = 0;
00274     b->focusshader = 0;
00275 }

Here is the call graph for this function:

void ConfirmMenu_Cache void   ) 
 

Definition at line 163 of file ui_confirm.c.

References ART_CONFIRM_FRAME, and trap_R_RegisterShaderNoMip().

Referenced by UI_Cache_f(), UI_ConfirmMenu_Style(), and UI_Message().

00163                                {
00164     trap_R_RegisterShaderNoMip( ART_CONFIRM_FRAME );
00165 }

Here is the call graph for this function:

void Controls_Cache void   ) 
 

Definition at line 1651 of file ui_controls2.c.

References ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, and trap_R_RegisterShaderNoMip().

Referenced by Controls_MenuInit(), and UI_Cache_f().

01651                             {
01652     trap_R_RegisterShaderNoMip( ART_BACK0 );
01653     trap_R_RegisterShaderNoMip( ART_BACK1 );
01654     trap_R_RegisterShaderNoMip( ART_FRAMEL );
01655     trap_R_RegisterShaderNoMip( ART_FRAMER );
01656 }

Here is the call graph for this function:

void Demos_Cache void   ) 
 

Definition at line 271 of file ui_demo2.c.

References ART_ARROWLEFT, ART_ARROWRIGHT, ART_ARROWS, ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, ART_GO0, ART_GO1, and trap_R_RegisterShaderNoMip().

Referenced by Demos_MenuInit(), and UI_Cache_f().

00271                          {
00272     trap_R_RegisterShaderNoMip( ART_BACK0 );
00273     trap_R_RegisterShaderNoMip( ART_BACK1 );
00274     trap_R_RegisterShaderNoMip( ART_GO0 );
00275     trap_R_RegisterShaderNoMip( ART_GO1 );
00276     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00277     trap_R_RegisterShaderNoMip( ART_FRAMER );
00278     trap_R_RegisterShaderNoMip( ART_ARROWS );
00279     trap_R_RegisterShaderNoMip( ART_ARROWLEFT );
00280     trap_R_RegisterShaderNoMip( ART_ARROWRIGHT );
00281 }

Here is the call graph for this function:

void DriverInfo_Cache void   ) 
 

Definition at line 122 of file ui_video.c.

References driverinfo_artlist, i, and trap_R_RegisterShaderNoMip().

00123 {
00124     int i;
00125 
00126     // touch all our pics
00127     for (i=0; ;i++)
00128     {
00129         if (!driverinfo_artlist[i])
00130             break;
00131         trap_R_RegisterShaderNoMip(driverinfo_artlist[i]);
00132     }
00133 }

Here is the call graph for this function:

void GraphicsOptions_Cache void   ) 
 

Definition at line 1050 of file ui_video.c.

References GRAPHICSOPTIONS_ACCEPT0, GRAPHICSOPTIONS_ACCEPT1, GRAPHICSOPTIONS_BACK0, GRAPHICSOPTIONS_BACK1, GRAPHICSOPTIONS_FRAMEL, GRAPHICSOPTIONS_FRAMER, and trap_R_RegisterShaderNoMip().

01050                                    {
01051     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_FRAMEL );
01052     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_FRAMER );
01053     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_BACK0 );
01054     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_BACK1 );
01055     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_ACCEPT0 );
01056     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_ACCEPT1 );
01057 }

Here is the call graph for this function:

void InGame_Cache void   ) 
 

Definition at line 329 of file ui_ingame.c.

References INGAME_FRAME, and trap_R_RegisterShaderNoMip().

Referenced by InGame_MenuInit(), and UI_Cache_f().

00329                           {
00330     trap_R_RegisterShaderNoMip( INGAME_FRAME );
00331 }

Here is the call graph for this function:

void Login_Cache void   ) 
 

Definition at line 193 of file ui_login.c.

References LOGIN_FRAME, and trap_R_RegisterShaderNoMip().

00193                          {
00194     trap_R_RegisterShaderNoMip( LOGIN_FRAME );
00195 }

Here is the call graph for this function:

void MainMenu_Cache void   ) 
 

Definition at line 140 of file ui_menu.c.

References mainmenu_t::bannerModel, MAIN_BANNER_MODEL, s_main, and trap_R_RegisterModel().

00140                             {
00141     s_main.bannerModel = trap_R_RegisterModel( MAIN_BANNER_MODEL );
00142 }

Here is the call graph for this function:

sfxHandle_t Menu_ActivateItem menuframework_s s,
menucommon_s item
 

Definition at line 1567 of file ui_qmenu.c.

References menucommon_s::callback, menucommon_s::flags, menuframework_s, QM_ACTIVATED, and sfxHandle_t.

Referenced by Menu_DefaultKey().

01567                                                                         {
01568     if ( item->callback ) {
01569         item->callback( item, QM_ACTIVATED );
01570         if( !( item->flags & QMF_SILENT ) ) {
01571             return menu_move_sound;
01572         }
01573     }
01574 
01575     return 0;
01576 }

void Menu_AddItem menuframework_s menu,
void *  item
 

Definition at line 1266 of file ui_qmenu.c.

References Action_Init(), Bitmap_Init(), BText_Init(), menucommon_s::flags, _tag_menuframework::items, MenuField_Init(), menuframework_s, MTYPE_ACTION, MTYPE_BITMAP, MTYPE_BTEXT, MTYPE_FIELD, MTYPE_PTEXT, MTYPE_RADIOBUTTON, MTYPE_SCROLLLIST, MTYPE_SLIDER, MTYPE_SPINCONTROL, MTYPE_TEXT, _tag_menuframework::nitems, PText_Init(), RadioButton_Init(), ScrollList_Init(), Slider_Init(), SpinControl_Init(), Text_Init(), trap_Error(), menucommon_s::type, and va().

Referenced by ArenaServers_MenuInit(), Controls_MenuInit(), Demos_MenuInit(), GraphicsOptions_MenuInit(), InGame_MenuInit(), LoadConfig_MenuInit(), Login_MenuInit(), Options_MenuInit(), PlayerModel_MenuInit(), PlayerSettings_MenuInit(), Preferences_MenuInit(), Rankings_MenuInit(), RankStatus_MenuInit(), ServerOptions_MenuInit(), Signup_MenuInit(), SpecifyLeague_MenuInit(), SpecifyServer_MenuInit(), StartServer_MenuInit(), TeamMain_MenuInit(), UI_AddBotsMenu_Init(), UI_BotSelectMenu_Init(), UI_CDKeyMenu_Init(), UI_CinematicsMenu_Init(), UI_ConfirmMenu_Style(), UI_DisplayOptionsMenu_Init(), UI_DrawConnectScreen(), UI_DriverInfo_Menu(), UI_MainMenu(), UI_Message(), UI_Mods_MenuInit(), UI_NetworkOptionsMenu_Init(), UI_RemoveBotsMenu_Init(), UI_ResetMenu(), UI_SaveConfigMenu_Init(), UI_ServerInfoMenu(), UI_SetupMenu_Init(), UI_SoundOptionsMenu_Init(), UI_SPLevelMenu_Init(), UI_SPPostgameMenu_Init(), UI_SPSkillMenu_Init(), and UI_TeamOrdersMenu_Init().

01267 {
01268     menucommon_s    *itemptr;
01269 
01270     if (menu->nitems >= MAX_MENUITEMS)
01271         trap_Error ("Menu_AddItem: excessive items");
01272 
01273     menu->items[menu->nitems] = item;
01274     ((menucommon_s*)menu->items[menu->nitems])->parent        = menu;
01275     ((menucommon_s*)menu->items[menu->nitems])->menuPosition  = menu->nitems;
01276     ((menucommon_s*)menu->items[menu->nitems])->flags        &= ~QMF_HASMOUSEFOCUS;
01277 
01278     // perform any item specific initializations
01279     itemptr = (menucommon_s*)item;
01280     if (!(itemptr->flags & QMF_NODEFAULTINIT))
01281     {
01282         switch (itemptr->type)
01283         {
01284             case MTYPE_ACTION:
01285                 Action_Init((menuaction_s*)item);
01286                 break;
01287 
01288             case MTYPE_FIELD:
01289                 MenuField_Init((menufield_s*)item);
01290                 break;
01291 
01292             case MTYPE_SPINCONTROL:
01293                 SpinControl_Init((menulist_s*)item);
01294                 break;
01295 
01296             case MTYPE_RADIOBUTTON:
01297                 RadioButton_Init((menuradiobutton_s*)item);
01298                 break;
01299 
01300             case MTYPE_SLIDER:
01301                 Slider_Init((menuslider_s*)item);
01302                 break;
01303 
01304             case MTYPE_BITMAP:
01305                 Bitmap_Init((menubitmap_s*)item);
01306                 break;
01307 
01308             case MTYPE_TEXT:
01309                 Text_Init((menutext_s*)item);
01310                 break;
01311 
01312             case MTYPE_SCROLLLIST:
01313                 ScrollList_Init((menulist_s*)item);
01314                 break;
01315 
01316             case MTYPE_PTEXT:
01317                 PText_Init((menutext_s*)item);
01318                 break;
01319 
01320             case MTYPE_BTEXT:
01321                 BText_Init((menutext_s*)item);
01322                 break;
01323 
01324             default:
01325                 trap_Error( va("Menu_Init: unknown type %d", itemptr->type) );
01326         }
01327     }
01328 
01329     menu->nitems++;
01330 }

Here is the call graph for this function:

void Menu_AdjustCursor menuframework_s menu,
int  dir
 

Definition at line 1404 of file ui_qmenu.c.

References _tag_menuframework::cursor, _tag_menuframework::cursor_prev, menucommon_s::flags, _tag_menuframework::items, m, menuframework_s, _tag_menuframework::nitems, qboolean, QMF_GRAYED, QMF_MOUSEONLY, and _tag_menuframework::wrapAround.

Referenced by Menu_DefaultKey().

01404                                                       {
01405     menucommon_s    *item = NULL;
01406     qboolean        wrapped = qfalse;
01407 
01408 wrap:
01409     while ( m->cursor >= 0 && m->cursor < m->nitems ) {
01410         item = ( menucommon_s * ) m->items[m->cursor];
01411         if (( item->flags & (QMF_GRAYED|QMF_MOUSEONLY|QMF_INACTIVE) ) ) {
01412             m->cursor += dir;
01413         }
01414         else {
01415             break;
01416         }
01417     }
01418 
01419     if ( dir == 1 ) {
01420         if ( m->cursor >= m->nitems ) {
01421             if ( m->wrapAround ) {
01422                 if ( wrapped ) {
01423                     m->cursor = m->cursor_prev;
01424                     return;
01425                 }
01426                 m->cursor = 0;
01427                 wrapped = qtrue;
01428                 goto wrap;
01429             }
01430             m->cursor = m->cursor_prev;
01431         }
01432     }
01433     else {
01434         if ( m->cursor < 0 ) {
01435             if ( m->wrapAround ) {
01436                 if ( wrapped ) {
01437                     m->cursor = m->cursor_prev;
01438                     return;
01439                 }
01440                 m->cursor = m->nitems - 1;
01441                 wrapped = qtrue;
01442                 goto wrap;
01443             }
01444             m->cursor = m->cursor_prev;
01445         }
01446     }
01447 }

void Menu_Cache void   ) 
 

Definition at line 1714 of file ui_qmenu.c.

References uiStatic_t::charset, uiStatic_t::charsetProp, uiStatic_t::charsetPropB, uiStatic_t::charsetPropGlow, uiStatic_t::cursor, uiStatic_t::glconfig, glconfig_t::hardwareType, menu_buzz_sound, menu_in_sound, menu_move_sound, menu_null_sound, menu_out_sound, uiStatic_t::menuBackNoLogoShader, uiStatic_t::menuBackShader, qfalse, uiStatic_t::rb_off, uiStatic_t::rb_on, sliderBar, sliderButton_0, sliderButton_1, trap_R_RegisterShaderNoMip(), trap_S_RegisterSound(), uis, weaponChangeSound, and uiStatic_t::whiteShader.

01715 {
01716     uis.charset         = trap_R_RegisterShaderNoMip( "gfx/2d/bigchars" );
01717     uis.charsetProp     = trap_R_RegisterShaderNoMip( "menu/art/font1_prop.tga" );
01718     uis.charsetPropGlow = trap_R_RegisterShaderNoMip( "menu/art/font1_prop_glo.tga" );
01719     uis.charsetPropB    = trap_R_RegisterShaderNoMip( "menu/art/font2_prop.tga" );
01720     uis.cursor          = trap_R_RegisterShaderNoMip( "menu/art/3_cursor2" );
01721     uis.rb_on           = trap_R_RegisterShaderNoMip( "menu/art/switch_on" );
01722     uis.rb_off          = trap_R_RegisterShaderNoMip( "menu/art/switch_off" );
01723 
01724     uis.whiteShader = trap_R_RegisterShaderNoMip( "white" );
01725     if ( uis.glconfig.hardwareType == GLHW_RAGEPRO ) {
01726         // the blend effect turns to shit with the normal 
01727         uis.menuBackShader  = trap_R_RegisterShaderNoMip( "menubackRagePro" );
01728     } else {
01729         uis.menuBackShader  = trap_R_RegisterShaderNoMip( "menuback" );
01730     }
01731     uis.menuBackNoLogoShader = trap_R_RegisterShaderNoMip( "menubacknologo" );
01732 
01733     menu_in_sound   = trap_S_RegisterSound( "sound/misc/menu1.wav", qfalse );
01734     menu_move_sound = trap_S_RegisterSound( "sound/misc/menu2.wav", qfalse );
01735     menu_out_sound  = trap_S_RegisterSound( "sound/misc/menu3.wav", qfalse );
01736     menu_buzz_sound = trap_S_RegisterSound( "sound/misc/menu4.wav", qfalse );
01737     weaponChangeSound   = trap_S_RegisterSound( "sound/weapons/change.wav", qfalse );
01738 
01739     // need a nonzero sound, make an empty sound for this
01740     menu_null_sound = -1;
01741 
01742     sliderBar = trap_R_RegisterShaderNoMip( "menu/art/slider2" );
01743     sliderButton_0 = trap_R_RegisterShaderNoMip( "menu/art/sliderbutt_0" );
01744     sliderButton_1 = trap_R_RegisterShaderNoMip( "menu/art/sliderbutt_1" );
01745 }

Here is the call graph for this function:

sfxHandle_t Menu_DefaultKey menuframework_s s,
int  key
 

Definition at line 1583 of file ui_qmenu.c.

References _tag_menuframework::cursor, _tag_menuframework::cursor_prev, uiStatic_t::debug, EXEC_APPEND, menucommon_s::flags, K_AUX1, K_AUX10, K_AUX11, K_AUX12, K_AUX13, K_AUX14, K_AUX15, K_AUX16, K_AUX2, K_AUX3, K_AUX4, K_AUX5, K_AUX6, K_AUX7, K_AUX8, K_AUX9, K_DOWNARROW, K_ENTER, K_ESCAPE, K_F11, K_F12, K_JOY1, K_JOY2, K_JOY3, K_JOY4, K_KP_DOWNARROW, K_KP_ENTER, K_KP_UPARROW, K_MOUSE1, K_MOUSE2, K_MOUSE3, K_TAB, K_UPARROW, m, Menu_ActivateItem(), Menu_AdjustCursor(), Menu_CursorMoved(), Menu_ItemAtCursor(), MenuField_Key(), menuframework_s, MTYPE_FIELD, MTYPE_RADIOBUTTON, MTYPE_SCROLLLIST, MTYPE_SLIDER, MTYPE_SPINCONTROL, _tag_menuframework::nitems, QMF_GRAYED, QMF_MOUSEONLY, RadioButton_Key(), ScrollList_Key(), sfxHandle_t, Slider_Key(), SpinControl_Key(), trap_Cmd_ExecuteText(), menucommon_s::type, UI_PopMenu(), and uis.

Referenced by ArenaServers_MenuKey(), ConfirmMenu_Key(), Controls_MenuKey(), PlayerModel_MenuKey(), PlayerSettings_MenuKey(), Reset_MenuKey(), ServerInfo_MenuKey(), UI_DemosMenu_Key(), UI_KeyEvent(), UI_SPPostgameMenu_MenuKey(), UI_SPSkillMenu_Key(), and UI_TeamOrdersMenu_Key().

01584 {
01585     sfxHandle_t     sound = 0;
01586     menucommon_s    *item;
01587     int             cursor_prev;
01588 
01589     // menu system keys
01590     switch ( key )
01591     {
01592         case K_MOUSE2:
01593         case K_ESCAPE:
01594             UI_PopMenu();
01595             return menu_out_sound;
01596     }
01597 
01598     if (!m || !m->nitems)
01599         return 0;
01600 
01601     // route key stimulus to widget
01602     item = Menu_ItemAtCursor( m );
01603     if (item && !(item->flags & (QMF_GRAYED|QMF_INACTIVE)))
01604     {
01605         switch (item->type)
01606         {
01607             case MTYPE_SPINCONTROL:
01608                 sound = SpinControl_Key( (menulist_s*)item, key );
01609                 break;
01610 
01611             case MTYPE_RADIOBUTTON:
01612                 sound = RadioButton_Key( (menuradiobutton_s*)item, key );
01613                 break;
01614 
01615             case MTYPE_SLIDER:
01616                 sound = Slider_Key( (menuslider_s*)item, key );
01617                 break;
01618 
01619             case MTYPE_SCROLLLIST:
01620                 sound = ScrollList_Key( (menulist_s*)item, key );
01621                 break;
01622 
01623             case MTYPE_FIELD:
01624                 sound = MenuField_Key( (menufield_s*)item, &key );
01625                 break;
01626         }
01627 
01628         if (sound) {
01629             // key was handled
01630             return sound;       
01631         }
01632     }
01633 
01634     // default handling
01635     switch ( key )
01636     {
01637 #ifndef NDEBUG
01638         case K_F11:
01639             uis.debug ^= 1;
01640             break;
01641 
01642         case K_F12:
01643             trap_Cmd_ExecuteText(EXEC_APPEND, "screenshot\n");
01644             break;
01645 #endif
01646         case K_KP_UPARROW:
01647         case K_UPARROW:
01648             cursor_prev    = m->cursor;
01649             m->cursor_prev = m->cursor;
01650             m->cursor--;
01651             Menu_AdjustCursor( m, -1 );
01652             if ( cursor_prev != m->cursor ) {
01653                 Menu_CursorMoved( m );
01654                 sound = menu_move_sound;
01655             }
01656             break;
01657 
01658         case K_TAB:
01659         case K_KP_DOWNARROW:
01660         case K_DOWNARROW:
01661             cursor_prev    = m->cursor;
01662             m->cursor_prev = m->cursor;
01663             m->cursor++;
01664             Menu_AdjustCursor( m, 1 );
01665             if ( cursor_prev != m->cursor ) {
01666                 Menu_CursorMoved( m );
01667                 sound = menu_move_sound;
01668             }
01669             break;
01670 
01671         case K_MOUSE1:
01672         case K_MOUSE3:
01673             if (item)
01674                 if ((item->flags & QMF_HASMOUSEFOCUS) && !(item->flags & (QMF_GRAYED|QMF_INACTIVE)))
01675                     return (Menu_ActivateItem( m, item ));
01676             break;
01677 
01678         case K_JOY1:
01679         case K_JOY2:
01680         case K_JOY3:
01681         case K_JOY4:
01682         case K_AUX1:
01683         case K_AUX2:
01684         case K_AUX3:
01685         case K_AUX4:
01686         case K_AUX5:
01687         case K_AUX6:
01688         case K_AUX7:
01689         case K_AUX8:
01690         case K_AUX9:
01691         case K_AUX10:
01692         case K_AUX11:
01693         case K_AUX12:
01694         case K_AUX13:
01695         case K_AUX14:
01696         case K_AUX15:
01697         case K_AUX16:
01698         case K_KP_ENTER:
01699         case K_ENTER:
01700             if (item)
01701                 if (!(item->flags & (QMF_MOUSEONLY|QMF_GRAYED|QMF_INACTIVE)))
01702                     return (Menu_ActivateItem( m, item ));
01703             break;
01704     }
01705 
01706     return sound;
01707 }

Here is the call graph for this function:

void Menu_Draw menuframework_s menu  ) 
 

Definition at line 1454 of file ui_qmenu.c.

References Action_Draw(), Bitmap_Draw(), menucommon_s::bottom, BText_Draw(), colorWhite, colorYellow, uiStatic_t::debug, menucommon_s::flags, h(), i, _tag_menuframework::items, menucommon_s::left, Menu_ItemAtCursor(), MenuField_Draw(), menuframework_s, MTYPE_ACTION, MTYPE_BITMAP, MTYPE_BTEXT, MTYPE_FIELD, MTYPE_PTEXT, MTYPE_RADIOBUTTON, MTYPE_SCROLLLIST, MTYPE_SLIDER, MTYPE_SPINCONTROL, MTYPE_TEXT, _tag_menuframework::nitems, menucommon_s::ownerdraw, PText_Draw(), RadioButton_Draw(), menucommon_s::right, ScrollList_Draw(), Slider_Draw(), SpinControl_Draw(), menucommon_s::statusbar, Text_Draw(), menucommon_s::top, trap_Error(), menucommon_s::type, UI_DrawRect(), uis, va(), w, x, and y.

Referenced by ArenaServers_MenuDraw(), ConfirmMenu_Draw(), DriverInfo_MenuDraw(), GraphicsOptions_MenuDraw(), Main_MenuDraw(), MessageMenu_Draw(), Reset_MenuDraw(), ServerInfo_MenuDraw(), UI_AddBotsMenu_Draw(), UI_Refresh(), UI_SPLevelMenu_MenuDraw(), and UI_SPPostgameMenu_MenuDraw().

01455 {
01456     int             i;
01457     menucommon_s    *itemptr;
01458 
01459     // draw menu
01460     for (i=0; i<menu->nitems; i++)
01461     {
01462         itemptr = (menucommon_s*)menu->items[i];
01463 
01464         if (itemptr->flags & QMF_HIDDEN)
01465             continue;
01466 
01467         if (itemptr->ownerdraw)
01468         {
01469             // total subclassing, owner draws everything
01470             itemptr->ownerdraw( itemptr );
01471         }   
01472         else 
01473         {
01474             switch (itemptr->type)
01475             {   
01476                 case MTYPE_RADIOBUTTON:
01477                     RadioButton_Draw( (menuradiobutton_s*)itemptr );
01478                     break;
01479 
01480                 case MTYPE_FIELD:
01481                     MenuField_Draw( (menufield_s*)itemptr );
01482                     break;
01483         
01484                 case MTYPE_SLIDER:
01485                     Slider_Draw( (menuslider_s*)itemptr );
01486                     break;
01487  
01488                 case MTYPE_SPINCONTROL:
01489                     SpinControl_Draw( (menulist_s*)itemptr );
01490                     break;
01491         
01492                 case MTYPE_ACTION:
01493                     Action_Draw( (menuaction_s*)itemptr );
01494                     break;
01495         
01496                 case MTYPE_BITMAP:
01497                     Bitmap_Draw( (menubitmap_s*)itemptr );
01498                     break;
01499 
01500                 case MTYPE_TEXT:
01501                     Text_Draw( (menutext_s*)itemptr );
01502                     break;
01503 
01504                 case MTYPE_SCROLLLIST:
01505                     ScrollList_Draw( (menulist_s*)itemptr );
01506                     break;
01507                 
01508                 case MTYPE_PTEXT:
01509                     PText_Draw( (menutext_s*)itemptr );
01510                     break;
01511 
01512                 case MTYPE_BTEXT:
01513                     BText_Draw( (menutext_s*)itemptr );
01514                     break;
01515 
01516                 default:
01517                     trap_Error( va("Menu_Draw: unknown type %d", itemptr->type) );
01518             }
01519         }
01520 #ifndef NDEBUG
01521         if( uis.debug ) {
01522             int x;
01523             int y;
01524             int w;
01525             int h;
01526 
01527             if( !( itemptr->flags & QMF_INACTIVE ) ) {
01528                 x = itemptr->left;
01529                 y = itemptr->top;
01530                 w = itemptr->right - itemptr->left + 1;
01531                 h = itemptr->bottom - itemptr->top + 1;
01532 
01533                 if (itemptr->flags & QMF_HASMOUSEFOCUS) {
01534                     UI_DrawRect(x, y, w, h, colorYellow );
01535                 }
01536                 else {
01537                     UI_DrawRect(x, y, w, h, colorWhite );
01538                 }
01539             }
01540         }
01541 #endif
01542     }
01543 
01544     itemptr = Menu_ItemAtCursor( menu );
01545     if ( itemptr && itemptr->statusbar)
01546         itemptr->statusbar( ( void * ) itemptr );
01547 }

Here is the call graph for this function:

void Menu_Focus menucommon_s m  ) 
 

void* Menu_ItemAtCursor menuframework_s m  ) 
 

Definition at line 1554 of file ui_qmenu.c.

References _tag_menuframework::cursor, _tag_menuframework::items, m, menuframework_s, and _tag_menuframework::nitems.

Referenced by ArenaServers_MenuKey(), Bitmap_Draw(), Controls_DrawKeyBinding(), Menu_DefaultKey(), Menu_Draw(), MenuField_Draw(), PlayerModel_MenuKey(), PText_Draw(), UI_DemosMenu_Key(), UI_SaveConfigMenu_SavenameDraw(), UI_SPLevelMenu_MenuDraw(), and UI_TeamOrdersMenu_Key().

01555 {
01556     if ( m->cursor < 0 || m->cursor >= m->nitems )
01557         return 0;
01558 
01559     return m->items[m->cursor];
01560 }

void Menu_SetCursor menuframework_s s,
int  cursor
 

Definition at line 1364 of file ui_qmenu.c.

References _tag_menuframework::cursor, _tag_menuframework::cursor_prev, _tag_menuframework::items, m, Menu_CursorMoved(), menuframework_s, and QMF_GRAYED.

Referenced by Menu_SetCursorToItem(), PlayerModel_MenuKey(), UI_MouseEvent(), and UI_PushMenu().

01365 {
01366     if (((menucommon_s*)(m->items[cursor]))->flags & (QMF_GRAYED|QMF_INACTIVE))
01367     {
01368         // cursor can't go there
01369         return;
01370     }
01371 
01372     m->cursor_prev = m->cursor;
01373     m->cursor      = cursor;
01374 
01375     Menu_CursorMoved( m );
01376 }

Here is the call graph for this function:

void Menu_SetCursorToItem menuframework_s m,
void *  ptr
 

Definition at line 1383 of file ui_qmenu.c.

References i, _tag_menuframework::items, m, Menu_SetCursor(), menuframework_s, and _tag_menuframework::nitems.

Referenced by UI_CinematicsMenu_f(), UI_ConfirmMenu_Style(), UI_DisplayOptionsMenu(), UI_GraphicsOptionsMenu(), UI_Message(), UI_NetworkOptionsMenu(), UI_PlayerModelMenu(), UI_ResetMenu(), UI_SoundOptionsMenu(), UI_SPLevelMenu(), UI_SPPostgameMenu_f(), and UI_SPSkillMenu().

01384 {
01385     int i;
01386 
01387     for (i=0; i<m->nitems; i++)
01388     {
01389         if (m->items[i] == ptr)
01390         {
01391             Menu_SetCursor( m, i );
01392             return;
01393         }
01394     }
01395 }

Here is the call graph for this function:

void MenuField_Draw menufield_s f  ) 
 

Definition at line 332 of file ui_mfield.c.

References menucommon_s::bottom, f, menufield_s::field, menucommon_s::flags, menufield_s::generic, h(), menucommon_s::left, listbar_color, Menu_ItemAtCursor(), MField_Draw(), menucommon_s::name, menucommon_s::parent, qboolean, menucommon_s::right, menucommon_s::top, UI_BLINK, UI_CENTER, UI_DrawChar(), UI_DrawString(), UI_FillRect(), UI_RIGHT, w, menucommon_s::x, x, menucommon_s::y, and y.

Referenced by Menu_Draw().

00333 {
00334     int     x;
00335     int     y;
00336     int     w;
00337     int     h;
00338     int     style;
00339     qboolean focus;
00340     float   *color;
00341 
00342     x = f->generic.x;
00343     y = f->generic.y;
00344 
00345     if (f->generic.flags & QMF_SMALLFONT)
00346     {
00347         w = SMALLCHAR_WIDTH;
00348         h = SMALLCHAR_HEIGHT;
00349         style = UI_SMALLFONT;
00350     }
00351     else
00352     {
00353         w = BIGCHAR_WIDTH;
00354         h = BIGCHAR_HEIGHT;
00355         style = UI_BIGFONT;
00356     }   
00357 
00358     if (Menu_ItemAtCursor( f->generic.parent ) == f) {
00359         focus = qtrue;
00360         style |= UI_PULSE;
00361     }
00362     else {
00363         focus = qfalse;
00364     }
00365 
00366     if (f->generic.flags & QMF_GRAYED)
00367         color = text_color_disabled;
00368     else if (focus)
00369         color = text_color_highlight;
00370     else
00371         color = text_color_normal;
00372 
00373     if ( focus )
00374     {
00375         // draw cursor
00376         UI_FillRect( f->generic.left, f->generic.top, f->generic.right-f->generic.left+1, f->generic.bottom-f->generic.top+1, listbar_color ); 
00377         UI_DrawChar( x, y, 13, UI_CENTER|UI_BLINK|style, color);
00378     }
00379 
00380     if ( f->generic.name ) {
00381         UI_DrawString( x - w, y, f->generic.name, style|UI_RIGHT, color );
00382     }
00383 
00384     MField_Draw( &f->field, x + w, y, style, color );
00385 }

Here is the call graph for this function:

void MenuField_Init menufield_s m  ) 
 

Definition at line 296 of file ui_mfield.c.

References menucommon_s::bottom, menufield_s::field, menucommon_s::flags, menufield_s::generic, h(), l, menucommon_s::left, m, MField_Clear(), menucommon_s::name, menucommon_s::right, strlen(), menucommon_s::top, w, mfield_t::widthInChars, menucommon_s::x, and menucommon_s::y.

Referenced by Menu_AddItem().

00296                                       {
00297     int l;
00298     int w;
00299     int h;
00300 
00301     MField_Clear( &m->field );
00302 
00303     if (m->generic.flags & QMF_SMALLFONT)
00304     {
00305         w = SMALLCHAR_WIDTH;
00306         h = SMALLCHAR_HEIGHT;
00307     }
00308     else
00309     {
00310         w = BIGCHAR_WIDTH;
00311         h = BIGCHAR_HEIGHT;
00312     }   
00313 
00314     if (m->generic.name) {
00315         l = (strlen( m->generic.name )+1) * w;      
00316     }
00317     else {
00318         l = 0;
00319     }
00320 
00321     m->generic.left   = m->generic.x - l;
00322     m->generic.top    = m->generic.y;
00323     m->generic.right  = m->generic.x + w + m->field.widthInChars*w;
00324     m->generic.bottom = m->generic.y + h;
00325 }

Here is the call graph for this function:

sfxHandle_t MenuField_Key menufield_s m,
int *  key
 

Definition at line 392 of file ui_mfield.c.

References menufield_s::field, menucommon_s::flags, menufield_s::generic, K_DOWNARROW, K_ENTER, K_JOY1, K_JOY2, K_JOY3, K_JOY4, K_KP_DOWNARROW, K_KP_ENTER, K_KP_UPARROW, K_TAB, K_UPARROW, m, MField_CharEvent(), MField_KeyDownEvent(), Q_isalpha(), Q_islower(), Q_isupper(), and sfxHandle_t.

Referenced by Menu_DefaultKey().

00393 {
00394     int keycode;
00395 
00396     keycode = *key;
00397 
00398     switch ( keycode )
00399     {
00400         case K_KP_ENTER:
00401         case K_ENTER:
00402         case K_JOY1:
00403         case K_JOY2:
00404         case K_JOY3:
00405         case K_JOY4:
00406             // have enter go to next cursor point
00407             *key = K_TAB;
00408             break;
00409 
00410         case K_TAB:
00411         case K_KP_DOWNARROW:
00412         case K_DOWNARROW:
00413         case K_KP_UPARROW:
00414         case K_UPARROW:
00415             break;
00416 
00417         default:
00418             if ( keycode & K_CHAR_FLAG )
00419             {
00420                 keycode &= ~K_CHAR_FLAG;
00421 
00422                 if ((m->generic.flags & QMF_UPPERCASE) && Q_islower( keycode ))
00423                     keycode -= 'a' - 'A';
00424                 else if ((m->generic.flags & QMF_LOWERCASE) && Q_isupper( keycode ))
00425                     keycode -= 'A' - 'a';
00426                 else if ((m->generic.flags & QMF_NUMBERSONLY) && Q_isalpha( keycode ))
00427                     return (menu_buzz_sound);
00428 
00429                 MField_CharEvent( &m->field, keycode);
00430             }
00431             else
00432                 MField_KeyDownEvent( &m->field, keycode );
00433             break;
00434     }
00435 
00436     return (0);
00437 }

Here is the call graph for this function:

void MField_CharEvent mfield_t edit,
int  ch
 

Definition at line 207 of file ui_mfield.c.

References mfield_t::buffer, ch, mfield_t::cursor, MAX_EDIT_LINE, mfield_t::maxchars, memmove(), MField_Clear(), MField_Paste(), mfield_t::scroll, strlen(), trap_Key_GetOverstrikeMode(), and mfield_t::widthInChars.

Referenced by MenuField_Key(), and MField_Paste().

00207                                                 {
00208     int     len;
00209 
00210     if ( ch == 'v' - 'a' + 1 ) {    // ctrl-v is paste
00211         MField_Paste( edit );
00212         return;
00213     }
00214 
00215     if ( ch == 'c' - 'a' + 1 ) {    // ctrl-c clears the field
00216         MField_Clear( edit );
00217         return;
00218     }
00219 
00220     len = strlen( edit->buffer );
00221 
00222     if ( ch == 'h' - 'a' + 1 )  {   // ctrl-h is backspace
00223         if ( edit->cursor > 0 ) {
00224             memmove( edit->buffer + edit->cursor - 1, 
00225                 edit->buffer + edit->cursor, len + 1 - edit->cursor );
00226             edit->cursor--;
00227             if ( edit->cursor < edit->scroll )
00228             {
00229                 edit->scroll--;
00230             }
00231         }
00232         return;
00233     }
00234 
00235     if ( ch == 'a' - 'a' + 1 ) {    // ctrl-a is home
00236         edit->cursor = 0;
00237         edit->scroll = 0;
00238         return;
00239     }
00240 
00241     if ( ch == 'e' - 'a' + 1 ) {    // ctrl-e is end
00242         edit->cursor = len;
00243         edit->scroll = edit->cursor - edit->widthInChars + 1;
00244         if (edit->scroll < 0)
00245             edit->scroll = 0;
00246         return;
00247     }
00248 
00249     //
00250     // ignore any other non printable chars
00251     //
00252     if ( ch < 32 ) {
00253         return;
00254     }
00255 
00256     if ( !trap_Key_GetOverstrikeMode() ) {  
00257         if ((edit->cursor == MAX_EDIT_LINE - 1) || (edit->maxchars && edit->cursor >= edit->maxchars))
00258             return;
00259     } else {
00260         // insert mode
00261         if (( len == MAX_EDIT_LINE - 1 ) || (edit->maxchars && len >= edit->maxchars))
00262             return;
00263         memmove( edit->buffer + edit->cursor + 1, edit->buffer + edit->cursor, len + 1 - edit->cursor );
00264     }
00265 
00266     edit->buffer[edit->cursor] = ch;
00267     if (!edit->maxchars || edit->cursor < edit->maxchars-1)
00268         edit->cursor++;
00269 
00270     if ( edit->cursor >= edit->widthInChars )
00271     {
00272         edit->scroll++;
00273     }
00274 
00275     if ( edit->cursor == len + 1) {
00276         edit->buffer[edit->cursor] = 0;
00277     }
00278 }

Here is the call graph for this function:

void MField_Clear mfield_t edit  ) 
 

Definition at line 285 of file ui_mfield.c.

References mfield_t::buffer, mfield_t::cursor, and mfield_t::scroll.

Referenced by MenuField_Init(), and MField_CharEvent().

00285                                     {
00286     edit->buffer[0] = 0;
00287     edit->cursor = 0;
00288     edit->scroll = 0;
00289 }

void MField_Draw mfield_t edit,
int  x,
int  y,
int  style,
vec4_t  color
 

Definition at line 33 of file ui_mfield.c.

References mfield_t::buffer, mfield_t::cursor, memcpy(), mfield_t::scroll, strlen(), trap_Error(), trap_Key_GetOverstrikeMode(), UI_CENTER, UI_DrawChar(), UI_DrawString(), UI_RIGHT, mfield_t::widthInChars, x, and y.

Referenced by MenuField_Draw(), UI_DrawConnectScreen(), and UI_SaveConfigMenu_SavenameDraw().

00033                                                                           {
00034     int     len;
00035     int     charw;
00036     int     drawLen;
00037     int     prestep;
00038     int     cursorChar;
00039     char    str[MAX_STRING_CHARS];
00040 
00041     drawLen = edit->widthInChars;
00042     len     = strlen( edit->buffer ) + 1;
00043 
00044     // guarantee that cursor will be visible
00045     if ( len <= drawLen ) {
00046         prestep = 0;
00047     } else {
00048         if ( edit->scroll + drawLen > len ) {
00049             edit->scroll = len - drawLen;
00050             if ( edit->scroll < 0 ) {
00051                 edit->scroll = 0;
00052             }
00053         }
00054         prestep = edit->scroll;
00055     }
00056 
00057     if ( prestep + drawLen > len ) {
00058         drawLen = len - prestep;
00059     }
00060 
00061     // extract <drawLen> characters from the field at <prestep>
00062     if ( drawLen >= MAX_STRING_CHARS ) {
00063         trap_Error( "drawLen >= MAX_STRING_CHARS" );
00064     }
00065     memcpy( str, edit->buffer + prestep, drawLen );
00066     str[ drawLen ] = 0;
00067 
00068     UI_DrawString( x, y, str, style, color );
00069 
00070     // draw the cursor
00071     if (!(style & UI_PULSE)) {
00072         return;
00073     }
00074 
00075     if ( trap_Key_GetOverstrikeMode() ) {
00076         cursorChar = 11;
00077     } else {
00078         cursorChar = 10;
00079     }
00080 
00081     style &= ~UI_PULSE;
00082     style |= UI_BLINK;
00083 
00084     if (style & UI_SMALLFONT)
00085     {
00086         charw = SMALLCHAR_WIDTH;
00087     }
00088     else if (style & UI_GIANTFONT)
00089     {
00090         charw = GIANTCHAR_WIDTH;
00091     }
00092     else
00093     {
00094         charw = BIGCHAR_WIDTH;
00095     }
00096 
00097     if (style & UI_CENTER)
00098     {
00099         len = strlen(str);
00100         x = x - len*charw/2;
00101     }
00102     else if (style & UI_RIGHT)
00103     {
00104         len = strlen(str);
00105         x = x - len*charw;
00106     }
00107     
00108     UI_DrawChar( x + ( edit->cursor - prestep ) * charw, y, cursorChar, style & ~(UI_CENTER|UI_RIGHT), color );
00109 }

Here is the call graph for this function:

void MField_KeyDownEvent mfield_t edit,
int  key
 

Definition at line 139 of file ui_mfield.c.

References mfield_t::buffer, mfield_t::cursor, K_CTRL, K_DEL, K_END, K_HOME, K_INS, K_KP_END, K_KP_HOME, K_LEFTARROW, K_RIGHTARROW, K_SHIFT, memmove(), MField_Paste(), mfield_t::scroll, strlen(), tolower(), trap_Key_GetOverstrikeMode(), trap_Key_IsDown(), trap_Key_SetOverstrikeMode(), and mfield_t::widthInChars.

Referenced by MenuField_Key().

00139                                                     {
00140     int     len;
00141 
00142     // shift-insert is paste
00143     if ( ( ( key == K_INS ) || ( key == K_KP_INS ) ) && trap_Key_IsDown( K_SHIFT ) ) {
00144         MField_Paste( edit );
00145         return;
00146     }
00147 
00148     len = strlen( edit->buffer );
00149 
00150     if ( key == K_DEL || key == K_KP_DEL ) {
00151         if ( edit->cursor < len ) {
00152             memmove( edit->buffer + edit->cursor, 
00153                 edit->buffer + edit->cursor + 1, len - edit->cursor );
00154         }
00155         return;
00156     }
00157 
00158     if ( key == K_RIGHTARROW || key == K_KP_RIGHTARROW ) 
00159     {
00160         if ( edit->cursor < len ) {
00161             edit->cursor++;
00162         }
00163         if ( edit->cursor >= edit->scroll + edit->widthInChars && edit->cursor <= len )
00164         {
00165             edit->scroll++;
00166         }
00167         return;
00168     }
00169 
00170     if ( key == K_LEFTARROW || key == K_KP_LEFTARROW ) 
00171     {
00172         if ( edit->cursor > 0 ) {
00173             edit->cursor--;
00174         }
00175         if ( edit->cursor < edit->scroll )
00176         {
00177             edit->scroll--;
00178         }
00179         return;
00180     }
00181 
00182     if ( key == K_HOME || key == K_KP_HOME || ( tolower(key) == 'a' && trap_Key_IsDown( K_CTRL ) ) ) {
00183         edit->cursor = 0;
00184         edit->scroll = 0;
00185         return;
00186     }
00187 
00188     if ( key == K_END || key == K_KP_END || ( tolower(key) == 'e' && trap_Key_IsDown( K_CTRL ) ) ) {
00189         edit->cursor = len;
00190         edit->scroll = len - edit->widthInChars + 1;
00191         if (edit->scroll < 0)
00192             edit->scroll = 0;
00193         return;
00194     }
00195 
00196     if ( key == K_INS || key == K_KP_INS ) {
00197         trap_Key_SetOverstrikeMode( !trap_Key_GetOverstrikeMode() );
00198         return;
00199     }
00200 }

Here is the call graph for this function:

void PlayerModel_Cache void   ) 
 

Definition at line 708 of file ui_playermodel.c.

References i, playermodel_t::modelnames, playermodel_t::nummodels, playermodel_artlist, PlayerModel_BuildList(), s_playermodel, and trap_R_RegisterShaderNoMip().

00709 {
00710     int i;
00711 
00712     for( i = 0; playermodel_artlist[i]; i++ ) {
00713         trap_R_RegisterShaderNoMip( playermodel_artlist[i] );
00714     }
00715 
00716     PlayerModel_BuildList();
00717     for( i = 0; i < s_playermodel.nummodels; i++ ) {
00718         trap_R_RegisterShaderNoMip( s_playermodel.modelnames[i] );
00719     }
00720 }

Here is the call graph for this function:

void PlayerSettings_Cache void   ) 
 

Definition at line 486 of file ui_playersettings.c.

References ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, ART_FX_BASE, ART_FX_BLUE, ART_FX_CYAN, ART_FX_GREEN, ART_FX_RED, ART_FX_TEAL, ART_FX_WHITE, ART_FX_YELLOW, ART_MODEL0, ART_MODEL1, playersettings_t::fxBasePic, playersettings_t::fxPic, s_playersettings, and trap_R_RegisterShaderNoMip().

00486                                   {
00487     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00488     trap_R_RegisterShaderNoMip( ART_FRAMER );
00489     trap_R_RegisterShaderNoMip( ART_MODEL0 );
00490     trap_R_RegisterShaderNoMip( ART_MODEL1 );
00491     trap_R_RegisterShaderNoMip( ART_BACK0 );
00492     trap_R_RegisterShaderNoMip( ART_BACK1 );
00493 
00494     s_playersettings.fxBasePic = trap_R_RegisterShaderNoMip( ART_FX_BASE );
00495     s_playersettings.fxPic[0] = trap_R_RegisterShaderNoMip( ART_FX_RED );
00496     s_playersettings.fxPic[1] = trap_R_RegisterShaderNoMip( ART_FX_YELLOW );
00497     s_playersettings.fxPic[2] = trap_R_RegisterShaderNoMip( ART_FX_GREEN );
00498     s_playersettings.fxPic[3] = trap_R_RegisterShaderNoMip( ART_FX_TEAL );
00499     s_playersettings.fxPic[4] = trap_R_RegisterShaderNoMip( ART_FX_BLUE );
00500     s_playersettings.fxPic[5] = trap_R_RegisterShaderNoMip( ART_FX_CYAN );
00501     s_playersettings.fxPic[6] = trap_R_RegisterShaderNoMip( ART_FX_WHITE );
00502 }

Here is the call graph for this function:

void Preferences_Cache void   ) 
 

Definition at line 398 of file ui_preferences.c.

References ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, preferences_t::crosshairShader, n, s_preferences, trap_R_RegisterShaderNoMip(), and va().

00398                                {
00399     int     n;
00400 
00401     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00402     trap_R_RegisterShaderNoMip( ART_FRAMER );
00403     trap_R_RegisterShaderNoMip( ART_BACK0 );
00404     trap_R_RegisterShaderNoMip( ART_BACK1 );
00405     for( n = 0; n < NUM_CROSSHAIRS; n++ ) {
00406         s_preferences.crosshairShader[n] = trap_R_RegisterShaderNoMip( va("gfx/2d/crosshair%c", 'a' + n ) );
00407     }
00408 }

Here is the call graph for this function:

void RankStatus_Cache void   ) 
 

Definition at line 158 of file ui_rankstatus.c.

References RANKSTATUS_FRAME, and trap_R_RegisterShaderNoMip().

00158                               {
00159     trap_R_RegisterShaderNoMip( RANKSTATUS_FRAME );
00160 }

Here is the call graph for this function:

void ScrollList_Draw menulist_s l  ) 
 

Definition at line 1202 of file ui_qmenu.c.

References menulist_s::columns, _tag_menuframework::cursor, menulist_s::curvalue, menucommon_s::flags, menulist_s::generic, menulist_s::height, i, menulist_s::itemnames, l, listbar_color, menucommon_s::menuPosition, menulist_s::numitems, menucommon_s::parent, qboolean, menulist_s::seperation, SMALLCHAR_HEIGHT, SMALLCHAR_WIDTH, menulist_s::top, UI_DrawString(), UI_FillRect(), UI_LEFT, UI_PULSE, menulist_s::width, menucommon_s::x, x, menucommon_s::y, and y.

Referenced by Menu_Draw().

01203 {
01204     int         x;
01205     int         u;
01206     int         y;
01207     int         i;
01208     int         base;
01209     int         column;
01210     float*      color;
01211     qboolean    hasfocus;
01212     int         style;
01213 
01214     hasfocus = (l->generic.parent->cursor == l->generic.menuPosition);
01215 
01216     x = l->generic.x;
01217     for( column = 0; column < l->columns; column++ ) {
01218         y = l->generic.y;
01219         base = l->top + column * l->height;
01220         for( i = base; i < base + l->height; i++) {
01221             if (i >= l->numitems)
01222                 break;
01223 
01224             if (i == l->curvalue)
01225             {
01226                 u = x - 2;
01227                 if( l->generic.flags & QMF_CENTER_JUSTIFY ) {
01228                     u -= (l->width * SMALLCHAR_WIDTH) / 2 + 1;
01229                 }
01230 
01231                 UI_FillRect(u,y,l->width*SMALLCHAR_WIDTH,SMALLCHAR_HEIGHT+2,listbar_color);
01232                 color = text_color_highlight;
01233 
01234                 if (hasfocus)
01235                     style = UI_PULSE|UI_LEFT|UI_SMALLFONT;
01236                 else
01237                     style = UI_LEFT|UI_SMALLFONT;
01238             }
01239             else
01240             {
01241                 color = text_color_normal;
01242                 style = UI_LEFT|UI_SMALLFONT;
01243             }
01244             if( l->generic.flags & QMF_CENTER_JUSTIFY ) {
01245                 style |= UI_CENTER;
01246             }
01247 
01248             UI_DrawString(
01249                 x,
01250                 y,
01251                 l->itemnames[i],
01252                 style,
01253                 color);
01254 
01255             y += SMALLCHAR_HEIGHT;
01256         }
01257         x += (l->width + l->seperation) * SMALLCHAR_WIDTH;
01258     }
01259 }

Here is the call graph for this function:

sfxHandle_t ScrollList_Key menulist_s l,
int  key
 

Referenced by ArenaServers_Event(), Demos_MenuEvent(), LoadConfig_MenuEvent(), Menu_DefaultKey(), and SpecifyLeague_Event().

void ServerInfo_Cache void   ) 
 

Definition at line 167 of file ui_serverinfo.c.

References i, serverinfo_artlist, and trap_R_RegisterShaderNoMip().

00168 {
00169     int i;
00170 
00171     // touch all our pics
00172     for (i=0; ;i++)
00173     {
00174         if (!serverinfo_artlist[i])
00175             break;
00176         trap_R_RegisterShaderNoMip(serverinfo_artlist[i]);
00177     }
00178 }

Here is the call graph for this function:

void ServerOptions_Cache void   ) 
 

Definition at line 1479 of file ui_startserver.c.

References GAMESERVER_BACK0, GAMESERVER_BACK1, GAMESERVER_FIGHT0, GAMESERVER_FIGHT1, GAMESERVER_SELECT, GAMESERVER_UNKNOWNMAP, and trap_R_RegisterShaderNoMip().

01479                                  {
01480     trap_R_RegisterShaderNoMip( GAMESERVER_BACK0 );
01481     trap_R_RegisterShaderNoMip( GAMESERVER_BACK1 );
01482     trap_R_RegisterShaderNoMip( GAMESERVER_FIGHT0 );
01483     trap_R_RegisterShaderNoMip( GAMESERVER_FIGHT1 );
01484     trap_R_RegisterShaderNoMip( GAMESERVER_SELECT );
01485     trap_R_RegisterShaderNoMip( GAMESERVER_UNKNOWNMAP );
01486 }

Here is the call graph for this function:

void Signup_Cache void   ) 
 

Definition at line 271 of file ui_signup.c.

References SIGNUP_FRAME, and trap_R_RegisterShaderNoMip().

00271                           {
00272     trap_R_RegisterShaderNoMip( SIGNUP_FRAME );
00273 }

Here is the call graph for this function:

void SpecifyLeague_Cache void   ) 
 

Definition at line 310 of file ui_specifyleague.c.

References i, specifyleague_artlist, and trap_R_RegisterShaderNoMip().

00311 {
00312     int i;
00313 
00314     // touch all our pics
00315     for (i=0; ;i++)
00316     {
00317         if (!specifyleague_artlist[i])
00318             break;
00319         trap_R_RegisterShaderNoMip(specifyleague_artlist[i]);
00320     }
00321 }

Here is the call graph for this function:

void SpecifyServer_Cache void   ) 
 

Definition at line 190 of file ui_specifyserver.c.

References i, specifyserver_artlist, and trap_R_RegisterShaderNoMip().

00191 {
00192     int i;
00193 
00194     // touch all our pics
00195     for (i=0; ;i++)
00196     {
00197         if (!specifyserver_artlist[i])
00198             break;
00199         trap_R_RegisterShaderNoMip(specifyserver_artlist[i]);
00200     }
00201 }

Here is the call graph for this function:

void StartServer_Cache void   ) 
 

Definition at line 553 of file ui_startserver.c.

References Com_sprintf(), GAMESERVER_ARROWS, GAMESERVER_ARROWSL, GAMESERVER_ARROWSR, GAMESERVER_BACK0, GAMESERVER_BACK1, GAMESERVER_FRAMEL, GAMESERVER_FRAMER, GAMESERVER_NEXT0, GAMESERVER_NEXT1, GAMESERVER_SELECT, GAMESERVER_SELECTED, GAMESERVER_UNKNOWNMAP, GametypeBits(), i, Info_ValueForKey(), startserver_t::mapGamebits, startserver_t::maplist, MAX_MAPSPERPAGE, MAX_NAMELENGTH, startserver_t::maxpages, startserver_t::nummaps, Q_strncpyz(), Q_strupr(), qboolean, s_startserver, trap_Cvar_VariableValue(), trap_R_RegisterShaderNoMip(), UI_GetArenaInfoByNumber(), and UI_GetNumArenas().

00554 {
00555     int             i;
00556     const char      *info;
00557     qboolean        precache;
00558     char            picname[64];
00559 
00560     trap_R_RegisterShaderNoMip( GAMESERVER_BACK0 ); 
00561     trap_R_RegisterShaderNoMip( GAMESERVER_BACK1 ); 
00562     trap_R_RegisterShaderNoMip( GAMESERVER_NEXT0 ); 
00563     trap_R_RegisterShaderNoMip( GAMESERVER_NEXT1 ); 
00564     trap_R_RegisterShaderNoMip( GAMESERVER_FRAMEL );    
00565     trap_R_RegisterShaderNoMip( GAMESERVER_FRAMER );    
00566     trap_R_RegisterShaderNoMip( GAMESERVER_SELECT );    
00567     trap_R_RegisterShaderNoMip( GAMESERVER_SELECTED );  
00568     trap_R_RegisterShaderNoMip( GAMESERVER_UNKNOWNMAP );
00569     trap_R_RegisterShaderNoMip( GAMESERVER_ARROWS );
00570     trap_R_RegisterShaderNoMip( GAMESERVER_ARROWSL );
00571     trap_R_RegisterShaderNoMip( GAMESERVER_ARROWSR );
00572 
00573     precache = trap_Cvar_VariableValue("com_buildscript");
00574 
00575     s_startserver.nummaps = UI_GetNumArenas();
00576 
00577     for( i = 0; i < s_startserver.nummaps; i++ ) {
00578         info = UI_GetArenaInfoByNumber( i );
00579 
00580         Q_strncpyz( s_startserver.maplist[i], Info_ValueForKey( info, "map"), MAX_NAMELENGTH );
00581         Q_strupr( s_startserver.maplist[i] );
00582         s_startserver.mapGamebits[i] = GametypeBits( Info_ValueForKey( info, "type") );
00583 
00584         if( precache ) {
00585             Com_sprintf( picname, sizeof(picname), "levelshots/%s", s_startserver.maplist[i] );
00586             trap_R_RegisterShaderNoMip(picname);
00587         }
00588     }
00589 
00590     s_startserver.maxpages = (s_startserver.nummaps + MAX_MAPSPERPAGE-1)/MAX_MAPSPERPAGE;
00591 }

Here is the call graph for this function:

void TeamMain_Cache void   ) 
 

Definition at line 197 of file ui_team.c.

References TEAMMAIN_FRAME, and trap_R_RegisterShaderNoMip().

00197                             {
00198     trap_R_RegisterShaderNoMip( TEAMMAIN_FRAME );
00199 }

Here is the call graph for this function:

int trap_Argc void   ) 
 

Definition at line 73 of file cg_syscalls.c.

References CG_ARGC, and UI_ARGC.

00073                           {
00074     return syscall( CG_ARGC );
00075 }

void trap_Argv int  n,
char *  buffer,
int  bufferLength
 

Definition at line 77 of file cg_syscalls.c.

References buffer, CG_ARGV, n, and UI_ARGV.

Referenced by CG_Argv(), CG_TargetCommand_f(), ClientCommand(), Cmd_CallTeamVote_f(), Cmd_CallVote_f(), Cmd_Follow_f(), Cmd_GameCommand_f(), Cmd_SetViewpos_f(), Cmd_Team_f(), Cmd_TeamTask_f(), Cmd_TeamVote_f(), Cmd_Tell_f(), Cmd_VoiceTell_f(), Cmd_Vote_f(), ConcatArgs(), ConsoleCommand(), Svcmd_AddBot_f(), Svcmd_AddIP_f(), Svcmd_ForceTeam_f(), Svcmd_RemoveIP_f(), and UI_Argv().

00077                                                            {
00078     syscall( CG_ARGV, n, buffer, bufferLength );
00079 }

void trap_CIN_DrawCinematic int  handle  ) 
 

Definition at line 415 of file cg_syscalls.c.

References CG_CIN_DRAWCINEMATIC, and UI_CIN_DRAWCINEMATIC.

Referenced by UI_DrawCinematic(), UI_DrawClanCinematic(), UI_DrawMapCinematic(), UI_DrawNetMapCinematic(), and UI_DrawPreviewCinematic().

00415                                          {
00416   syscall(CG_CIN_DRAWCINEMATIC, handle);
00417 }

int trap_CIN_PlayCinematic const char *  arg0,
int  xpos,
int  ypos,
int  width,
int  height,
int  bits
 

Definition at line 397 of file cg_syscalls.c.

References bits, CG_CIN_PLAYCINEMATIC, height, UI_CIN_PLAYCINEMATIC, and width.

Referenced by UI_DrawClanCinematic(), UI_DrawMapCinematic(), UI_DrawPreviewCinematic(), UI_FeederSelection(), and UI_PlayCinematic().

00397                                                                                                    {
00398   return syscall(CG_CIN_PLAYCINEMATIC, arg0, xpos, ypos, width, height, bits);
00399 }

e_status trap_CIN_RunCinematic int  handle  ) 
 

Definition at line 409 of file cg_syscalls.c.

References CG_CIN_RUNCINEMATIC, e_status, and UI_CIN_RUNCINEMATIC.

Referenced by UI_DrawClanCinematic(), UI_DrawMapCinematic(), UI_DrawNetMapCinematic(), UI_DrawPreviewCinematic(), and UI_RunCinematicFrame().

00409                                             {
00410   return syscall(CG_CIN_RUNCINEMATIC, handle);
00411 }

void trap_CIN_SetExtents int  handle,
int  x,
int  y,
int  w,
int  h
 

Definition at line 421 of file cg_syscalls.c.

References CG_CIN_SETEXTENTS, h(), UI_CIN_SETEXTENTS, w, x, and y.

Referenced by UI_DrawCinematic(), UI_DrawClanCinematic(), UI_DrawMapCinematic(), UI_DrawNetMapCinematic(), and UI_DrawPreviewCinematic().

00421                                                                   {
00422   syscall(CG_CIN_SETEXTENTS, handle, x, y, w, h);
00423 }

Here is the call graph for this function:

e_status trap_CIN_StopCinematic int  handle  ) 
 

Definition at line 403 of file cg_syscalls.c.

References CG_CIN_STOPCINEMATIC, e_status, and UI_CIN_STOPCINEMATIC.

Referenced by UI_ClanName_HandleKey(), UI_FeederSelection(), UI_RunMenuScript(), and UI_StopCinematic().

00403                                             {
00404   return syscall(CG_CIN_STOPCINEMATIC, handle);
00405 }

int trap_CM_LerpTag orientation_t tag,
clipHandle_t  mod,
int  startFrame,
int  endFrame,
float  frac,
const char *  tagName
 

Definition at line 181 of file ui_syscalls.c.

References PASSFLOAT(), and UI_CM_LERPTAG.

Referenced by UI_PositionEntityOnTag(), and UI_PositionRotatedEntityOnTag().

00181                                                                                                                            {
00182     return syscall( UI_CM_LERPTAG, tag, mod, startFrame, endFrame, PASSFLOAT(frac), tagName );
00183 }

Here is the call graph for this function:

void trap_Cmd_ExecuteText int  exec_when,
const char *  text
 

Definition at line 101 of file ui_syscalls.c.

References UI_CMD_EXECUTETEXT.

Referenced by ArenaServers_DoRefresh(), ArenaServers_Go(), ArenaServers_StartRefresh(), Controls_SetConfig(), Demos_MenuEvent(), GraphicsOptions_ApplyChanges(), InGame_Event(), InGame_RestartAction(), LoadConfig_MenuEvent(), Main_MenuEvent(), Menu_DefaultKey(), NeedCDAction(), NeedCDKeyAction(), Rankings_MenuEvent(), ServerOptions_Start(), Setup_ResetDefaults_Action(), SpecifyServer_Event(), TeamMain_MenuEvent(), UI_AddBotsMenu_FightEvent(), UI_CinematicsMenu_Event(), UI_CreditMenu_Key(), UI_KeyConnect(), UI_Mods_MenuEvent(), UI_RemoveBotsMenu_DeleteEvent(), UI_RunMenuScript(), UI_SaveConfigMenu_SaveEvent(), UI_SoundOptionsMenu_Event(), UI_SPArena_Start(), UI_SPPostgameMenu_AgainEvent(), UI_SPPostgameMenu_f(), UI_SPPostgameMenu_MenuDraw(), UI_SPPostgameMenu_MenuEvent(), UI_SPPostgameMenu_MenuKey(), UI_StartDemoLoop(), UI_StartServerRefresh(), UI_StartSkirmish(), and UI_TeamOrdersMenu_ListEvent().

00101                                                              {
00102     syscall( UI_CMD_EXECUTETEXT, exec_when, text );
00103 }

void trap_Cvar_Create const char *  var_name,
const char *  var_value,
int  flags
 

Definition at line 85 of file ui_syscalls.c.

References UI_CVAR_CREATE.

00085                                                                                 {
00086     syscall( UI_CVAR_CREATE, var_name, var_value, flags );
00087 }

void trap_Cvar_InfoStringBuffer int  bit,
char *  buffer,
int  bufsize
 

Definition at line 89 of file ui_syscalls.c.

References buffer, and UI_CVAR_INFOSTRINGBUFFER.

00089                                                                       {
00090     syscall( UI_CVAR_INFOSTRINGBUFFER, bit, buffer, bufsize );
00091 }

void trap_Cvar_Register vmCvar_t vmCvar,
const char *  varName,
const char *  defaultValue,
int  flags
 

Definition at line 57 of file cg_syscalls.c.

References CG_CVAR_REGISTER, UI_CVAR_REGISTER, and value.

Referenced by _UI_Init(), ArenaServers_MenuInit(), BotAILoadMap(), BotAISetup(), BotSetupDeathmatchAI(), CG_RegisterCvars(), G_InitBots(), G_LoadArenas(), G_LoadBots(), G_RegisterCvars(), UI_LoadArenas(), UI_LoadBots(), and UI_RegisterCvars().

00057                                                                                                          {
00058     syscall( CG_CVAR_REGISTER, vmCvar, varName, defaultValue, flags );
00059 }

void trap_Cvar_Reset const char *  name  ) 
 

Definition at line 81 of file ui_syscalls.c.

References name, and UI_CVAR_RESET.

Referenced by Controls_InitCvars(), and Preferences_Event().

00081                                          {
00082     syscall( UI_CVAR_RESET, name ); 
00083 }

void trap_Cvar_Set const char *  var_name,
const char *  value
 

Definition at line 65 of file cg_syscalls.c.

References CG_CVAR_SET, UI_CVAR_SET, and value.

Referenced by _UI_Init(), _UI_KeyEvent(), _UI_SetActiveMenu(), ArenaServers_SaveChanges(), BeginIntermission(), BotAIStartFrame(), BotInterbreedEndMatch(), BotInterbreeding(), BotWriteSessionData(), CG_CalcVrect(), CG_DrawActiveFrame(), CG_MapRestart(), CG_ParseServerinfo(), CG_PredictPlayerState(), CG_SetSelectedPlayerName(), CG_ShowResponseHead(), CG_SizeDown_f(), CG_SizeUp_f(), CG_StartOrbit_f(), CG_UpdateCvars(), CheckCvars(), CheckTournament(), ClientThink_real(), ErrorMessage_Key(), Favorites_Add(), G_InitBots(), G_RankRunFrame(), G_RegisterCvars(), G_RunFrame(), G_SpawnBots(), G_WriteClientSessionData(), G_WriteSessionData(), GraphicsOptions_ApplyChanges(), Main_MenuEvent(), PlayerModel_SaveChanges(), PlayerSettings_MenuEvent(), PlayerSettings_SaveChanges(), ServerOptions_Start(), SP_worldspawn(), SpecifyLeague_Event(), UI_BuildFindPlayerList(), UI_BuildPlayerList(), UI_CalcPostGameStats(), UI_CDKeyMenu_Init(), UI_CinematicsMenu_Event(), UI_ClanName_HandleKey(), UI_Crosshair_HandleKey(), UI_DrawJoinGameType(), UI_DrawMapCinematic(), UI_DrawMapPreview(), UI_DrawMapTimeToBeat(), UI_DrawNetGameType(), UI_DrawNetMapCinematic(), UI_FeederSelection(), UI_ForceMenuOff(), UI_GameType_HandleKey(), UI_Handicap_HandleKey(), UI_JoinGameType_HandleKey(), UI_LogAwardData(), UI_MainMenu(), UI_Mods_MenuEvent(), UI_NetGameType_HandleKey(), UI_NetSource_HandleKey(), UI_NewGame(), UI_NextOpponent(), UI_Pause(), UI_PriorOpponent(), UI_RunMenuScript(), UI_SelectedPlayer_HandleKey(), UI_SetActiveMenu(), UI_SetBestScore(), UI_SetBestScores(), UI_SetCapFragLimits(), UI_ShowPostGame(), UI_ShowTierVideo(), UI_Skill_HandleKey(), UI_SPLevelMenu_Init(), UI_SPPostgameMenu_MenuDraw(), UI_SPUnlock_f(), UI_SPUnlockMedals_f(), UI_StartServerRefresh(), UI_StartSkirmish(), UI_TeamMember_HandleKey(), UI_TeamName_HandleKey(), UI_Update(), and UpdateIPBans().

00065                                                                  {
00066     syscall( CG_CVAR_SET, var_name, value );
00067 }

void trap_Cvar_SetValue const char *  var_name,
float  value
 

Definition at line 77 of file ui_syscalls.c.

References PASSFLOAT(), UI_CVAR_SETVALUE, and value.

Referenced by ArenaServers_Event(), Controls_InitCvars(), Controls_SetConfig(), GraphicsOptions_ApplyChanges(), PlayerSettings_SaveChanges(), Preferences_Event(), Reset_MenuEvent(), ServerOptions_Start(), StartServer_MenuEvent(), UI_DisplayOptionsMenu_Event(), UI_Effects_HandleKey(), UI_NetworkOptionsMenu_Event(), UI_RunMenuScript(), UI_SoundOptionsMenu_Event(), UI_SPArena_Start(), UI_SPLevelMenu_LevelEvent(), UI_SPLevelMenu_ResetAction(), UI_SPLevelMenu_SetMenuItems(), UI_SPPostgameMenu_MenuDraw(), UI_SPSkillMenu_SkillEvent(), UI_StartSkirmish(), and UI_Update().

00077                                                              {
00078     syscall( UI_CVAR_SETVALUE, var_name, PASSFLOAT( value ) );
00079 }

Here is the call graph for this function:

void trap_Cvar_Update vmCvar_t vmCvar  ) 
 

Definition at line 61 of file cg_syscalls.c.

References CG_CVAR_UPDATE, and UI_CVAR_UPDATE.

Referenced by BotAIStartFrame(), BotCheckConsoleMessages(), BotInterbreedEndMatch(), BotInterbreeding(), BotTestAAS(), CG_UpdateCvars(), G_CheckMinimumPlayers(), G_UpdateCvars(), and UI_UpdateCvars().

00061                                              {
00062     syscall( CG_CVAR_UPDATE, vmCvar );
00063 }

void trap_Cvar_VariableStringBuffer const char *  var_name,
char *  buffer,
int  bufsize
 

Definition at line 69 of file cg_syscalls.c.

References buffer, CG_CVAR_VARIABLESTRINGBUFFER, and UI_CVAR_VARIABLESTRINGBUFFER.

Referenced by _UI_SetActiveMenu(), ArenaServers_LoadFavorites(), ArenaServers_StartRefresh(), BG_AddPredictableEventToPlayerstate(), BotInitLibrary(), BotReadSessionData(), CG_DrawInformation(), CG_NewClientInfo(), CG_RegisterCvars(), CG_StartOrbit_f(), Cmd_CallVote_f(), Controls_DrawPlayer(), Controls_MenuInit(), Favorites_Add(), G_InitWorldSession(), G_RankGameOver(), G_ReadSessionData(), PlayerModel_SetMenuItems(), PlayerSettings_DrawPlayer(), ServerOptions_InitPlayerItems(), SpecifyLeague_GetList(), trap_Cvar_VariableValue(), UI_BuildFindPlayerList(), UI_BuildServerDisplayList(), UI_CanShowTierVideo(), UI_Cvar_VariableString(), UI_DrawConnectScreen(), UI_GetAwardLevel(), UI_GetBestScore(), UI_LogAwardData(), UI_MainMenu(), UI_SetBestScore(), UI_ShowTierVideo(), UI_SPLevelMenu_Init(), UI_SPLevelMenu_MenuDraw(), UI_SPUnlock_f(), and UI_SPUnlockMedals_f().

00069                                                                                        {
00070     syscall( CG_CVAR_VARIABLESTRINGBUFFER, var_name, buffer, bufsize );
00071 }

float trap_Cvar_VariableValue const char *  var_name  ) 
 

Definition at line 55 of file g_bot.c.

References atof(), trap_Cvar_VariableStringBuffer(), and UI_CVAR_VARIABLEVALUE.

Referenced by _UI_Init(), ArenaServers_MaxPing(), ArenaServers_MenuInit(), ArenaServers_StartRefresh(), Controls_InitCvars(), Controls_SetConfig(), Demos_MenuInit(), G_AddRandomBot(), G_SpawnBots(), GraphicsOptions_SetMenuItems(), InGame_MenuInit(), PlayerModel_BuildList(), PlayerSettings_SetMenuItems(), Preferences_SetMenuItems(), Punkbuster_ConfirmDisable(), Punkbuster_ConfirmEnable(), Rankings_MenuInit(), ServerOptions_MenuInit(), ServerOptions_SetMenuItems(), Signup_MenuInit(), StartServer_Cache(), UI_AddBotsMenu_Init(), UI_BotName_HandleKey(), UI_BuildPlayerList(), UI_CalcPostGameStats(), UI_DisplayDownloadInfo(), UI_DisplayOptionsMenu_Init(), UI_DrawBotName(), UI_DrawHandicap(), UI_DrawPlayerModel(), UI_DrawSkill(), UI_DrawTeamMember(), UI_DrawTier(), UI_DrawTierGameType(), UI_DrawTierMap(), UI_DrawTierMapName(), UI_Handicap_HandleKey(), UI_InitGameinfo(), UI_LoadBestScores(), UI_LoadDemos(), UI_NetworkOptionsMenu_Init(), UI_OwnerDrawVisible(), UI_OwnerDrawWidth(), UI_RankStatusMenu(), UI_RunMenuScript(), UI_SelectedPlayer_HandleKey(), UI_ServerInfoMenu(), UI_SetBestScore(), UI_SetupMenu_Init(), UI_Skill_HandleKey(), UI_SoundOptionsMenu_Init(), UI_SPArena_Start(), UI_SPLevelMenu_Init(), UI_SPPostgameMenu_Cache(), UI_SPPostgameMenu_MenuDraw(), UI_SPSkillMenu_Init(), UI_SPSkillMenu_SkillEvent(), UI_StartServerRefresh(), UI_StartSkirmish(), UI_TeamMember_HandleKey(), and UI_Update().

00055                                                       {
00056     char buf[128];
00057 
00058     trap_Cvar_VariableStringBuffer(var_name, buf, sizeof(buf));
00059     return atof(buf);
00060 }

Here is the call graph for this function:

void trap_Error const char *  string  ) 
 

Definition at line 49 of file cg_syscalls.c.

References CG_ERROR, string(), and UI_ERROR.

Referenced by CG_Error(), Com_Error(), G_Error(), Menu_AddItem(), Menu_Draw(), MField_Draw(), UI_LoadMenus(), UI_PopMenu(), UI_PushMenu(), and UI_SetLerpFrameAnimation().

00049                                       {
00050     syscall( CG_ERROR, fmt );
00051 }

Here is the call graph for this function:

void trap_FS_FCloseFile fileHandle_t  f  ) 
 

Definition at line 97 of file cg_syscalls.c.

References CG_FS_FCLOSEFILE, f, and UI_FS_FCLOSEFILE.

Referenced by CG_HeadModelVoiceChats(), CG_ParseAnimationFile(), CG_ParseVoiceChats(), G_LoadArenasFromFile(), G_LoadBotsFromFile(), G_ShutdownGame(), GetMenuBuffer(), UI_CalcPostGameStats(), UI_ClearScores(), UI_LoadArenasFromFile(), UI_LoadBestScores(), UI_LoadBotsFromFile(), and UI_ParseAnimationFile().

00097                                              {
00098     syscall( CG_FS_FCLOSEFILE, f );
00099 }

int trap_FS_FOpenFile const char *  qpath,
fileHandle_t f,
fsMode_t  mode
 

Definition at line 85 of file cg_syscalls.c.

References CG_FS_FOPENFILE, f, mode, and UI_FS_FOPENFILE.

Referenced by CG_FileExists(), CG_HeadModelVoiceChats(), CG_ParseAnimationFile(), CG_ParseVoiceChats(), G_InitGame(), G_LoadArenasFromFile(), G_LoadBotsFromFile(), GetMenuBuffer(), UI_CalcPostGameStats(), UI_ClearScores(), UI_FileExists(), UI_hasSkinForBase(), UI_LoadArenasFromFile(), UI_LoadBestScores(), UI_LoadBotsFromFile(), and UI_ParseAnimationFile().

00085                                                                                {
00086     return syscall( CG_FS_FOPENFILE, qpath, f, mode );
00087 }

int trap_FS_GetFileList const char *  path,
const char *  extension,
char *  listbuf,
int  bufsize
 

Definition at line 79 of file g_syscalls.c.

References G_FS_GETFILELIST, and UI_FS_GETFILELIST.

Referenced by Demos_MenuInit(), G_LoadArenas(), G_LoadBots(), LoadConfig_MenuInit(), PlayerModel_BuildList(), UI_BuildQ3Model_List(), UI_ClearScores(), UI_LoadArenas(), UI_LoadBots(), UI_LoadDemos(), UI_LoadMods(), UI_LoadMovies(), UI_LoadTeams(), UI_Mods_LoadMods(), and UI_TeamArenaExists().

00079                                                                                                 {
00080     return syscall( G_FS_GETFILELIST, path, extension, listbuf, bufsize );
00081 }

void trap_FS_Read void *  buffer,
int  len,
fileHandle_t  f
 

Definition at line 89 of file cg_syscalls.c.

References buffer, CG_FS_READ, f, and UI_FS_READ.

Referenced by CG_HeadModelVoiceChats(), CG_ParseAnimationFile(), CG_ParseVoiceChats(), G_LoadArenasFromFile(), G_LoadBotsFromFile(), GetMenuBuffer(), UI_CalcPostGameStats(), UI_LoadArenasFromFile(), UI_LoadBestScores(), UI_LoadBotsFromFile(), and UI_ParseAnimationFile().

00089                                                               {
00090     syscall( CG_FS_READ, buffer, len, f );
00091 }

int trap_FS_Seek fileHandle_t  f,
long  offset,
int  origin
 

Definition at line 101 of file cg_syscalls.c.

References CG_FS_SEEK, f, offset, and UI_FS_SEEK.

00101                                                             {
00102     return syscall( CG_FS_SEEK, f, offset, origin );
00103 }

void trap_FS_Write const void *  buffer,
int  len,
fileHandle_t  f
 

Definition at line 93 of file cg_syscalls.c.

References buffer, CG_FS_WRITE, f, and UI_FS_WRITE.

Referenced by G_LogPrintf(), UI_CalcPostGameStats(), and UI_ClearScores().

00093                                                                      {
00094     syscall( CG_FS_WRITE, buffer, len, f );
00095 }

void trap_GetCDKey char *  buf,
int  buflen
 

Definition at line 321 of file ui_syscalls.c.

References UI_GET_CDKEY.

Referenced by UI_CDKeyMenu_Init(), UI_MainMenu(), and UI_RunMenuScript().

00321                                             {
00322     syscall( UI_GET_CDKEY, buf, buflen );
00323 }

void trap_GetClientState uiClientState_t state  ) 
 

Definition at line 233 of file ui_syscalls.c.

References state, and UI_GETCLIENTSTATE.

Referenced by InGame_MenuInit(), Options_MenuInit(), UI_BuildPlayerList(), UI_ConfirmMenu_Style(), UI_DrawConnectScreen(), UI_Message(), UI_ResetMenu(), UI_TeamOrdersMenu_BuildBotList(), and UI_TeamOrdersMenu_f().

00233                                                    {
00234     syscall( UI_GETCLIENTSTATE, state );
00235 }

void trap_GetClipboardData char *  buf,
int  bufsize
 

Definition at line 229 of file ui_syscalls.c.

References UI_GETCLIPBOARDDATA.

Referenced by MField_Paste().

00229                                                      {
00230     syscall( UI_GETCLIPBOARDDATA, buf, bufsize );
00231 }

int trap_GetConfigString int  index,
char *  buff,
int  buffsize
 

Definition at line 241 of file ui_syscalls.c.

References UI_GETCONFIGSTRING.

Referenced by InGame_MenuInit(), Prepname(), TeamMain_MenuInit(), UI_AddBotsMenu_Init(), UI_BuildPlayerList(), UI_CalcPostGameStats(), UI_DrawConnectScreen(), UI_RemoveBotsMenu_GetBots(), UI_RemoveBotsMenu_SetBotNames(), UI_ServerInfoMenu(), UI_SPPostgameMenu_f(), UI_SPPostgameMenu_MenuDraw(), UI_SPPostgameMenu_MenuDrawScoreLine(), UI_TeamOrdersMenu_BuildBotList(), and UI_TeamOrdersMenu_f().

00241                                                                 {
00242     return syscall( UI_GETCONFIGSTRING, index, buff, buffsize );
00243 }

void trap_GetGlconfig glconfig_t glconfig  ) 
 

Definition at line 304 of file cg_syscalls.c.

References CG_GETGLCONFIG, and UI_GETGLCONFIG.

Referenced by _UI_Init(), CG_Init(), and UI_Init().

00304                                                      {
00305     syscall( CG_GETGLCONFIG, glconfig );
00306 }

void trap_Key_ClearStates void   ) 
 

Definition at line 217 of file ui_syscalls.c.

References UI_KEY_CLEARSTATES.

00217                                   {
00218     syscall( UI_KEY_CLEARSTATES );
00219 }

void trap_Key_GetBindingBuf int  keynum,
char *  buf,
int  buflen
 

Definition at line 197 of file ui_syscalls.c.

References UI_KEY_GETBINDINGBUF.

Referenced by Controls_GetKeyAssignment().

00197                                                                  {
00198     syscall( UI_KEY_GETBINDINGBUF, keynum, buf, buflen );
00199 }

int trap_Key_GetCatcher void   ) 
 

Definition at line 352 of file cg_syscalls.c.

References CG_KEY_GETCATCHER, and UI_KEY_GETCATCHER.

00352                                 {
00353     return syscall( CG_KEY_GETCATCHER );
00354 }

qboolean trap_Key_GetOverstrikeMode void   ) 
 

Definition at line 209 of file ui_syscalls.c.

References qboolean, and UI_KEY_GETOVERSTRIKEMODE.

00209                                             {
00210     return syscall( UI_KEY_GETOVERSTRIKEMODE );
00211 }

qboolean trap_Key_IsDown int  keynum  ) 
 

Definition at line 348 of file cg_syscalls.c.

References CG_KEY_ISDOWN, qboolean, and UI_KEY_ISDOWN.

Referenced by MField_KeyDownEvent().

00348                                        {
00349     return syscall( CG_KEY_ISDOWN, keynum );
00350 }

void trap_Key_KeynumToStringBuf int  keynum,
char *  buf,
int  buflen
 

Definition at line 193 of file ui_syscalls.c.

References UI_KEY_KEYNUMTOSTRINGBUF.

Referenced by Controls_DrawKeyBinding().

00193                                                                      {
00194     syscall( UI_KEY_KEYNUMTOSTRINGBUF, keynum, buf, buflen );
00195 }

void trap_Key_SetBinding int  keynum,
const char *  binding
 

Definition at line 201 of file ui_syscalls.c.

References UI_KEY_SETBINDING.

Referenced by Controls_MenuKey(), and Controls_SetConfig().

00201                                                             {
00202     syscall( UI_KEY_SETBINDING, keynum, binding );
00203 }

void trap_Key_SetCatcher int  catcher  ) 
 

Definition at line 356 of file cg_syscalls.c.

References CG_KEY_SETCATCHER, and UI_KEY_SETCATCHER.

Referenced by _UI_KeyEvent(), _UI_SetActiveMenu(), CG_KeyEvent(), CG_MouseEvent(), UI_ForceMenuOff(), UI_MainMenu(), UI_Pause(), UI_PushMenu(), UI_RunMenuScript(), UI_SPLevelMenu_f(), and UI_SPPostgameMenu_f().

00356                                         {
00357     syscall( CG_KEY_SETCATCHER, catcher );
00358 }

void trap_Key_SetOverstrikeMode qboolean  state  ) 
 

Definition at line 213 of file ui_syscalls.c.

References state, and UI_KEY_SETOVERSTRIKEMODE.

Referenced by MField_KeyDownEvent().

00213                                                   {
00214     syscall( UI_KEY_SETOVERSTRIKEMODE, state );
00215 }

int trap_LAN_AddServer int  source,
const char *  name,
const char *  addr
 

Definition at line 305 of file ui_syscalls.c.

References name, source, and UI_LAN_ADDSERVER.

Referenced by UI_RunMenuScript().

00305                                                                        {
00306     return syscall( UI_LAN_ADDSERVER, source, name, addr );
00307 }

void trap_LAN_ClearPing int  n  ) 
 

Definition at line 281 of file ui_syscalls.c.

References n, and UI_LAN_CLEARPING.

Referenced by ArenaServers_DoRefresh(), and ArenaServers_StartRefresh().

00281                                  {
00282     syscall( UI_LAN_CLEARPING, n );
00283 }

int trap_LAN_CompareServers int  source,
int  sortKey,
int  sortDir,
int  s1,
int  s2
 

Definition at line 313 of file ui_syscalls.c.

References source, and UI_LAN_COMPARESERVERS.

Referenced by UI_BinaryServerInsertion(), and UI_ServersQsortCompare().

00313                                                                                     {
00314     return syscall( UI_LAN_COMPARESERVERS, source, sortKey, sortDir, s1, s2 );
00315 }

void trap_LAN_GetPing int  n,
char *  buf,
int  buflen,
int *  pingtime
 

Definition at line 285 of file ui_syscalls.c.

References n, and UI_LAN_GETPING.

Referenced by ArenaServers_DoRefresh().

00285                                                                      {
00286     syscall( UI_LAN_GETPING, n, buf, buflen, pingtime );
00287 }

void trap_LAN_GetPingInfo int  n,
char *  buf,
int  buflen
 

Definition at line 289 of file ui_syscalls.c.

References n, and UI_LAN_GETPINGINFO.

Referenced by ArenaServers_DoRefresh().

00289                                                           {
00290     syscall( UI_LAN_GETPINGINFO, n, buf, buflen );
00291 }

int trap_LAN_GetPingQueueCount void   ) 
 

Definition at line 261 of file ui_syscalls.c.

References UI_LAN_GETPINGQUEUECOUNT.

00261                                        {
00262     return syscall( UI_LAN_GETPINGQUEUECOUNT );
00263 }

void trap_LAN_GetServerAddressString int  source,
int  n,
char *  buf,
int  buflen
 

Definition at line 249 of file ui_syscalls.c.

References n, source, and UI_LAN_GETSERVERADDRESSSTRING.

Referenced by ArenaServers_DoRefresh(), UI_BuildFindPlayerList(), and UI_RunMenuScript().

00249                                                                                  {
00250     syscall( UI_LAN_GETSERVERADDRESSSTRING, source, n, buf, buflen );
00251 }

int trap_LAN_GetServerCount int  source  ) 
 

Definition at line 245 of file ui_syscalls.c.

References source, and UI_LAN_GETSERVERCOUNT.

Referenced by ArenaServers_DoRefresh(), UI_BuildServerDisplayList(), UI_DoServerRefresh(), UI_DrawServerRefreshDate(), and UI_StopServerRefresh().

00245                                           {
00246     return syscall( UI_LAN_GETSERVERCOUNT, source );
00247 }

void trap_LAN_GetServerInfo int  source,
int  n,
char *  buf,
int  buflen
 

Definition at line 253 of file ui_syscalls.c.

References n, source, and UI_LAN_GETSERVERINFO.

Referenced by UI_BuildFindPlayerList(), UI_BuildServerDisplayList(), UI_FeederItemText(), UI_FeederSelection(), and UI_RunMenuScript().

00253                                                                         {
00254     syscall( UI_LAN_GETSERVERINFO, source, n, buf, buflen );
00255 }

int trap_LAN_GetServerPing int  source,
int  n
 

Definition at line 257 of file ui_syscalls.c.

References n, source, and UI_LAN_GETSERVERPING.

Referenced by UI_BuildServerDisplayList().

00257                                                 {
00258     return syscall( UI_LAN_GETSERVERPING, source, n );
00259 }

void trap_LAN_LoadCachedServers  ) 
 

Definition at line 273 of file ui_syscalls.c.

References UI_LAN_LOADCACHEDSERVERS.

Referenced by _UI_Init().

00273                                   {
00274     syscall( UI_LAN_LOADCACHEDSERVERS );
00275 }

void trap_LAN_MarkServerVisible int  source,
int  n,
qboolean  visible
 

Definition at line 293 of file ui_syscalls.c.

References n, source, and UI_LAN_MARKSERVERVISIBLE.

Referenced by UI_BuildServerDisplayList(), and UI_StartServerRefresh().

00293                                                                        {
00294     syscall( UI_LAN_MARKSERVERVISIBLE, source, n, visible );
00295 }

void trap_LAN_RemoveServer int  source,
const char *  addr
 

Definition at line 309 of file ui_syscalls.c.

References source, and UI_LAN_REMOVESERVER.

Referenced by UI_RunMenuScript().

00309                                                          {
00310     syscall( UI_LAN_REMOVESERVER, source, addr );
00311 }

void trap_LAN_ResetPings int  n  ) 
 

Definition at line 277 of file ui_syscalls.c.

References n, and UI_LAN_RESETPINGS.

Referenced by UI_StartServerRefresh(), and UI_UpdatePendingPings().

00277                                 {
00278     syscall( UI_LAN_RESETPINGS, n );
00279 }

void trap_LAN_SaveCachedServers  ) 
 

Definition at line 269 of file ui_syscalls.c.

References UI_LAN_SAVECACHEDSERVERS.

Referenced by _UI_Shutdown().

00269                                   {
00270     syscall( UI_LAN_SAVECACHEDSERVERS );
00271 }

int trap_LAN_ServerIsVisible int  source,
int  n
 

Definition at line 297 of file ui_syscalls.c.

References n, source, and UI_LAN_SERVERISVISIBLE.

Referenced by UI_BuildServerDisplayList().

00297                                                  {
00298     return syscall( UI_LAN_SERVERISVISIBLE, source, n );
00299 }

int trap_LAN_ServerStatus const char *  serverAddress,
char *  serverStatus,
int  maxLen
 

Definition at line 265 of file ui_syscalls.c.

References UI_LAN_SERVERSTATUS.

Referenced by UI_BuildFindPlayerList(), UI_BuildServerStatus(), and UI_GetServerStatusInfo().

00265                                                                                        {
00266     return syscall( UI_LAN_SERVERSTATUS, serverAddress, serverStatus, maxLen );
00267 }

qboolean trap_LAN_UpdateVisiblePings int  source  ) 
 

Definition at line 301 of file ui_syscalls.c.

References qboolean, source, and UI_LAN_UPDATEVISIBLEPINGS.

Referenced by UI_DoServerRefresh().

00301                                                    {
00302     return syscall( UI_LAN_UPDATEVISIBLEPINGS, source );
00303 }

int trap_MemoryRemaining void   ) 
 

Definition at line 344 of file cg_syscalls.c.

References CG_MEMORY_REMAINING, and UI_MEMORY_REMAINING.

00344                                  {
00345     return syscall( CG_MEMORY_REMAINING );
00346 }

int trap_Milliseconds void   ) 
 

Definition at line 53 of file cg_syscalls.c.

References CG_MILLISECONDS, and UI_MILLISECONDS.

00053                                   {
00054     return syscall( CG_MILLISECONDS ); 
00055 }

void trap_Print const char *  string  ) 
 

Definition at line 45 of file cg_syscalls.c.

References CG_PRINT, string(), and UI_PRINT.

Referenced by CG_HeadModelVoiceChats(), CG_ParseVoiceChats(), CG_Printf(), Com_Printf(), GetMenuBuffer(), UI_GetArenaInfoByNumber(), UI_GetBotInfoByNumber(), UI_LoadArenas(), UI_LoadArenasFromFile(), UI_LoadBots(), UI_LoadBotsFromFile(), UI_LogAwardData(), UI_Mods_LoadMods(), UI_SPUnlock_f(), and UI_SPUnlockMedals_f().

00045                                       {
00046     syscall( CG_PRINT, fmt );
00047 }

Here is the call graph for this function:

void trap_R_AddLightToScene const vec3_t  org,
float  intensity,
float  r,
float  g,
float  b
 

Definition at line 270 of file cg_syscalls.c.

References b, CG_R_ADDLIGHTTOSCENE, g(), PASSFLOAT(), r, and UI_R_ADDLIGHTTOSCENE.

Referenced by CG_AddExplosion(), CG_AddPlayerWeapon(), CG_AddSpriteExplosion(), CG_EntityEffects(), CG_Missile(), CG_PlayerPowerups(), and UI_DrawPlayer().

00270                                                                                                {
00271     syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) );
00272 }

Here is the call graph for this function:

void trap_R_AddPolyToScene qhandle_t  hShader,
int  numVerts,
const polyVert_t verts
 

Definition at line 258 of file cg_syscalls.c.

References CG_R_ADDPOLYTOSCENE, and UI_R_ADDPOLYTOSCENE.

Referenced by CG_AddMarks(), CG_AddParticleToScene(), CG_ImpactMark(), CG_PlayerSplash(), and CG_Tracer().

00258                                                                                            {
00259     syscall( CG_R_ADDPOLYTOSCENE, hShader, numVerts, verts );
00260 }

void trap_R_AddRefEntityToScene const refEntity_t re  ) 
 

Definition at line 254 of file cg_syscalls.c.

References CG_R_ADDREFENTITYTOSCENE, re, and UI_R_ADDREFENTITYTOSCENE.

Referenced by CG_AddExplosion(), CG_AddFadeRGB(), CG_AddFallScaleFade(), CG_AddFragment(), CG_AddMoveScaleFade(), CG_AddPlayerWeapon(), CG_AddRefEntityWithPowerups(), CG_AddScaleFade(), CG_AddScorePlum(), CG_AddSpriteExplosion(), CG_AddTestModel(), CG_AddWeaponWithPowerups(), CG_Beam(), CG_DamageBlendBlob(), CG_Draw3DModel(), CG_General(), CG_Grapple(), CG_GrappleTrail(), CG_Item(), CG_LightningBolt(), CG_Missile(), CG_Mover(), CG_Player(), CG_PlayerFlag(), CG_PlayerFloatSprite(), CG_Portal(), CG_TeamBase(), CG_TrailItem(), Main_MenuDraw(), UI_DrawPlayer(), and UI_PlayerFloatSprite().

00254                                                             {
00255     syscall( CG_R_ADDREFENTITYTOSCENE, re );
00256 }

void trap_R_ClearScene void   ) 
 

Definition at line 250 of file cg_syscalls.c.

References CG_R_CLEARSCENE, and UI_R_CLEARSCENE.

00250                                   {
00251     syscall( CG_R_CLEARSCENE );
00252 }

void trap_R_DrawStretchPic float  x,
float  y,
float  w,
float  h,
float  s1,
float  t1,
float  s2,
float  t2,
qhandle_t  hShader
 

Definition at line 286 of file cg_syscalls.c.

References CG_R_DRAWSTRETCHPIC, h(), PASSFLOAT(), UI_R_DRAWSTRETCHPIC, w, x, and y.

Referenced by _UI_DrawSides(), _UI_DrawTopBottom(), CG_DrawChar(), CG_DrawInformation(), CG_DrawLagometer(), CG_DrawPic(), CG_DrawSides(), CG_DrawTopBottom(), CG_FillRect(), CG_TileClearBox(), Text_PaintChar(), UI_DrawBannerString2(), UI_DrawHandlePic(), UI_DrawNamedPic(), UI_DrawProportionalString2(), UI_DrawRect(), UI_DrawSides(), UI_DrawString2(), UI_DrawTopBottom(), and UI_FillRect().

00287                                                                                            {
00288     syscall( CG_R_DRAWSTRETCHPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), hShader );
00289 }

Here is the call graph for this function:

void trap_R_ModelBounds clipHandle_t  model,
vec3_t  mins,
vec3_t  maxs
 

Definition at line 291 of file cg_syscalls.c.

References CG_R_MODELBOUNDS, and UI_R_MODELBOUNDS.

Referenced by CG_DrawFlagModel(), CG_DrawHead(), CG_DrawSelectedPlayerHead(), CG_RegisterGraphics(), and CG_RegisterWeapon().

00291                                                                            {
00292     syscall( CG_R_MODELBOUNDS, model, mins, maxs );
00293 }

void trap_R_RegisterFont const char *  pFontname,
int  pointSize,
fontInfo_t font
 

Definition at line 246 of file cg_syscalls.c.

References CG_R_REGISTERFONT, and UI_R_REGISTERFONT.

Referenced by Asset_Parse().

00246                                                                                 {
00247     syscall(CG_R_REGISTERFONT, fontName, pointSize, font );
00248 }

qhandle_t trap_R_RegisterModel const char *  name  ) 
 

Definition at line 230 of file cg_syscalls.c.

References CG_R_REGISTERMODEL, name, qhandle_t, and UI_R_REGISTERMODEL.

Referenced by CG_AddTestModel(), CG_ConfigStringModified(), CG_RegisterClientModelname(), CG_RegisterGraphics(), CG_RegisterItemVisuals(), CG_RegisterWeapon(), CG_TestModel_f(), Controls_InitWeapons(), MainMenu_Cache(), UI_PlayerInfo_SetWeapon(), and UI_RegisterClientModelname().

00230                                                    {
00231     return syscall( CG_R_REGISTERMODEL, name );
00232 }

qhandle_t trap_R_RegisterShaderNoMip const char *  name  ) 
 

Definition at line 242 of file cg_syscalls.c.

References CG_R_REGISTERSHADERNOMIP, name, qhandle_t, and UI_R_REGISTERSHADERNOMIP.

Referenced by _UI_Init(), ArenaServers_Cache(), Asset_Parse(), AssetCache(), Bitmap_Draw(), CG_DrawInformation(), CG_Init(), CG_LoadingClient(), CG_LoadingItem(), CG_RegisterClientModelname(), CG_RegisterGraphics(), ConfirmMenu_Cache(), Controls_Cache(), Demos_Cache(), DriverInfo_Cache(), GraphicsOptions_Cache(), InGame_Cache(), Login_Cache(), MapList_Parse(), Menu_Cache(), PlayerIcon(), PlayerIconHandle(), PlayerModel_Cache(), PlayerSettings_Cache(), Preferences_Cache(), Rankings_Cache(), RankStatus_Cache(), Reset_Cache(), ServerInfo_Cache(), ServerOptions_Cache(), ServerPlayerIcon(), Signup_Cache(), SpecifyLeague_Cache(), SpecifyServer_Cache(), StartServer_Cache(), StartServer_LevelshotDraw(), SystemConfig_Cache(), Team_Parse(), TeamMain_Cache(), UI_AddBots_Cache(), UI_BotSelectMenu_Cache(), UI_BuildQ3Model_List(), UI_CDKeyMenu_Cache(), UI_CinematicsMenu_Cache(), UI_DisplayOptionsMenu_Cache(), UI_DrawClanLogo(), UI_DrawMapPreview(), UI_DrawNamedPic(), UI_DrawOpponentLogo(), UI_DrawOpponentLogoMetal(), UI_DrawOpponentLogoName(), UI_DrawPlayer(), UI_DrawPlayerLogo(), UI_DrawPlayerLogoMetal(), UI_DrawPlayerLogoName(), UI_DrawTierMap(), UI_FeederItemImage(), UI_FeederSelection(), UI_LoadConfig_Cache(), UI_ModsMenu_Cache(), UI_NetworkOptionsMenu_Cache(), UI_RemoveBots_Cache(), UI_SaveConfigMenu_Cache(), UI_SetupMenu_Cache(), UI_SoundOptionsMenu_Cache(), UI_SPLevelMenu_Cache(), UI_SPLevelMenu_SetMenuArena(), UI_SPPostgameMenu_Cache(), UI_SPSkillMenu_Cache(), and UI_TeamOrdersMenu_Cache().

00242                                                          {
00243     return syscall( CG_R_REGISTERSHADERNOMIP, name );
00244 }

qhandle_t trap_R_RegisterSkin const char *  name  ) 
 

Definition at line 234 of file cg_syscalls.c.

References CG_R_REGISTERSKIN, name, qhandle_t, and UI_R_REGISTERSKIN.

Referenced by CG_RegisterClientSkin(), CG_RegisterGraphics(), and UI_RegisterClientSkin().

00234                                                   {
00235     return syscall( CG_R_REGISTERSKIN, name );
00236 }

void trap_R_RemapShader const char *  oldShader,
const char *  newShader,
const char *  timeOffset
 

Definition at line 300 of file cg_syscalls.c.

References CG_R_REMAP_SHADER, and UI_R_REMAP_SHADER.

Referenced by CG_ServerCommand(), CG_ShaderStateChanged(), and UI_ConsoleCommand().

00300                                                                                                    {
00301     syscall( CG_R_REMAP_SHADER, oldShader, newShader, timeOffset );
00302 }

void trap_R_RenderScene const refdef_t fd  ) 
 

Definition at line 278 of file cg_syscalls.c.

References CG_R_RENDERSCENE, and UI_R_RENDERSCENE.

Referenced by CG_Draw3DModel(), CG_DrawActive(), Main_MenuDraw(), and UI_DrawPlayer().

00278                                                  {
00279     syscall( CG_R_RENDERSCENE, fd );
00280 }

void trap_R_SetColor const float *  rgba  ) 
 

Definition at line 282 of file cg_syscalls.c.

References CG_R_SETCOLOR, and UI_R_SETCOLOR.

Referenced by _UI_DrawRect(), Bitmap_Draw(), CG_DrawAreaPowerUp(), CG_DrawBlueFlagStatus(), CG_DrawCenterString(), CG_DrawCrosshairNames(), CG_DrawInformation(), CG_DrawLagometer(), CG_DrawMedal(), CG_DrawNewTeamInfo(), CG_DrawPickupItem(), CG_DrawPlayerAmmoValue(), CG_DrawPlayerArmorValue(), CG_DrawPlayerHealth(), CG_DrawPlayerScore(), CG_DrawPowerups(), CG_DrawRect(), CG_DrawRedFlagStatus(), CG_DrawReward(), CG_DrawSelectedPlayerArmor(), CG_DrawSelectedPlayerHealth(), CG_DrawStatusBar(), CG_DrawStringExt(), CG_DrawTeamBackground(), CG_DrawTeamInfo(), CG_DrawTeamOverlay(), CG_DrawWeaponSelect(), CG_FillRect(), CG_OneFlagStatus(), CG_Text_Paint_Limit(), Text_Paint(), Text_Paint_Limit(), Text_PaintWithCursor(), UI_DrawBannerString2(), UI_DrawClanCinematic(), UI_DrawClanLogo(), UI_DrawCrosshair(), UI_DrawOpponentLogo(), UI_DrawOpponentLogoMetal(), UI_DrawOpponentLogoName(), UI_DrawPlayerLogo(), UI_DrawPlayerLogoMetal(), UI_DrawPlayerLogoName(), UI_DrawProportionalString2(), UI_DrawRect(), UI_DrawString2(), UI_FillRect(), UI_SetColor(), and UI_SPLevelMenu_MenuDraw().

00282                                              {
00283     syscall( CG_R_SETCOLOR, rgba );
00284 }

int trap_RealTime qtime_t qtime  ) 
 

Definition at line 388 of file cg_syscalls.c.

References CG_REAL_TIME, qtime_t, and UI_REAL_TIME.

Referenced by UI_StartServerRefresh().

00388                                   {
00389     return syscall( CG_REAL_TIME, qtime );
00390 }

sfxHandle_t trap_S_RegisterSound const char *  sample,
qboolean  compressed
 

Definition at line 218 of file cg_syscalls.c.

References CG_S_REGISTERSOUND, sfxHandle_t, and UI_S_REGISTERSOUND.

Referenced by Asset_Parse(), AssetCache(), CG_ConfigStringModified(), CG_CustomSound(), CG_LoadClientInfo(), CG_LoadingClient(), CG_ParseVoiceChats(), CG_RegisterItemSounds(), CG_RegisterSounds(), CG_RegisterWeapon(), Menu_Cache(), PlayerModel_BuildList(), UI_SPLevelMenu_Cache(), UI_SPPostgameMenu_Cache(), UI_SPPostgameMenu_DrawAwardsPresentation(), UI_SPPostgameMenu_f(), and UI_SPSkillMenu_Cache().

00218                                                                             {
00219     return syscall( CG_S_REGISTERSOUND, sample, compressed );
00220 }

void trap_S_StartBackgroundTrack const char *  intro,
const char *  loop
 

Definition at line 222 of file cg_syscalls.c.

References CG_S_STARTBACKGROUNDTRACK, and UI_S_STARTBACKGROUNDTRACK.

Referenced by CG_StartMusic().

00222                                                                            {
00223     syscall( CG_S_STARTBACKGROUNDTRACK, intro, loop );
00224 }

void trap_S_StartLocalSound sfxHandle_t  sfx,
int  channelNum
 

Definition at line 190 of file cg_syscalls.c.

References CG_S_STARTLOCALSOUND, and UI_S_STARTLOCALSOUND.

Referenced by CG_CheckAmmo(), CG_CheckLocalSounds(), CG_ConfigStringModified(), CG_DrawReward(), CG_DrawTeamVote(), CG_DrawVote(), CG_DrawWarmup(), CG_EntityEvent(), CG_MapRestart(), CG_ParseWarmup(), CG_PlayBufferedSounds(), CG_PlayVoiceChat(), CG_ServerCommand(), UI_DrawPlayer(), UI_KeyEvent(), UI_MouseEvent(), UI_OwnerDrawVisible(), UI_PopMenu(), UI_Refresh(), UI_SPLevelMenu_AwardEvent(), UI_SPPostgameMenu_DrawAwardsPresentation(), UI_SPPostgameMenu_MenuDraw(), UI_SPSkillMenu_BackEvent(), UI_SPSkillMenu_Init(), UI_SPSkillMenu_Key(), and UI_SPSkillMenu_SkillEvent().

00190                                                                   {
00191     syscall( CG_S_STARTLOCALSOUND, sfx, channelNum );
00192 }

void trap_S_StopBackgroundTrack void   ) 
 

Definition at line 384 of file cg_syscalls.c.

References CG_S_STOPBACKGROUNDTRACK, and UI_S_STOPBACKGROUNDTRACK.

00384                                            {
00385     syscall( CG_S_STOPBACKGROUNDTRACK );
00386 }

void trap_SetCDKey char *  buf  ) 
 

Definition at line 325 of file ui_syscalls.c.

References UI_SET_CDKEY.

Referenced by UI_CDKeyMenu_Event(), and UI_RunMenuScript().

00325                                 {
00326     syscall( UI_SET_CDKEY, buf );
00327 }

void trap_SetPbClStatus int  status  ) 
 

Definition at line 399 of file ui_syscalls.c.

References UI_SET_PBCLSTATUS.

Referenced by Punkbuster_ConfirmDisable(), Punkbuster_ConfirmEnable(), and UI_RunMenuScript().

00399                                       {
00400     syscall( UI_SET_PBCLSTATUS, status );
00401 }

void trap_UpdateScreen void   ) 
 

Definition at line 121 of file cg_syscalls.c.

References CG_UPDATESCREEN, and UI_UPDATESCREEN.

00121                                   {
00122     syscall( CG_UPDATESCREEN );
00123 }

qboolean trap_VerifyCDKey const char *  key,
const char *  chksum
 

Definition at line 395 of file ui_syscalls.c.

References qboolean, and UI_VERIFY_CDKEY.

Referenced by UI_CDKeyMenu_Init(), UI_MainMenu(), and UI_RunMenuScript().

00395                                                                 {
00396     return syscall( UI_VERIFY_CDKEY, key, chksum);
00397 }

void UI_AddBots_Cache void   ) 
 

Definition at line 392 of file ui_addbots.c.

References ART_ARROWDOWN, ART_ARROWS, ART_ARROWUP, ART_BACK0, ART_BACK1, ART_BACKGROUND, ART_FIGHT0, ART_FIGHT1, and trap_R_RegisterShaderNoMip().

Referenced by UI_AddBotsMenu_Init(), and UI_Cache_f().

00392                               {
00393     trap_R_RegisterShaderNoMip( ART_BACK0 );
00394     trap_R_RegisterShaderNoMip( ART_BACK1 );
00395     trap_R_RegisterShaderNoMip( ART_FIGHT0 );
00396     trap_R_RegisterShaderNoMip( ART_FIGHT1 );
00397     trap_R_RegisterShaderNoMip( ART_BACKGROUND );
00398     trap_R_RegisterShaderNoMip( ART_ARROWS );
00399     trap_R_RegisterShaderNoMip( ART_ARROWUP );
00400     trap_R_RegisterShaderNoMip( ART_ARROWDOWN );
00401 }

Here is the call graph for this function:

void UI_AddBotsMenu void   ) 
 

Definition at line 409 of file ui_addbots.c.

References addBotsMenuInfo, addBotsMenuInfo_t::menu, UI_AddBotsMenu_Init(), and UI_PushMenu().

Referenced by InGame_Event().

00409                             {
00410     UI_AddBotsMenu_Init();
00411     UI_PushMenu( &addBotsMenuInfo.menu );
00412 }

Here is the call graph for this function:

void UI_AdjustFrom640 float *  x,
float *  y,
float *  w,
float *  h
 

Definition at line 1100 of file ui_atoms.c.

References displayContextDef_t::bias, uiStatic_t::bias, h(), uiStatic_t::scale, uiInfo_t::uiDC, uiInfo, uis, w, x, displayContextDef_t::xscale, y, and displayContextDef_t::yscale.

Referenced by _UI_DrawSides(), _UI_DrawTopBottom(), Main_MenuDraw(), Text_PaintChar(), UI_DrawHandlePic(), UI_DrawNamedPic(), UI_DrawPlayer(), UI_DrawRect(), UI_DrawSides(), UI_DrawTopBottom(), and UI_FillRect().

01100                                                                 {
01101     // expect valid pointers
01102     *x = *x * uis.scale + uis.bias;
01103     *y *= uis.scale;
01104     *w *= uis.scale;
01105     *h *= uis.scale;
01106 }

Here is the call graph for this function:

int UI_AdjustTimeByGame int  time  ) 
 

void UI_ArenaServersMenu void   ) 
 

Definition at line 1637 of file ui_servers2.c.

References ArenaServers_MenuInit(), g_arenaservers, arenaservers_t::menu, and UI_PushMenu().

01637                                  {
01638     ArenaServers_MenuInit();
01639     UI_PushMenu( &g_arenaservers.menu );
01640 }                         

Here is the call graph for this function:

char* UI_Argv int  arg  ) 
 

Definition at line 939 of file ui_atoms.c.

References buffer, and trap_Argv().

Referenced by UI_CalcPostGameStats(), UI_CinematicsMenu_f(), UI_ConsoleCommand(), and UI_SPPostgameMenu_f().

00939                          {
00940     static char buffer[MAX_STRING_CHARS];
00941 
00942     trap_Argv( arg, buffer, sizeof( buffer ) );
00943 
00944     return buffer;
00945 }

Here is the call graph for this function:

void UI_BotSelectMenu char *  bot  ) 
 

Definition at line 1965 of file ui_startserver.c.

References botSelectInfo, botSelectInfo_t::menu, UI_BotSelectMenu_Init(), and UI_PushMenu().

Referenced by ServerOptions_PlayerNameEvent().

01965                                    {
01966     UI_BotSelectMenu_Init( bot );
01967     UI_PushMenu( &botSelectInfo.menu );
01968 }

Here is the call graph for this function:

void UI_BotSelectMenu_Cache void   ) 
 

Definition at line 1823 of file ui_startserver.c.

References BOTSELECT_ACCEPT0, BOTSELECT_ACCEPT1, BOTSELECT_ARROWS, BOTSELECT_ARROWSL, BOTSELECT_ARROWSR, BOTSELECT_BACK0, BOTSELECT_BACK1, BOTSELECT_SELECT, BOTSELECT_SELECTED, and trap_R_RegisterShaderNoMip().

01823                                     {
01824     trap_R_RegisterShaderNoMip( BOTSELECT_BACK0 );
01825     trap_R_RegisterShaderNoMip( BOTSELECT_BACK1 );
01826     trap_R_RegisterShaderNoMip( BOTSELECT_ACCEPT0 );
01827     trap_R_RegisterShaderNoMip( BOTSELECT_ACCEPT1 );
01828     trap_R_RegisterShaderNoMip( BOTSELECT_SELECT );
01829     trap_R_RegisterShaderNoMip( BOTSELECT_SELECTED );
01830     trap_R_RegisterShaderNoMip( BOTSELECT_ARROWS );
01831     trap_R_RegisterShaderNoMip( BOTSELECT_ARROWSL );
01832     trap_R_RegisterShaderNoMip( BOTSELECT_ARROWSR );
01833 }

Here is the call graph for this function:

qboolean UI_CanShowTierVideo int  tier  ) 
 

Definition at line 630 of file ui_gameinfo.c.

References atoi, Com_sprintf(), uiStatic_t::demoversion, Info_ValueForKey(), qboolean, trap_Cvar_VariableStringBuffer(), and uis.

Referenced by UI_CinematicsMenu_Init().

00630                                          {
00631     char    key[16];
00632     char    videos[MAX_INFO_VALUE];
00633 
00634     if( !tier ) {
00635         return qfalse;
00636     }
00637 
00638     if( uis.demoversion && tier != 8 ) {
00639         return qfalse;
00640     }
00641 
00642     trap_Cvar_VariableStringBuffer( "g_spVideos", videos, sizeof(videos) );
00643 
00644     Com_sprintf( key, sizeof(key), "tier%i", tier );
00645     if( atoi( Info_ValueForKey( videos, key ) ) ) {
00646         return qtrue;
00647     }
00648 
00649     return qfalse;
00650 }

Here is the call graph for this function:

void UI_CDKeyMenu void   ) 
 

Definition at line 278 of file ui_cdkey.c.

References cdkeyMenuInfo, cdkeyMenuInfo_t::menu, UI_CDKeyMenu_Init(), and UI_PushMenu().

Referenced by UI_CDKeyMenu_f(), UI_MainMenu(), and UI_SetupMenu_Event().

00278                           {
00279     UI_CDKeyMenu_Init();
00280     UI_PushMenu( &cdkeyMenuInfo.menu );
00281 }

Here is the call graph for this function:

void UI_CDKeyMenu_Cache void   ) 
 

Definition at line 264 of file ui_cdkey.c.

References ART_ACCEPT0, ART_ACCEPT1, ART_BACK0, ART_BACK1, ART_FRAME, and trap_R_RegisterShaderNoMip().

Referenced by UI_Cache_f(), and UI_CDKeyMenu_Init().

00264                                 {
00265     trap_R_RegisterShaderNoMip( ART_ACCEPT0 );
00266     trap_R_RegisterShaderNoMip( ART_ACCEPT1 );
00267     trap_R_RegisterShaderNoMip( ART_BACK0 );
00268     trap_R_RegisterShaderNoMip( ART_BACK1 );
00269     trap_R_RegisterShaderNoMip( ART_FRAME );
00270 }

Here is the call graph for this function:

void UI_CDKeyMenu_f void   ) 
 

Definition at line 289 of file ui_cdkey.c.

References UI_CDKeyMenu().

Referenced by UI_ConsoleCommand().

00289                             {
00290     UI_CDKeyMenu();
00291 }

Here is the call graph for this function:

void UI_CinematicsMenu void   ) 
 

Definition at line 333 of file ui_cinematics.c.

References cinematicsMenuInfo, cinematicsMenuInfo_t::menu, UI_CinematicsMenu_Init(), and UI_PushMenu().

Referenced by Main_MenuEvent(), and UI_CinematicsMenu_f().

00333                                {
00334     UI_CinematicsMenu_Init();
00335     UI_PushMenu( &cinematicsMenuInfo.menu );
00336 }

Here is the call graph for this function:

void UI_CinematicsMenu_Cache void   ) 
 

Definition at line 320 of file ui_cinematics.c.

References ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, and trap_R_RegisterShaderNoMip().

Referenced by UI_Cache_f(), and UI_CinematicsMenu_Init().

00320                                      {
00321     trap_R_RegisterShaderNoMip( ART_BACK0 );
00322     trap_R_RegisterShaderNoMip( ART_BACK1 );
00323     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00324     trap_R_RegisterShaderNoMip( ART_FRAMER );
00325 }

Here is the call graph for this function:

void UI_CinematicsMenu_f void   ) 
 

Definition at line 344 of file ui_cinematics.c.

References atoi, cinematicsMenuInfo, _tag_menuframework::items, cinematicsMenuInfo_t::menu, Menu_SetCursorToItem(), n, UI_Argv(), and UI_CinematicsMenu().

Referenced by UI_ConsoleCommand().

00344                                  {
00345     int     n;
00346 
00347     n = atoi( UI_Argv( 1 ) );
00348     UI_CinematicsMenu();
00349     Menu_SetCursorToItem( &cinematicsMenuInfo.menu, cinematicsMenuInfo.menu.items[n + 3] );
00350 }

Here is the call graph for this function:

float UI_ClampCvar float  min,
float  max,
float  value
 

Definition at line 65 of file ui_atoms.c.

References value.

Referenced by Controls_GetConfig().

00066 {
00067     if ( value < min ) return min;
00068     if ( value > max ) return max;
00069     return value;
00070 }

void UI_ClearScores  ) 
 

Definition at line 183 of file ui_atoms.c.

References count, f, fileHandle_t, FS_WRITE, i, memset(), postGameInfo_t, qfalse, strlen(), trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_GetFileList(), trap_FS_Write(), UI_SetBestScores(), and va().

Referenced by UI_RunMenuScript().

00183                       {
00184     char    gameList[4096];
00185     char *gameFile;
00186     int     i, len, count, size;
00187     fileHandle_t f;
00188     postGameInfo_t newInfo;
00189 
00190     count = trap_FS_GetFileList( "games", "game", gameList, sizeof(gameList) );
00191 
00192     size = sizeof(postGameInfo_t);
00193     memset(&newInfo, 0, size);
00194 
00195     if (count > 0) {
00196         gameFile = gameList;
00197         for ( i = 0; i < count; i++ ) {
00198             len = strlen(gameFile);
00199             if (trap_FS_FOpenFile(va("games/%s",gameFile), &f, FS_WRITE) >= 0) {
00200                 trap_FS_Write(&size, sizeof(int), f);
00201                 trap_FS_Write(&newInfo, size, f);
00202                 trap_FS_FCloseFile(f);
00203             }
00204             gameFile += len + 1;
00205         }
00206     }
00207     
00208     UI_SetBestScores(&newInfo, qfalse);
00209 
00210 }

Here is the call graph for this function:

void UI_ConfirmMenu const char *  question,
void(*)(void)  draw,
void(*)(qboolean result)  action
 

Definition at line 241 of file ui_confirm.c.

References UI_CENTER, UI_ConfirmMenu_Style(), and UI_INVERSE.

Referenced by Controls_MenuEvent(), InGame_Event(), Main_MenuEvent(), UI_SetActiveMenu(), UI_SetupMenu_Event(), and UI_SPLevelMenu_ResetEvent().

00241                                                                                                      {
00242     UI_ConfirmMenu_Style(question, UI_CENTER|UI_INVERSE, draw, action);
00243 }

Here is the call graph for this function:

qboolean UI_ConsoleCommand int  realTime  ) 
 

Definition at line 1003 of file ui_atoms.c.

References displayContextDef_t::frameTime, Menu_Cache(), Q_stricmp(), Q_strncpyz(), qboolean, qtrue, displayContextDef_t::realTime, trap_Argc(), trap_R_RemapShader(), UI_Argv(), UI_Cache_f(), UI_CalcPostGameStats(), UI_CDKeyMenu_f(), UI_CinematicsMenu_f(), UI_Load(), UI_Report(), UI_ShowPostGame(), UI_SPLevelMenu_f(), UI_SPPostgameMenu_f(), UI_SPUnlock_f(), UI_SPUnlockMedals_f(), UI_TeamOrdersMenu_f(), uiInfo_t::uiDC, and uiInfo.

Referenced by vmMain().

01003                                            {
01004     char    *cmd;
01005 
01006     cmd = UI_Argv( 0 );
01007 
01008     // ensure minimum menu data is available
01009     Menu_Cache();
01010 
01011     if ( Q_stricmp (cmd, "levelselect") == 0 ) {
01012         UI_SPLevelMenu_f();
01013         return qtrue;
01014     }
01015 
01016     if ( Q_stricmp (cmd, "postgame") == 0 ) {
01017         UI_SPPostgameMenu_f();
01018         return qtrue;
01019     }
01020 
01021     if ( Q_stricmp (cmd, "ui_cache") == 0 ) {
01022         UI_Cache_f();
01023         return qtrue;
01024     }
01025 
01026     if ( Q_stricmp (cmd, "ui_cinematics") == 0 ) {
01027         UI_CinematicsMenu_f();
01028         return qtrue;
01029     }
01030 
01031     if ( Q_stricmp (cmd, "ui_teamOrders") == 0 ) {
01032         UI_TeamOrdersMenu_f();
01033         return qtrue;
01034     }
01035 
01036     if ( Q_stricmp (cmd, "iamacheater") == 0 ) {
01037         UI_SPUnlock_f();
01038         return qtrue;
01039     }
01040 
01041     if ( Q_stricmp (cmd, "iamamonkey") == 0 ) {
01042         UI_SPUnlockMedals_f();
01043         return qtrue;
01044     }
01045 
01046     if ( Q_stricmp (cmd, "ui_cdkey") == 0 ) {
01047         UI_CDKeyMenu_f();
01048         return qtrue;
01049     }
01050 
01051     return qfalse;
01052 }

Here is the call graph for this function:

void UI_ControlsMenu void   ) 
 

Definition at line 1664 of file ui_controls2.c.

References Controls_MenuInit(), controls_t::menu, s_controls, and UI_PushMenu().

Referenced by UI_SetupMenu_Event().

01664                              {
01665     Controls_MenuInit();
01666     UI_PushMenu( &s_controls.menu );
01667 }

Here is the call graph for this function:

void UI_CreditMenu void   ) 
 

Definition at line 122 of file ui_credits.c.

References _tag_menuframework::draw, _tag_menuframework::fullscreen, _tag_menuframework::key, memset(), creditsmenu_t::menu, s_credits, and UI_PushMenu().

Referenced by InGame_QuitAction(), and MainMenu_ExitAction().

00122                            {
00123     memset( &s_credits, 0 ,sizeof(s_credits) );
00124 
00125     s_credits.menu.draw = UI_CreditMenu_Draw;
00126     s_credits.menu.key = UI_CreditMenu_Key;
00127     s_credits.menu.fullscreen = qtrue;
00128     UI_PushMenu ( &s_credits.menu );
00129 }

Here is the call graph for this function:

qboolean UI_CursorInRect int  x,
int  y,
int  width,
int  height
 

Definition at line 1258 of file ui_atoms.c.

References displayContextDef_t::cursorx, uiStatic_t::cursorx, displayContextDef_t::cursory, uiStatic_t::cursory, qboolean, uiInfo_t::uiDC, uiInfo, uis, width, x, and y.

Referenced by ScrollList_Key(), and UI_TeamOrdersMenu_Key().

01259 {
01260     if (uis.cursorx < x ||
01261         uis.cursory < y ||
01262         uis.cursorx > x+width ||
01263         uis.cursory > y+height)
01264         return qfalse;
01265 
01266     return qtrue;
01267 }

char* UI_Cvar_VariableString const char *  var_name  ) 
 

Definition at line 948 of file ui_atoms.c.

References buffer, and trap_Cvar_VariableStringBuffer().

Referenced by _UI_Init(), GraphicsOptions_SetMenuItems(), SpecifyLeague_MenuInit(), UI_CalcPostGameStats(), UI_ClanName_HandleKey(), UI_DrawClanCinematic(), UI_DrawClanLogo(), UI_DrawOpponent(), UI_DrawOpponentLogo(), UI_DrawOpponentLogoMetal(), UI_DrawOpponentLogoName(), UI_DrawPlayerLogo(), UI_DrawPlayerLogoMetal(), UI_DrawPlayerLogoName(), UI_DrawPlayerModel(), UI_DrawSelectedPlayer(), UI_DrawServerRefreshDate(), UI_DrawTeamName(), UI_HeadCountByTeam(), UI_Load(), UI_LoadNonIngame(), UI_NextOpponent(), UI_OpponentLeaderName(), UI_OwnerDrawWidth(), UI_PriorOpponent(), UI_RunMenuScript(), UI_StartServerRefresh(), UI_StartSkirmish(), UI_StopCinematic(), UI_TeamName_HandleKey(), and UI_Update().

00948                                                      {
00949     static char buffer[MAX_STRING_CHARS];
00950 
00951     trap_Cvar_VariableStringBuffer( var_name, buffer, sizeof( buffer ) );
00952 
00953     return buffer;
00954 }

Here is the call graph for this function:

void UI_DemosMenu void   ) 
 

Definition at line 288 of file ui_demo2.c.

References Demos_MenuInit(), demos_t::menu, s_demos, and UI_PushMenu().

Referenced by Main_MenuEvent().

00288                           {
00289     Demos_MenuInit();
00290     UI_PushMenu( &s_demos.menu );
00291 }

Here is the call graph for this function:

void UI_DisplayOptionsMenu void   ) 
 

Definition at line 261 of file ui_display.c.

References displayOptionsInfo_t::display, displayOptionsInfo, displayOptionsInfo_t::menu, Menu_SetCursorToItem(), UI_DisplayOptionsMenu_Init(), and UI_PushMenu().

Referenced by GraphicsOptions_Event(), Options_Event(), UI_NetworkOptionsMenu_Event(), and UI_SoundOptionsMenu_Event().

Here is the call graph for this function:

void UI_DisplayOptionsMenu_Cache void   ) 
 

Definition at line 248 of file ui_display.c.

References ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, and trap_R_RegisterShaderNoMip().

Referenced by UI_Cache_f(), and UI_DisplayOptionsMenu_Init().

00248                                          {
00249     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00250     trap_R_RegisterShaderNoMip( ART_FRAMER );
00251     trap_R_RegisterShaderNoMip( ART_BACK0 );
00252     trap_R_RegisterShaderNoMip( ART_BACK1 );
00253 }

Here is the call graph for this function:

void UI_DrawBannerString int  x,
int  y,
const char *  str,
int  style,
vec4_t  color
 

Definition at line 639 of file cg_drawtools.c.

References ch, propMapB, s, UI_CENTER, UI_DrawBannerString2(), UI_LEFT, UI_RIGHT, width, x, and y.

Referenced by BText_Draw(), and UI_AddBotsMenu_Draw().

00639                                                                                    {
00640     const char *    s;
00641     int             ch;
00642     int             width;
00643     vec4_t          drawcolor;
00644 
00645     // find the width of the drawn text
00646     s = str;
00647     width = 0;
00648     while ( *s ) {
00649         ch = *s;
00650         if ( ch == ' ' ) {
00651             width += PROPB_SPACE_WIDTH;
00652         }
00653         else if ( ch >= 'A' && ch <= 'Z' ) {
00654             width += propMapB[ch - 'A'][2] + PROPB_GAP_WIDTH;
00655         }
00656         s++;
00657     }
00658     width -= PROPB_GAP_WIDTH;
00659 
00660     switch( style & UI_FORMATMASK ) {
00661         case UI_CENTER:
00662             x -= width / 2;
00663             break;
00664 
00665         case UI_RIGHT:
00666             x -= width;
00667             break;
00668 
00669         case UI_LEFT:
00670         default:
00671             break;
00672     }
00673 
00674     if ( style & UI_DROPSHADOW ) {
00675         drawcolor[0] = drawcolor[1] = drawcolor[2] = 0;
00676         drawcolor[3] = color[3];
00677         UI_DrawBannerString2( x+2, y+2, str, drawcolor );
00678     }
00679 
00680     UI_DrawBannerString2( x, y, str, color );
00681 }

Here is the call graph for this function:

void UI_DrawChar int  x,
int  y,
int  ch,
int  style,
vec4_t  color
 

Definition at line 781 of file ui_atoms.c.

References UI_DrawString(), x, and y.

Referenced by Action_Draw(), Controls_DrawKeyBinding(), Crosshair_Draw(), MenuField_Draw(), MField_Draw(), PlayerName_Draw(), PlayerSettings_DrawName(), RadioButton_Draw(), Rankings_DrawText(), SpinControl_Draw(), and UI_CDKeyMenu_DrawKey().

00782 {
00783     char    buff[2];
00784 
00785     buff[0] = ch;
00786     buff[1] = '\0';
00787 
00788     UI_DrawString( x, y, buff, style, color );
00789 }

Here is the call graph for this function:

void UI_DrawConnectScreen qboolean  overlay  ) 
 

Definition at line 178 of file ui_connect.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().

00178                                               {
00179     char            *s;
00180     uiClientState_t cstate;
00181     char            info[MAX_INFO_VALUE];
00182 
00183     Menu_Cache();
00184 
00185     if ( !overlay ) {
00186         // draw the dialog background
00187         UI_SetColor( color_white );
00188         UI_DrawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, uis.menuBackShader );
00189     }
00190 
00191     // see what information we should display
00192     trap_GetClientState( &cstate );
00193 
00194     info[0] = '\0';
00195     if( trap_GetConfigString( CS_SERVERINFO, info, sizeof(info) ) ) {
00196         UI_DrawProportionalString( 320, 16, va( "Loading %s", Info_ValueForKey( info, "mapname" ) ), UI_BIGFONT|UI_CENTER|UI_DROPSHADOW, color_white );
00197     }
00198 
00199     UI_DrawProportionalString( 320, 64, va("Connecting to %s", cstate.servername), UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, menu_text_color );
00200     //UI_DrawProportionalString( 320, 96, "Press Esc to abort", UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, menu_text_color );
00201 
00202     // display global MOTD at bottom
00203     UI_DrawProportionalString( SCREEN_WIDTH/2, SCREEN_HEIGHT-32, 
00204         Info_ValueForKey( cstate.updateInfoString, "motd" ), UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, menu_text_color );
00205     
00206     // print any server info (server full, bad version, etc)
00207     if ( cstate.connState < CA_CONNECTED ) {
00208         UI_DrawProportionalString_AutoWrapped( 320, 192, 630, 20, cstate.messageString, UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, menu_text_color );
00209     }
00210 
00211 #if 0
00212     // display password field
00213     if ( passwordNeeded ) {
00214         s_ingame_menu.x = SCREEN_WIDTH * 0.50 - 128;
00215         s_ingame_menu.nitems = 0;
00216         s_ingame_menu.wrapAround = qtrue;
00217 
00218         passwordField.generic.type = MTYPE_FIELD;
00219         passwordField.generic.name = "Password:";
00220         passwordField.generic.callback = 0;
00221         passwordField.generic.x     = 10;
00222         passwordField.generic.y     = 180;
00223         Field_Clear( &passwordField.field );
00224         passwordField.width = 256;
00225         passwordField.field.widthInChars = 16;
00226         Q_strncpyz( passwordField.field.buffer, Cvar_VariableString("password"), 
00227             sizeof(passwordField.field.buffer) );
00228 
00229         Menu_AddItem( &s_ingame_menu, ( void * ) &s_customize_player_action );
00230 
00231         MField_Draw( &passwordField );
00232     }
00233 #endif
00234 
00235     if ( lastConnState > cstate.connState ) {
00236         lastLoadingText[0] = '\0';
00237     }
00238     lastConnState = cstate.connState;
00239 
00240     switch ( cstate.connState ) {
00241     case CA_CONNECTING:
00242         s = va("Awaiting challenge...%i", cstate.connectPacketCount);
00243         break;
00244     case CA_CHALLENGING:
00245         s = va("Awaiting connection...%i", cstate.connectPacketCount);
00246         break;
00247     case CA_CONNECTED: {
00248         char downloadName[MAX_INFO_VALUE];
00249 
00250             trap_Cvar_VariableStringBuffer( "cl_downloadName", downloadName, sizeof(downloadName) );
00251             if (*downloadName) {
00252                 UI_DisplayDownloadInfo( downloadName );
00253                 return;
00254             }
00255         }
00256         s = "Awaiting gamestate...";
00257         break;
00258     case CA_LOADING:
00259         return;
00260     case CA_PRIMED:
00261         return;
00262     default:
00263         return;
00264     }
00265 
00266     UI_DrawProportionalString( 320, 128, s, UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, color_white );
00267 
00268     // password required / connection rejected information goes here
00269 }

Here is the call graph for this function:

void UI_DrawHandlePic float  x,
float  y,
float  w,
float  h,
qhandle_t  hShader
 

Definition at line 1116 of file ui_atoms.c.

References h(), trap_R_DrawStretchPic(), UI_AdjustFrom640(), w, x, and y.

Referenced by _UI_Refresh(), Bitmap_Draw(), Crosshair_Draw(), PlayerSettings_DrawEffects(), RadioButton_Draw(), Slider_Draw(), StartServer_LevelshotDraw(), UI_DrawCenteredPic(), UI_DrawClanCinematic(), UI_DrawClanLogo(), UI_DrawConnectScreen(), UI_DrawCrosshair(), UI_DrawEffects(), UI_DrawMapPreview(), UI_DrawNetMapPreview(), UI_DrawOpponentLogo(), UI_DrawOpponentLogoMetal(), UI_DrawOpponentLogoName(), UI_DrawPlayerLogo(), UI_DrawPlayerLogoMetal(), UI_DrawPlayerLogoName(), UI_DrawTierMap(), UI_Refresh(), and UI_SPLevelMenu_MenuDraw().

01116                                                                                {
01117     float   s0;
01118     float   s1;
01119     float   t0;
01120     float   t1;
01121 
01122     if( w < 0 ) {   // flip about vertical
01123         w  = -w;
01124         s0 = 1;
01125         s1 = 0;
01126     }
01127     else {
01128         s0 = 0;
01129         s1 = 1;
01130     }
01131 
01132     if( h < 0 ) {   // flip about horizontal
01133         h  = -h;
01134         t0 = 1;
01135         t1 = 0;
01136     }
01137     else {
01138         t0 = 0;
01139         t1 = 1;
01140     }
01141     
01142     UI_AdjustFrom640( &x, &y, &w, &h );
01143     trap_R_DrawStretchPic( x, y, w, h, s0, t0, s1, t1, hShader );
01144 }

Here is the call graph for this function:

void UI_DrawNamedPic float  x,
float  y,
float  width,
float  height,
const char *  picname
 

Definition at line 1108 of file ui_atoms.c.

References height, qhandle_t, trap_R_DrawStretchPic(), trap_R_RegisterShaderNoMip(), UI_AdjustFrom640(), width, x, and y.

Referenced by ConfirmMenu_Draw(), MessageMenu_Draw(), Reset_MenuDraw(), UI_AddBotsMenu_Draw(), and UI_SPPostgameMenu_DrawAwardsMedals().

01108                                                                                          {
01109     qhandle_t   hShader;
01110 
01111     hShader = trap_R_RegisterShaderNoMip( picname );
01112     UI_AdjustFrom640( &x, &y, &width, &height );
01113     trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
01114 }

Here is the call graph for this function:

void UI_DrawPlayer float  x,
float  y,
float  w,
float  h,
playerInfo_t pi,
int  time
 

Definition at line 690 of file ui_players.c.

References AnglesToAxis(), playerInfo_t::animations, atan2(), AxisClear(), playerInfo_t::barrelModel, CHAN_LOCAL, playerInfo_t::chat, playerInfo_t::currentWeapon, DEG2RAD, dp_realtime, playerInfo_t::flashDlightColor, playerInfo_t::flashModel, h(), head, playerInfo_t::headModel, playerInfo_t::headSkin, playerInfo_t::lastWeapon, playerInfo_t::legsModel, playerInfo_t::legsSkin, M_PI, memset(), playerInfo_t::muzzleFlashTime, animation_s::numFrames, refEntity_t::origin, playerInfo_t::pendingWeapon, rand(), playerInfo_t::realWeapon, RF_LIGHTING_ORIGIN, tan(), playerInfo_t::torsoModel, playerInfo_t::torsoSkin, trap_R_AddLightToScene(), trap_R_AddRefEntityToScene(), trap_R_ClearScene(), trap_R_RegisterShaderNoMip(), trap_R_RenderScene(), trap_S_StartLocalSound(), UI_AdjustFrom640(), UI_MachinegunSpinAngle(), UI_PlayerAngles(), UI_PlayerAnimation(), UI_PlayerFloatSprite(), UI_PositionEntityOnTag(), UI_PositionRotatedEntityOnTag(), vec3_t, VectorCopy, w, playerInfo_t::weapon, weaponChangeSound, playerInfo_t::weaponModel, playerInfo_t::weaponTimer, WP_GAUNTLET, WP_MACHINEGUN, x, xx, and y.

Referenced by Controls_DrawPlayer(), PlayerModel_DrawPlayer(), PlayerSettings_DrawPlayer(), UI_DrawOpponent(), and UI_DrawPlayerModel().

00690                                                                                      {
00691     refdef_t        refdef;
00692     refEntity_t     legs;
00693     refEntity_t     torso;
00694     refEntity_t     head;
00695     refEntity_t     gun;
00696     refEntity_t     barrel;
00697     refEntity_t     flash;
00698     vec3_t          origin;
00699     int             renderfx;
00700     vec3_t          mins = {-16, -16, -24};
00701     vec3_t          maxs = {16, 16, 32};
00702     float           len;
00703     float           xx;
00704 
00705     if ( !pi->legsModel || !pi->torsoModel || !pi->headModel || !pi->animations[0].numFrames ) {
00706         return;
00707     }
00708 
00709     dp_realtime = time;
00710 
00711     if ( pi->pendingWeapon != -1 && dp_realtime > pi->weaponTimer ) {
00712         pi->weapon = pi->pendingWeapon;
00713         pi->lastWeapon = pi->pendingWeapon;
00714         pi->pendingWeapon = -1;
00715         pi->weaponTimer = 0;
00716         if( pi->currentWeapon != pi->weapon ) {
00717             trap_S_StartLocalSound( weaponChangeSound, CHAN_LOCAL );
00718         }
00719     }
00720 
00721     UI_AdjustFrom640( &x, &y, &w, &h );
00722 
00723     y -= jumpHeight;
00724 
00725     memset( &refdef, 0, sizeof( refdef ) );
00726     memset( &legs, 0, sizeof(legs) );
00727     memset( &torso, 0, sizeof(torso) );
00728     memset( &head, 0, sizeof(head) );
00729 
00730     refdef.rdflags = RDF_NOWORLDMODEL;
00731 
00732     AxisClear( refdef.viewaxis );
00733 
00734     refdef.x = x;
00735     refdef.y = y;
00736     refdef.width = w;
00737     refdef.height = h;
00738 
00739     refdef.fov_x = (int)((float)refdef.width / 640.0f * 90.0f);
00740     xx = refdef.width / tan( refdef.fov_x / 360 * M_PI );
00741     refdef.fov_y = atan2( refdef.height, xx );
00742     refdef.fov_y *= ( 360 / M_PI );
00743 
00744     // calculate distance so the player nearly fills the box
00745     len = 0.7 * ( maxs[2] - mins[2] );      
00746     origin[0] = len / tan( DEG2RAD(refdef.fov_x) * 0.5 );
00747     origin[1] = 0.5 * ( mins[1] + maxs[1] );
00748     origin[2] = -0.5 * ( mins[2] + maxs[2] );
00749 
00750     refdef.time = dp_realtime;
00751 
00752     trap_R_ClearScene();
00753 
00754     // get the rotation information
00755     UI_PlayerAngles( pi, legs.axis, torso.axis, head.axis );
00756     
00757     // get the animation state (after rotation, to allow feet shuffle)
00758     UI_PlayerAnimation( pi, &legs.oldframe, &legs.frame, &legs.backlerp,
00759          &torso.oldframe, &torso.frame, &torso.backlerp );
00760 
00761     renderfx = RF_LIGHTING_ORIGIN | RF_NOSHADOW;
00762 
00763     //
00764     // add the legs
00765     //
00766     legs.hModel = pi->legsModel;
00767     legs.customSkin = pi->legsSkin;
00768 
00769     VectorCopy( origin, legs.origin );
00770 
00771     VectorCopy( origin, legs.lightingOrigin );
00772     legs.renderfx = renderfx;
00773     VectorCopy (legs.origin, legs.oldorigin);
00774 
00775     trap_R_AddRefEntityToScene( &legs );
00776 
00777     if (!legs.hModel) {
00778         return;
00779     }
00780 
00781     //
00782     // add the torso
00783     //
00784     torso.hModel = pi->torsoModel;
00785     if (!torso.hModel) {
00786         return;
00787     }
00788 
00789     torso.customSkin = pi->torsoSkin;
00790 
00791     VectorCopy( origin, torso.lightingOrigin );
00792 
00793     UI_PositionRotatedEntityOnTag( &torso, &legs, pi->legsModel, "tag_torso");
00794 
00795     torso.renderfx = renderfx;
00796 
00797     trap_R_AddRefEntityToScene( &torso );
00798 
00799     //
00800     // add the head
00801     //
00802     head.hModel = pi->headModel;
00803     if (!head.hModel) {
00804         return;
00805     }
00806     head.customSkin = pi->headSkin;
00807 
00808     VectorCopy( origin, head.lightingOrigin );
00809 
00810     UI_PositionRotatedEntityOnTag( &head, &torso, pi->torsoModel, "tag_head");
00811 
00812     head.renderfx = renderfx;
00813 
00814     trap_R_AddRefEntityToScene( &head );
00815 
00816     //
00817     // add the gun
00818     //
00819     if ( pi->currentWeapon != WP_NONE ) {
00820         memset( &gun, 0, sizeof(gun) );
00821         gun.hModel = pi->weaponModel;
00822         VectorCopy( origin, gun.lightingOrigin );
00823         UI_PositionEntityOnTag( &gun, &torso, pi->torsoModel, "tag_weapon");
00824         gun.renderfx = renderfx;
00825         trap_R_AddRefEntityToScene( &gun );
00826     }
00827 
00828     //
00829     // add the spinning barrel
00830     //
00831     if ( pi->realWeapon == WP_MACHINEGUN || pi->realWeapon == WP_GAUNTLET || pi->realWeapon == WP_BFG ) {
00832         vec3_t  angles;
00833 
00834         memset( &barrel, 0, sizeof(barrel) );
00835         VectorCopy( origin, barrel.lightingOrigin );
00836         barrel.renderfx = renderfx;
00837 
00838         barrel.hModel = pi->barrelModel;
00839         angles[YAW] = 0;
00840         angles[PITCH] = 0;
00841         angles[ROLL] = UI_MachinegunSpinAngle( pi );
00842         if( pi->realWeapon == WP_GAUNTLET || pi->realWeapon == WP_BFG ) {
00843             angles[PITCH] = angles[ROLL];
00844             angles[ROLL] = 0;
00845         }
00846         AnglesToAxis( angles, barrel.axis );
00847 
00848         UI_PositionRotatedEntityOnTag( &barrel, &gun, pi->weaponModel, "tag_barrel");
00849 
00850         trap_R_AddRefEntityToScene( &barrel );
00851     }
00852 
00853     //
00854     // add muzzle flash
00855     //
00856     if ( dp_realtime <= pi->muzzleFlashTime ) {
00857         if ( pi->flashModel ) {
00858             memset( &flash, 0, sizeof(flash) );
00859             flash.hModel = pi->flashModel;
00860             VectorCopy( origin, flash.lightingOrigin );
00861             UI_PositionEntityOnTag( &flash, &gun, pi->weaponModel, "tag_flash");
00862             flash.renderfx = renderfx;
00863             trap_R_AddRefEntityToScene( &flash );
00864         }
00865 
00866         // make a dlight for the flash
00867         if ( pi->flashDlightColor[0] || pi->flashDlightColor[1] || pi->flashDlightColor[2] ) {
00868             trap_R_AddLightToScene( flash.origin, 200 + (rand()&31), pi->flashDlightColor[0],
00869                 pi->flashDlightColor[1], pi->flashDlightColor[2] );
00870         }
00871     }
00872 
00873     //
00874     // add the chat icon
00875     //
00876     if ( pi->chat ) {
00877         UI_PlayerFloatSprite( pi, origin, trap_R_RegisterShaderNoMip( "sprites/balloon3" ) );
00878     }
00879 
00880     //
00881     // add an accent light
00882     //
00883     origin[0] -= 100;   // + = behind, - = in front
00884     origin[1] += 100;   // + = left, - = right
00885     origin[2] += 100;   // + = above, - = below
00886     trap_R_AddLightToScene( origin, 500, 1.0, 1.0, 1.0 );
00887 
00888     origin[0] -= 100;
00889     origin[1] -= 100;
00890     origin[2] -= 100;
00891     trap_R_AddLightToScene( origin, 500, 1.0, 0.0, 0.0 );
00892 
00893     trap_R_RenderScene( &refdef );
00894 }

Here is the call graph for this function:

void UI_DrawProportionalString int  x,
int  y,
const char *  str,
int  style,
vec4_t  color
 

Definition at line 769 of file cg_drawtools.c.

References cg, cgs, uiStatic_t::charsetProp, cgMedia_t::charsetProp, uiStatic_t::charsetPropGlow, cgMedia_t::charsetPropGlow, cgs_t::media, PULSE_DIVISOR, uiStatic_t::realtime, sin(), cg_t::time, UI_CENTER, UI_DrawProportionalString2(), UI_LEFT, UI_ProportionalSizeScale(), UI_ProportionalStringWidth(), UI_RIGHT, uis, width, x, and y.

Referenced by CG_DrawInformation(), ConfirmMenu_Draw(), Controls_ResetDefaults_Draw(), Main_MenuDraw(), MessageMenu_Draw(), PlayerModel_DrawPlayer(), PlayerSettings_DrawEffects(), PlayerSettings_DrawHandicap(), PlayerSettings_DrawName(), PText_Draw(), Reset_MenuDraw(), Setup_ResetDefaults_Draw(), UI_CDKeyMenu_DrawKey(), UI_CreditMenu_Draw(), UI_DisplayDownloadInfo(), UI_DrawConnectScreen(), UI_DrawProportionalString_AutoWrapped(), UI_SaveConfigMenu_SavenameDraw(), UI_SPLevelMenu_MenuDraw(), UI_SPLevelMenu_ResetDraw(), UI_SPPostgameMenu_DrawAwardsPresentation(), UI_SPPostgameMenu_MenuDraw(), and UI_TeamOrdersMenu_ListDraw().

00769                                                                                          {
00770     vec4_t  drawcolor;
00771     int     width;
00772     float   sizeScale;
00773 
00774     sizeScale = UI_ProportionalSizeScale( style );
00775 
00776     switch( style & UI_FORMATMASK ) {
00777         case UI_CENTER:
00778             width = UI_ProportionalStringWidth( str ) * sizeScale;
00779             x -= width / 2;
00780             break;
00781 
00782         case UI_RIGHT:
00783             width = UI_ProportionalStringWidth( str ) * sizeScale;
00784             x -= width;
00785             break;
00786 
00787         case UI_LEFT:
00788         default:
00789             break;
00790     }
00791 
00792     if ( style & UI_DROPSHADOW ) {
00793         drawcolor[0] = drawcolor[1] = drawcolor[2] = 0;
00794         drawcolor[3] = color[3];
00795         UI_DrawProportionalString2( x+2, y+2, str, drawcolor, sizeScale, cgs.media.charsetProp );
00796     }
00797 
00798     if ( style & UI_INVERSE ) {
00799         drawcolor[0] = color[0] * 0.8;
00800         drawcolor[1] = color[1] * 0.8;
00801         drawcolor[2] = color[2] * 0.8;
00802         drawcolor[3] = color[3];
00803         UI_DrawProportionalString2( x, y, str, drawcolor, sizeScale, cgs.media.charsetProp );
00804         return;
00805     }
00806 
00807     if ( style & UI_PULSE ) {
00808         drawcolor[0] = color[0] * 0.8;
00809         drawcolor[1] = color[1] * 0.8;
00810         drawcolor[2] = color[2] * 0.8;
00811         drawcolor[3] = color[3];
00812         UI_DrawProportionalString2( x, y, str, color, sizeScale, cgs.media.charsetProp );
00813 
00814         drawcolor[0] = color[0];
00815         drawcolor[1] = color[1];
00816         drawcolor[2] = color[2];
00817         drawcolor[3] = 0.5 + 0.5 * sin( cg.time / PULSE_DIVISOR );
00818         UI_DrawProportionalString2( x, y, str, drawcolor, sizeScale, cgs.media.charsetPropGlow );
00819         return;
00820     }
00821 
00822     UI_DrawProportionalString2( x, y, str, color, sizeScale, cgs.media.charsetProp );
00823 }

Here is the call graph for this function:

void UI_DrawRect float  x,
float  y,
float  width,
float  height,
const float *  color
 

Definition at line 1169 of file ui_atoms.c.

References height, NULL, trap_R_DrawStretchPic(), trap_R_SetColor(), UI_AdjustFrom640(), UI_DrawSides(), UI_DrawTopBottom(), uis, uiStatic_t::whiteShader, width, x, and y.

Referenced by Menu_Draw(), and UI_DrawTextBox().

01169                                                                                     {
01170     trap_R_SetColor( color );
01171 
01172     UI_AdjustFrom640( &x, &y, &width, &height );
01173 
01174     trap_R_DrawStretchPic( x, y, width, 1, 0, 0, 0, 0, uis.whiteShader );
01175     trap_R_DrawStretchPic( x, y, 1, height, 0, 0, 0, 0, uis.whiteShader );
01176     trap_R_DrawStretchPic( x, y + height - 1, width, 1, 0, 0, 0, 0, uis.whiteShader );
01177     trap_R_DrawStretchPic( x + width - 1, y, 1, height, 0, 0, 0, 0, uis.whiteShader );
01178 
01179     trap_R_SetColor( NULL );
01180 }

Here is the call graph for this function:

void UI_DrawSides float  x,
float  y,
float  w,
float  h
 

Definition at line 469 of file ui_atoms.c.

References h(), trap_R_DrawStretchPic(), UI_AdjustFrom640(), uiInfo_t::uiDC, uiInfo, w, displayContextDef_t::whiteShader, x, and y.

Referenced by UI_DrawRect().

00469                                                       {
00470     UI_AdjustFrom640( &x, &y, &w, &h );
00471     trap_R_DrawStretchPic( x, y, 1, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00472     trap_R_DrawStretchPic( x + w - 1, y, 1, h, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00473 }

Here is the call graph for this function:

void UI_DrawString int  x,
int  y,
const char *  str,
int  style,
vec4_t  color
 

Definition at line 702 of file ui_atoms.c.

References PULSE_DIVISOR, uiStatic_t::realtime, sin(), strlen(), UI_CENTER, UI_DrawString2(), UI_LerpColor(), UI_RIGHT, uis, x, and y.

Referenced by Action_Draw(), Controls_DrawKeyBinding(), Controls_StatusBar(), Crosshair_Draw(), DriverInfo_MenuDraw(), Main_MenuDraw(), MenuField_Draw(), MField_Draw(), PlayerName_Draw(), RadioButton_Draw(), ScrollList_Draw(), ServerInfo_MenuDraw(), ServerOptions_LevelshotDraw(), ServerOptions_StatusBar(), Slider_Draw(), SpinControl_Draw(), StartServer_LevelshotDraw(), Text_Draw(), UI_CDKeyMenu_DrawKey(), UI_CreditMenu_Draw(), UI_DrawChar(), UI_Refresh(), UI_SPLevelMenu_MenuDraw(), UI_SPPostgameMenu_DrawAwardsMedals(), and UI_SPPostgameMenu_MenuDrawScoreLine().

00703 {
00704     int     len;
00705     int     charw;
00706     int     charh;
00707     vec4_t  newcolor;
00708     vec4_t  lowlight;
00709     float   *drawcolor;
00710     vec4_t  dropcolor;
00711 
00712     if( !str ) {
00713         return;
00714     }
00715 
00716     if ((style & UI_BLINK) && ((uis.realtime/BLINK_DIVISOR) & 1))
00717         return;
00718 
00719     if (style & UI_SMALLFONT)
00720     {
00721         charw = SMALLCHAR_WIDTH;
00722         charh = SMALLCHAR_HEIGHT;
00723     }
00724     else if (style & UI_GIANTFONT)
00725     {
00726         charw = GIANTCHAR_WIDTH;
00727         charh = GIANTCHAR_HEIGHT;
00728     }
00729     else
00730     {
00731         charw = BIGCHAR_WIDTH;
00732         charh = BIGCHAR_HEIGHT;
00733     }
00734 
00735     if (style & UI_PULSE)
00736     {
00737         lowlight[0] = 0.8*color[0]; 
00738         lowlight[1] = 0.8*color[1];
00739         lowlight[2] = 0.8*color[2];
00740         lowlight[3] = 0.8*color[3];
00741         UI_LerpColor(color,lowlight,newcolor,0.5+0.5*sin(uis.realtime/PULSE_DIVISOR));
00742         drawcolor = newcolor;
00743     }   
00744     else
00745         drawcolor = color;
00746 
00747     switch (style & UI_FORMATMASK)
00748     {
00749         case UI_CENTER:
00750             // center justify at x
00751             len = strlen(str);
00752             x   = x - len*charw/2;
00753             break;
00754 
00755         case UI_RIGHT:
00756             // right justify at x
00757             len = strlen(str);
00758             x   = x - len*charw;
00759             break;
00760 
00761         default:
00762             // left justify at x
00763             break;
00764     }
00765 
00766     if ( style & UI_DROPSHADOW )
00767     {
00768         dropcolor[0] = dropcolor[1] = dropcolor[2] = 0;
00769         dropcolor[3] = drawcolor[3];
00770         UI_DrawString2(x+2,y+2,str,dropcolor,charw,charh);
00771     }
00772 
00773     UI_DrawString2(x,y,str,drawcolor,charw,charh);
00774 }

Here is the call graph for this function:

void UI_DrawTextBox int  x,
int  y,
int  width,
int  lines
 

Definition at line 1252 of file ui_atoms.c.

References BIGCHAR_HEIGHT, BIGCHAR_WIDTH, colorBlack, colorWhite, UI_DrawRect(), UI_FillRect(), width, x, and y.

01253 {
01254     UI_FillRect( x + BIGCHAR_WIDTH/2, y + BIGCHAR_HEIGHT/2, ( width + 1 ) * BIGCHAR_WIDTH, ( lines + 1 ) * BIGCHAR_HEIGHT, colorBlack );
01255     UI_DrawRect( x + BIGCHAR_WIDTH/2, y + BIGCHAR_HEIGHT/2, ( width + 1 ) * BIGCHAR_WIDTH, ( lines + 1 ) * BIGCHAR_HEIGHT, colorWhite );
01256 }

Here is the call graph for this function:

void UI_DrawTopBottom float  x,
float  y,
float  w,
float  h
 

Definition at line 475 of file ui_atoms.c.

References h(), trap_R_DrawStretchPic(), UI_AdjustFrom640(), uiInfo_t::uiDC, uiInfo, w, displayContextDef_t::whiteShader, x, and y.

Referenced by UI_DrawRect().

00475                                                           {
00476     UI_AdjustFrom640( &x, &y, &w, &h );
00477     trap_R_DrawStretchPic( x, y, w, 1, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00478     trap_R_DrawStretchPic( x, y + h - 1, w, 1, 0, 0, 0, 0, uiInfo.uiDC.whiteShader );
00479 }

Here is the call graph for this function:

void UI_FillRect float  x,
float  y,
float  width,
float  height,
const float *  color
 

Definition at line 1153 of file ui_atoms.c.

References height, NULL, trap_R_DrawStretchPic(), trap_R_SetColor(), UI_AdjustFrom640(), uiInfo_t::uiDC, uiInfo, uis, displayContextDef_t::whiteShader, uiStatic_t::whiteShader, width, x, and y.

Referenced by Controls_DrawKeyBinding(), Crosshair_Draw(), MenuField_Draw(), PlayerName_Draw(), RadioButton_Draw(), ScrollList_Draw(), ServerOptions_LevelshotDraw(), SpinControl_Draw(), StartServer_LevelshotDraw(), UI_CDKeyMenu_DrawKey(), UI_DrawTextBox(), UI_SaveConfigMenu_SavenameDraw(), and UI_SPLevelMenu_MenuDraw().

01153                                                                                     {
01154     trap_R_SetColor( color );
01155 
01156     UI_AdjustFrom640( &x, &y, &width, &height );
01157     trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 0, uis.whiteShader );
01158 
01159     trap_R_SetColor( NULL );
01160 }

Here is the call graph for this function:

void UI_ForceMenuOff void   ) 
 

Definition at line 157 of file ui_atoms.c.

References uiStatic_t::activemenu, KEYCATCH_UI, uiStatic_t::menusp, trap_Cvar_Set(), trap_Key_ClearStates(), trap_Key_GetCatcher(), trap_Key_SetCatcher(), and uis.

Referenced by Demos_MenuEvent(), Login_MenuEvent(), Rankings_MenuEvent(), Signup_MenuEvent(), TeamMain_MenuEvent(), UI_PopMenu(), UI_RankStatusMenu(), UI_SetActiveMenu(), and UI_SoundOptionsMenu_Event().

00158 {
00159     uis.menusp     = 0;
00160     uis.activemenu = NULL;
00161 
00162     trap_Key_SetCatcher( trap_Key_GetCatcher() & ~KEYCATCH_UI );
00163     trap_Key_ClearStates();
00164     trap_Cvar_Set( "cl_paused", "0" );
00165 }

Here is the call graph for this function:

const char* UI_GetArenaInfoByMap const char *  map  ) 
 

Definition at line 294 of file ui_gameinfo.c.

References Info_ValueForKey(), n, Q_stricmp(), and ui_arenaInfos.

Referenced by ServerOptions_InitBotNames(), and UI_SPPostgameMenu_f().

00294                                                     {
00295     int         n;
00296 
00297     for( n = 0; n < ui_numArenas; n++ ) {
00298         if( Q_stricmp( Info_ValueForKey( ui_arenaInfos[n], "map" ), map ) == 0 ) {
00299             return ui_arenaInfos[n];
00300         }
00301     }
00302 
00303     return NULL;
00304 }

Here is the call graph for this function:

const char* UI_GetArenaInfoByNumber int  num  ) 
 

Definition at line 269 of file ui_gameinfo.c.

References atoi, Info_ValueForKey(), n, S_COLOR_RED, trap_Print(), ui_arenaInfos, va(), and value.

Referenced by StartServer_Cache(), StartServer_GametypeEvent(), UI_SPLevelMenu_LevelEvent(), UI_SPLevelMenu_SetMenuItems(), and UI_SPPostgameMenu_NextEvent().

00269                                                {
00270     int     n;
00271     char    *value;
00272 
00273     if( num < 0 || num >= ui_numArenas ) {
00274         trap_Print( va( S_COLOR_RED "Invalid arena number: %i\n", num ) );
00275         return NULL;
00276     }
00277 
00278     for( n = 0; n < ui_numArenas; n++ ) {
00279         value = Info_ValueForKey( ui_arenaInfos[n], "num" );
00280         if( *value && atoi(value) == num ) {
00281             return ui_arenaInfos[n];
00282         }
00283     }
00284 
00285     return NULL;
00286 }

Here is the call graph for this function:

int UI_GetAwardLevel int  award  ) 
 

Definition at line 549 of file ui_gameinfo.c.

References atoi, Com_sprintf(), Info_ValueForKey(), and trap_Cvar_VariableStringBuffer().

Referenced by UI_SPLevelMenu_Init(), and UI_SPPostgameMenu_f().

00549                                   {
00550     char    key[16];
00551     char    awardData[MAX_INFO_VALUE];
00552 
00553     trap_Cvar_VariableStringBuffer( "g_spAwards", awardData, sizeof(awardData) );
00554 
00555     Com_sprintf( key, sizeof(key), "a%i", award );
00556     return atoi( Info_ValueForKey( awardData, key ) );
00557 }

Here is the call graph for this function:

void UI_GetBestScore int  level,
int *  score,
int *  skill
 

Definition at line 435 of file ui_gameinfo.c.

References atoi, Com_sprintf(), Info_ValueForKey(), level, MAX_INFO_VALUE, n, trap_Cvar_VariableStringBuffer(), and va().

Referenced by UI_GetCurrentGame(), UI_SPLevelMenu_SetMenuArena(), and UI_TierCompleted().

00435                                                           {
00436     int     n;
00437     int     skillScore;
00438     int     bestScore;
00439     int     bestScoreSkill;
00440     char    arenaKey[16];
00441     char    scores[MAX_INFO_VALUE];
00442 
00443     if( !score || !skill ) {
00444         return;
00445     }
00446 
00447     if( level < 0 || level > ui_numArenas ) {
00448         return;
00449     }
00450 
00451     bestScore = 0;
00452     bestScoreSkill = 0;
00453 
00454     for( n = 1; n <= 5; n++ ) {
00455         trap_Cvar_VariableStringBuffer( va( "g_spScores%i", n ), scores, MAX_INFO_VALUE );
00456 
00457         Com_sprintf( arenaKey, sizeof( arenaKey ), "l%i", level );
00458         skillScore = atoi( Info_ValueForKey( scores, arenaKey ) );
00459 
00460         if( skillScore < 1 || skillScore > 8 ) {
00461             continue;
00462         }
00463 
00464         if( !bestScore || skillScore <= bestScore ) {
00465             bestScore = skillScore;
00466             bestScoreSkill = n;
00467         }
00468     }
00469 
00470     *score = bestScore;
00471     *skill = bestScoreSkill;
00472 }

Here is the call graph for this function:

char* UI_GetBotInfoByName const char *  name  ) 
 

Definition at line 409 of file ui_gameinfo.c.

References Info_ValueForKey(), n, name, Q_stricmp(), ui_botInfos, and value.

Referenced by ServerOptions_InitBotNames(), and UI_SPLevelMenu_SetBots().

00409                                               {
00410     int     n;
00411     char    *value;
00412 
00413     for ( n = 0; n < ui_numBots ; n++ ) {
00414         value = Info_ValueForKey( ui_botInfos[n], "name" );
00415         if ( !Q_stricmp( value, name ) ) {
00416             return ui_botInfos[n];
00417         }
00418     }
00419 
00420     return NULL;
00421 }

Here is the call graph for this function:

char* UI_GetBotInfoByNumber int  num  ) 
 

Definition at line 395 of file ui_gameinfo.c.

References S_COLOR_RED, trap_Print(), ui_botInfos, and va().

Referenced by UI_AddBotsMenu_SetBotNames(), UI_AddBotsMenu_SortCompare(), UI_BotSelectMenu_Default(), UI_BotSelectMenu_SortCompare(), UI_BotSelectMenu_UpdateGrid(), and UI_GetBotNameByNumber().

00395                                        {
00396     if( num < 0 || num >= ui_numBots ) {
00397         trap_Print( va( S_COLOR_RED "Invalid bot number: %i\n", num ) );
00398         return NULL;
00399     }
00400     return ui_botInfos[num];
00401 }

Here is the call graph for this function:

char* UI_GetBotNameByNumber int  num  ) 
 

Definition at line 318 of file ui_gameinfo.c.

References Info_ValueForKey(), and UI_GetBotInfoByNumber().

Referenced by UI_DrawBotName(), UI_DrawTeamMember(), and UI_RunMenuScript().

00318                                        {
00319     char *info = UI_GetBotInfoByNumber(num);
00320     if (info) {
00321         return Info_ValueForKey( info, "name" );
00322     }
00323     return "Sarge";
00324 }

Here is the call graph for this function:

int UI_GetCurrentGame void   ) 
 

Definition at line 660 of file ui_gameinfo.c.

References atoi, Info_ValueForKey(), level, UI_GetBestScore(), and UI_GetSpecialArenaInfo().

Referenced by UI_SPLevelMenu(), and UI_SPPostgameMenu_NextEvent().

00660                               {
00661     int     level;
00662     int     rank;
00663     int     skill;
00664     const char *info;
00665 
00666     info = UI_GetSpecialArenaInfo( "training" );
00667     if( info ) {
00668         level = atoi( Info_ValueForKey( info, "num" ) );
00669         UI_GetBestScore( level, &rank, &skill );
00670         if ( !rank || rank > 1 ) {
00671             return level;
00672         }
00673     }
00674 
00675     for( level = 0; level < ui_numSinglePlayerArenas; level++ ) {
00676         UI_GetBestScore( level, &rank, &skill );
00677         if ( !rank || rank > 1 ) {
00678             return level;
00679         }
00680     }
00681 
00682     info = UI_GetSpecialArenaInfo( "final" );
00683     if( !info ) {
00684         return -1;
00685     }
00686     return atoi( Info_ValueForKey( info, "num" ) );
00687 }

Here is the call graph for this function:

int UI_GetNumArenas void   ) 
 

Definition at line 713 of file ui_gameinfo.c.

Referenced by StartServer_Cache(), and StartServer_GametypeEvent().

00713                             {
00714     return ui_numArenas;
00715 }

int UI_GetNumBots void   ) 
 

Definition at line 743 of file ui_gameinfo.c.

00743                           {
00744     return ui_numBots;
00745 }

int UI_GetNumSPArenas void   ) 
 

Definition at line 723 of file ui_gameinfo.c.

Referenced by UI_SPLevelMenu().

00723                               {
00724     return ui_numSinglePlayerArenas;
00725 }

int UI_GetNumSPTiers void   ) 
 

Definition at line 733 of file ui_gameinfo.c.

References ui_numSinglePlayerArenas.

Referenced by UI_SPArena_Start(), UI_SPLevelMenu(), UI_SPPostgameMenu_f(), UI_SPPostgameMenu_NextEvent(), and UI_TierCompleted().

00733                              {
00734     return ui_numSinglePlayerArenas / ARENAS_PER_TIER;
00735 }

const char* UI_GetSpecialArenaInfo const char *  tag  ) 
 

Definition at line 312 of file ui_gameinfo.c.

References Info_ValueForKey(), n, Q_stricmp(), and ui_arenaInfos.

Referenced by UI_GetCurrentGame(), UI_SPLevelMenu(), UI_SPLevelMenu_SetMenuItems(), UI_SPPostgameMenu_f(), and UI_TierCompleted().

00312                                                       {
00313     int         n;
00314 
00315     for( n = 0; n < ui_numArenas; n++ ) {
00316         if( Q_stricmp( Info_ValueForKey( ui_arenaInfos[n], "special" ), tag ) == 0 ) {
00317             return ui_arenaInfos[n];
00318         }
00319     }
00320 
00321     return NULL;
00322 }

Here is the call graph for this function:

void UI_GraphicsOptionsMenu void   ) 
 

Definition at line 1065 of file ui_video.c.

References graphicsoptions_t::graphics, GraphicsOptions_MenuInit(), graphicsoptions_t::menu, Menu_SetCursorToItem(), s_graphicsoptions, and UI_PushMenu().

Here is the call graph for this function:

void UI_InGameMenu void   ) 
 

Definition at line 339 of file ui_ingame.c.

References uiStatic_t::cursorx, uiStatic_t::cursory, InGame_MenuInit(), ingamemenu_t::menu, uiStatic_t::menusp, s_ingame, UI_PushMenu(), and uis.

Referenced by UI_SetActiveMenu().

00339                            {
00340     // force as top level menu
00341     uis.menusp = 0;  
00342 
00343     // set menu cursor to a nice location
00344     uis.cursorx = 319;
00345     uis.cursory = 80;
00346 
00347     InGame_MenuInit();
00348     UI_PushMenu( &s_ingame.menu );
00349 }

Here is the call graph for this function:

void UI_Init void   ) 
 

Definition at line 1067 of file ui_atoms.c.

References uiStatic_t::activemenu, uiStatic_t::bias, uiStatic_t::glconfig, Menu_Cache(), uiStatic_t::menusp, uiStatic_t::scale, trap_GetGlconfig(), UI_InitGameinfo(), UI_RegisterCvars(), uis, glconfig_t::vidHeight, and glconfig_t::vidWidth.

Referenced by vmMain().

01067                      {
01068     UI_RegisterCvars();
01069 
01070     UI_InitGameinfo();
01071 
01072     // cache redundant calulations
01073     trap_GetGlconfig( &uis.glconfig );
01074 
01075     // for 640x480 virtualized screen
01076     uis.scale = uis.glconfig.vidHeight * (1.0/480.0);
01077     if ( uis.glconfig.vidWidth * 480 > uis.glconfig.vidHeight * 640 ) {
01078         // wide screen
01079         uis.bias = 0.5 * ( uis.glconfig.vidWidth - ( uis.glconfig.vidHeight * (640.0/480.0) ) );
01080     }
01081     else {
01082         // no wide screen
01083         uis.bias = 0;
01084     }
01085 
01086     // initialize the menu system
01087     Menu_Cache();
01088 
01089     uis.activemenu = NULL;
01090     uis.menusp     = 0;
01091 }

Here is the call graph for this function:

void UI_InitGameinfo void   ) 
 

Definition at line 808 of file ui_gameinfo.c.

References uiStatic_t::demoversion, trap_Cvar_VariableValue(), UI_InitMemory(), UI_LoadArenas(), UI_LoadBots(), ui_numSinglePlayerArenas, ui_numSpecialSinglePlayerArenas, and uis.

Referenced by UI_Init().

00808                              {
00809 
00810     UI_InitMemory();
00811     UI_LoadArenas();
00812     UI_LoadBots();
00813 
00814     if( (trap_Cvar_VariableValue( "fs_restrict" )) || (ui_numSpecialSinglePlayerArenas == 0 && ui_numSinglePlayerArenas == 4) ) {
00815         uis.demoversion = qtrue;
00816     }
00817     else {
00818         uis.demoversion = qfalse;
00819     }
00820 }

Here is the call graph for this function:

qboolean UI_IsFullscreen void   ) 
 

Definition at line 791 of file ui_atoms.c.

References uiStatic_t::activemenu, _tag_menuframework::fullscreen, qboolean, trap_Key_GetCatcher(), and uis.

Referenced by vmMain().

00791                                  {
00792     if ( uis.activemenu && ( trap_Key_GetCatcher() & KEYCATCH_UI ) ) {
00793         return uis.activemenu->fullscreen;
00794     }
00795 
00796     return qfalse;
00797 }

Here is the call graph for this function:

void UI_KeyEvent int  key  ) 
 

Referenced by vmMain().

void UI_LerpColor vec4_t  a,
vec4_t  b,
vec4_t  c,
float  t
 

Definition at line 172 of file ui_atoms.c.

References a, b, c, i, and t.

Referenced by UI_DrawString().

00173 {
00174     int i;
00175 
00176     // lerp and clamp each component
00177     for (i=0; i<4; i++)
00178     {
00179         c[i] = a[i] + t*(b[i]-a[i]);
00180         if (c[i] < 0)
00181             c[i] = 0;
00182         else if (c[i] > 1.0)
00183             c[i] = 1.0;
00184     }
00185 }

void UI_Load  ) 
 

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:

void UI_LoadArenas void   ) 
 

Definition at line 135 of file ui_gameinfo.c.

References mapInfo::cinematic, CVAR_INIT, CVAR_ROM, i, mapInfo::imageName, Info_ValueForKey(), mapInfo::levelShot, uiInfo_t::mapCount, uiInfo_t::mapList, mapInfo::mapLoadName, mapInfo::mapName, n, S_COLOR_YELLOW, strcat(), strcpy(), vmCvar_t::string, String_Alloc(), strlen(), strstr(), trap_Cvar_Register(), trap_FS_GetFileList(), trap_Print(), type, mapInfo::typeBits, ui_arenaInfos, UI_LoadArenasFromFile(), ui_numArenas, UI_OutOfMemory(), uiInfo, and va().

00135                            {
00136     int         numdirs;
00137     vmCvar_t    arenasFile;
00138     char        filename[128];
00139     char        dirlist[1024];
00140     char*       dirptr;
00141     int         i, n;
00142     int         dirlen;
00143     char        *type;
00144 
00145     ui_numArenas = 0;
00146     uiInfo.mapCount = 0;
00147 
00148     trap_Cvar_Register( &arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM );
00149     if( *arenasFile.string ) {
00150         UI_LoadArenasFromFile(arenasFile.string);
00151     }
00152     else {
00153         UI_LoadArenasFromFile("scripts/arenas.txt");
00154     }
00155 
00156     // get all arenas from .arena files
00157     numdirs = trap_FS_GetFileList("scripts", ".arena", dirlist, 1024 );
00158     dirptr  = dirlist;
00159     for (i = 0; i < numdirs; i++, dirptr += dirlen+1) {
00160         dirlen = strlen(dirptr);
00161         strcpy(filename, "scripts/");
00162         strcat(filename, dirptr);
00163         UI_LoadArenasFromFile(filename);
00164     }
00165     trap_Print( va( "%i arenas parsed\n", ui_numArenas ) );
00166     if (UI_OutOfMemory()) {
00167         trap_Print(S_COLOR_YELLOW"WARNING: not anough memory in pool to load all arenas\n");
00168     }
00169 
00170     for( n = 0; n < ui_numArenas; n++ ) {
00171         // determine type
00172 
00173         uiInfo.mapList[uiInfo.mapCount].cinematic = -1;
00174         uiInfo.mapList[uiInfo.mapCount].mapLoadName = String_Alloc(Info_ValueForKey(ui_arenaInfos[n], "map"));
00175         uiInfo.mapList[uiInfo.mapCount].mapName = String_Alloc(Info_ValueForKey(ui_arenaInfos[n], "longname"));
00176         uiInfo.mapList[uiInfo.mapCount].levelShot = -1;
00177         uiInfo.mapList[uiInfo.mapCount].imageName = String_Alloc(va("levelshots/%s", uiInfo.mapList[uiInfo.mapCount].mapLoadName));
00178         uiInfo.mapList[uiInfo.mapCount].typeBits = 0;
00179 
00180         type = Info_ValueForKey( ui_arenaInfos[n], "type" );
00181         // if no type specified, it will be treated as "ffa"
00182         if( *type ) {
00183             if( strstr( type, "ffa" ) ) {
00184                 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_FFA);
00185             }
00186             if( strstr( type, "tourney" ) ) {
00187                 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_TOURNAMENT);
00188             }
00189             if( strstr( type, "ctf" ) ) {
00190                 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_CTF);
00191             }
00192             if( strstr( type, "oneflag" ) ) {
00193                 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_1FCTF);
00194             }
00195             if( strstr( type, "overload" ) ) {
00196                 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_OBELISK);
00197             }
00198             if( strstr( type, "harvester" ) ) {
00199                 uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_HARVESTER);
00200             }
00201         } else {
00202             uiInfo.mapList[uiInfo.mapCount].typeBits |= (1 << GT_FFA);
00203         }
00204 
00205         uiInfo.mapCount++;
00206         if (uiInfo.mapCount >= MAX_MAPS) {
00207             break;
00208         }
00209     }
00210 }

Here is the call graph for this function:

void UI_LoadBestScores const char *  map,
int  game
 

Definition at line 154 of file ui_atoms.c.

References Com_sprintf(), uiInfo_t::demoAvailable, f, fileHandle_t, FS_READ, MAX_QPATH, memset(), postGameInfo_t, qfalse, trap_Cvar_VariableValue(), trap_FS_FCloseFile(), trap_FS_FOpenFile(), trap_FS_Read(), UI_SetBestScores(), and uiInfo.

Referenced by _UI_Init(), UI_FeederSelection(), UI_GameType_HandleKey(), and UI_RunMenuScript().

00154                                                   {
00155     char        fileName[MAX_QPATH];
00156     fileHandle_t f;
00157     postGameInfo_t newInfo;
00158     memset(&newInfo, 0, sizeof(postGameInfo_t));
00159     Com_sprintf(fileName, MAX_QPATH, "games/%s_%i.game", map, game);
00160     if (trap_FS_FOpenFile(fileName, &f, FS_READ) >= 0) {
00161         int size = 0;
00162         trap_FS_Read(&size, sizeof(int), f);
00163         if (size == sizeof(postGameInfo_t)) {
00164             trap_FS_Read(&newInfo, sizeof(postGameInfo_t), f);
00165         }
00166         trap_FS_FCloseFile(f);
00167     }
00168     UI_SetBestScores(&newInfo, qfalse);
00169 
00170     Com_sprintf(fileName, MAX_QPATH, "demos/%s_%d.dm_%d", map, game, (int)trap_Cvar_VariableValue("protocol"));
00171     uiInfo.demoAvailable = qfalse;
00172     if (trap_FS_FOpenFile(fileName, &f, FS_READ) >= 0) {
00173         uiInfo.demoAvailable = qtrue;
00174         trap_FS_FCloseFile(f);
00175     } 
00176 }

Here is the call graph for this function:

void UI_LoadBots void   ) 
 

Definition at line 248 of file ui_gameinfo.c.

References CVAR_INIT, CVAR_ROM, i, strcat(), strcpy(), vmCvar_t::string, strlen(), trap_Cvar_Register(), trap_FS_GetFileList(), trap_Print(), UI_LoadBotsFromFile(), ui_numBots, and va().

00248                          {
00249     vmCvar_t    botsFile;
00250     int         numdirs;
00251     char        filename[128];
00252     char        dirlist[1024];
00253     char*       dirptr;
00254     int         i;
00255     int         dirlen;
00256 
00257     ui_numBots = 0;
00258 
00259     trap_Cvar_Register( &botsFile, "g_botsFile", "", CVAR_INIT|CVAR_ROM );
00260     if( *botsFile.string ) {
00261         UI_LoadBotsFromFile(botsFile.string);
00262     }
00263     else {
00264         UI_LoadBotsFromFile("scripts/bots.txt");
00265     }
00266 
00267     // get all bots from .bot files
00268     numdirs = trap_FS_GetFileList("scripts", ".bot", dirlist, 1024 );
00269     dirptr  = dirlist;
00270     for (i = 0; i < numdirs; i++, dirptr += dirlen+1) {
00271         dirlen = strlen(dirptr);
00272         strcpy(filename, "scripts/");
00273         strcat(filename, dirptr);
00274         UI_LoadBotsFromFile(filename);
00275     }
00276     trap_Print( va( "%i bots parsed\n", ui_numBots ) );
00277 }

Here is the call graph for this function:

void UI_LoadConfig_Cache void   ) 
 

Definition at line 252 of file ui_loadconfig.c.

References ART_ARROWLEFT, ART_ARROWRIGHT, ART_ARROWS, ART_BACK0, ART_BACK1, ART_FIGHT0, ART_FIGHT1, ART_FRAMEL, ART_FRAMER, and trap_R_RegisterShaderNoMip().

Referenced by LoadConfig_MenuInit().

00252                                  {
00253     trap_R_RegisterShaderNoMip( ART_BACK0 );
00254     trap_R_RegisterShaderNoMip( ART_BACK1 );
00255     trap_R_RegisterShaderNoMip( ART_FIGHT0 );
00256     trap_R_RegisterShaderNoMip( ART_FIGHT1 );
00257     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00258     trap_R_RegisterShaderNoMip( ART_FRAMER );
00259     trap_R_RegisterShaderNoMip( ART_ARROWS );
00260     trap_R_RegisterShaderNoMip( ART_ARROWLEFT );
00261     trap_R_RegisterShaderNoMip( ART_ARROWRIGHT );
00262 }

Here is the call graph for this function:

void UI_LoadConfigMenu void   ) 
 

Definition at line 270 of file ui_loadconfig.c.

References LoadConfig_MenuInit(), configs_t::menu, s_configs, and UI_PushMenu().

00270                                {
00271     LoadConfig_MenuInit();
00272     UI_PushMenu( &s_configs.menu );
00273 }

Here is the call graph for this function:

void UI_LoadMenus const char *  menuFile,
qboolean  reset
 

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:

void UI_LogAwardData int  award,
int  data
 

Definition at line 520 of file ui_gameinfo.c.

References atoi, Com_sprintf(), data, Info_SetValueForKey(), Info_ValueForKey(), S_COLOR_RED, trap_Cvar_Set(), trap_Cvar_VariableStringBuffer(), trap_Print(), and va().

Referenced by UI_SPPostgameMenu_f().

00520                                             {
00521     char    key[16];
00522     char    awardData[MAX_INFO_VALUE];
00523     int     oldValue;
00524 
00525     if( data == 0 ) {
00526         return;
00527     }
00528 
00529     if( award > AWARD_PERFECT ) {
00530         trap_Print( va( S_COLOR_RED "Bad award %i in UI_LogAwardData\n", award ) );
00531         return;
00532     }
00533 
00534     trap_Cvar_VariableStringBuffer( "g_spAwards", awardData, sizeof(awardData) );
00535 
00536     Com_sprintf( key, sizeof(key), "a%i", award );
00537     oldValue = atoi( Info_ValueForKey( awardData, key ) );
00538 
00539     Info_SetValueForKey( awardData, key, va( "%i", oldValue + data ) );
00540     trap_Cvar_Set( "g_spAwards", awardData );
00541 }

Here is the call graph for this function:

void UI_LoginMenu void   ) 
 

Definition at line 203 of file ui_login.c.

References Login_MenuInit(), login_t::menu, s_login, and UI_PushMenu().

00203                           {
00204     Login_MenuInit();
00205     UI_PushMenu ( &s_login.menu );
00206 }

Here is the call graph for this function:

void UI_MainMenu void   ) 
 

Definition at line 269 of file ui_menu.c.

References menucommon_s::callback, mainmenu_t::cinematics, menutext_s::color, mainmenu_t::demos, uiStatic_t::demoversion, _tag_menuframework::draw, errorMessage_t::errorMessage, mainmenu_t::exit, menucommon_s::flags, _tag_menuframework::fullscreen, menutext_s::generic, menucommon_s::id, vmCvar_t::integer, _tag_menuframework::key, KEYCATCH_UI, MainMenu_Cache(), memset(), mainmenu_t::menu, errorMessage_t::menu, Menu_AddItem(), uiStatic_t::menusp, mainmenu_t::mods, mainmenu_t::multiplayer, NULL, qboolean, QMF_CENTER_JUSTIFY, s_errorMessage, s_main, mainmenu_t::setup, _tag_menuframework::showlogo, mainmenu_t::singleplayer, menutext_s::string, strlen(), menutext_s::style, mainmenu_t::teamArena, trap_Cvar_Set(), trap_Cvar_VariableStringBuffer(), trap_GetCDKey(), trap_Key_SetCatcher(), trap_VerifyCDKey(), menucommon_s::type, ui_cdkeychecked, UI_CDKeyMenu(), UI_CENTER, UI_PushMenu(), UI_TeamArenaExists(), uis, _tag_menuframework::wrapAround, menucommon_s::x, menucommon_s::y, and y.

00269                          {
00270     int     y;
00271     qboolean teamArena = qfalse;
00272     int     style = UI_CENTER | UI_DROPSHADOW;
00273 
00274     trap_Cvar_Set( "sv_killserver", "1" );
00275 
00276     if( !uis.demoversion && !ui_cdkeychecked.integer ) {
00277         char    key[17];
00278 
00279         trap_GetCDKey( key, sizeof(key) );
00280         if( trap_VerifyCDKey( key, NULL ) == qfalse ) {
00281             UI_CDKeyMenu();
00282             return;
00283         }
00284     }
00285     
00286     memset( &s_main, 0 ,sizeof(mainmenu_t) );
00287     memset( &s_errorMessage, 0 ,sizeof(errorMessage_t) );
00288 
00289     // com_errorMessage would need that too
00290     MainMenu_Cache();
00291     
00292     trap_Cvar_VariableStringBuffer( "com_errorMessage", s_errorMessage.errorMessage, sizeof(s_errorMessage.errorMessage) );
00293     if (strlen(s_errorMessage.errorMessage))
00294     {   
00295         s_errorMessage.menu.draw = Main_MenuDraw;
00296         s_errorMessage.menu.key = ErrorMessage_Key;
00297         s_errorMessage.menu.fullscreen = qtrue;
00298         s_errorMessage.menu.wrapAround = qtrue;
00299         s_errorMessage.menu.showlogo = qtrue;       
00300 
00301         trap_Key_SetCatcher( KEYCATCH_UI );
00302         uis.menusp = 0;
00303         UI_PushMenu ( &s_errorMessage.menu );
00304         
00305         return;
00306     }
00307 
00308     s_main.menu.draw = Main_MenuDraw;
00309     s_main.menu.fullscreen = qtrue;
00310     s_main.menu.wrapAround = qtrue;
00311     s_main.menu.showlogo = qtrue;
00312 
00313     y = 134;
00314     s_main.singleplayer.generic.type        = MTYPE_PTEXT;
00315     s_main.singleplayer.generic.flags       = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00316     s_main.singleplayer.generic.x           = 320;
00317     s_main.singleplayer.generic.y           = y;
00318     s_main.singleplayer.generic.id          = ID_SINGLEPLAYER;
00319     s_main.singleplayer.generic.callback    = Main_MenuEvent; 
00320     s_main.singleplayer.string              = "SINGLE PLAYER";
00321     s_main.singleplayer.color               = color_red;
00322     s_main.singleplayer.style               = style;
00323 
00324     y += MAIN_MENU_VERTICAL_SPACING;
00325     s_main.multiplayer.generic.type         = MTYPE_PTEXT;
00326     s_main.multiplayer.generic.flags        = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00327     s_main.multiplayer.generic.x            = 320;
00328     s_main.multiplayer.generic.y            = y;
00329     s_main.multiplayer.generic.id           = ID_MULTIPLAYER;
00330     s_main.multiplayer.generic.callback     = Main_MenuEvent; 
00331     s_main.multiplayer.string               = "MULTIPLAYER";
00332     s_main.multiplayer.color                = color_red;
00333     s_main.multiplayer.style                = style;
00334 
00335     y += MAIN_MENU_VERTICAL_SPACING;
00336     s_main.setup.generic.type               = MTYPE_PTEXT;
00337     s_main.setup.generic.flags              = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00338     s_main.setup.generic.x                  = 320;
00339     s_main.setup.generic.y                  = y;
00340     s_main.setup.generic.id                 = ID_SETUP;
00341     s_main.setup.generic.callback           = Main_MenuEvent; 
00342     s_main.setup.string                     = "SETUP";
00343     s_main.setup.color                      = color_red;
00344     s_main.setup.style                      = style;
00345 
00346     y += MAIN_MENU_VERTICAL_SPACING;
00347     s_main.demos.generic.type               = MTYPE_PTEXT;
00348     s_main.demos.generic.flags              = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00349     s_main.demos.generic.x                  = 320;
00350     s_main.demos.generic.y                  = y;
00351     s_main.demos.generic.id                 = ID_DEMOS;
00352     s_main.demos.generic.callback           = Main_MenuEvent; 
00353     s_main.demos.string                     = "DEMOS";
00354     s_main.demos.color                      = color_red;
00355     s_main.demos.style                      = style;
00356 
00357     y += MAIN_MENU_VERTICAL_SPACING;
00358     s_main.cinematics.generic.type          = MTYPE_PTEXT;
00359     s_main.cinematics.generic.flags         = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00360     s_main.cinematics.generic.x             = 320;
00361     s_main.cinematics.generic.y             = y;
00362     s_main.cinematics.generic.id            = ID_CINEMATICS;
00363     s_main.cinematics.generic.callback      = Main_MenuEvent; 
00364     s_main.cinematics.string                = "CINEMATICS";
00365     s_main.cinematics.color                 = color_red;
00366     s_main.cinematics.style                 = style;
00367 
00368     if (UI_TeamArenaExists()) {
00369         teamArena = qtrue;
00370         y += MAIN_MENU_VERTICAL_SPACING;
00371         s_main.teamArena.generic.type           = MTYPE_PTEXT;
00372         s_main.teamArena.generic.flags          = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00373         s_main.teamArena.generic.x              = 320;
00374         s_main.teamArena.generic.y              = y;
00375         s_main.teamArena.generic.id             = ID_TEAMARENA;
00376         s_main.teamArena.generic.callback       = Main_MenuEvent; 
00377         s_main.teamArena.string                 = "TEAM ARENA";
00378         s_main.teamArena.color                  = color_red;
00379         s_main.teamArena.style                  = style;
00380     }
00381 
00382     y += MAIN_MENU_VERTICAL_SPACING;
00383     s_main.mods.generic.type            = MTYPE_PTEXT;
00384     s_main.mods.generic.flags           = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00385     s_main.mods.generic.x               = 320;
00386     s_main.mods.generic.y               = y;
00387     s_main.mods.generic.id              = ID_MODS;
00388     s_main.mods.generic.callback        = Main_MenuEvent; 
00389     s_main.mods.string                  = "MODS";
00390     s_main.mods.color                   = color_red;
00391     s_main.mods.style                   = style;
00392 
00393     y += MAIN_MENU_VERTICAL_SPACING;
00394     s_main.exit.generic.type                = MTYPE_PTEXT;
00395     s_main.exit.generic.flags               = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
00396     s_main.exit.generic.x                   = 320;
00397     s_main.exit.generic.y                   = y;
00398     s_main.exit.generic.id                  = ID_EXIT;
00399     s_main.exit.generic.callback            = Main_MenuEvent; 
00400     s_main.exit.string                      = "EXIT";
00401     s_main.exit.color                       = color_red;
00402     s_main.exit.style                       = style;
00403 
00404     Menu_AddItem( &s_main.menu, &s_main.singleplayer );
00405     Menu_AddItem( &s_main.menu, &s_main.multiplayer );
00406     Menu_AddItem( &s_main.menu, &s_main.setup );
00407     Menu_AddItem( &s_main.menu, &s_main.demos );
00408     Menu_AddItem( &s_main.menu, &s_main.cinematics );
00409     if (teamArena) {
00410         Menu_AddItem( &s_main.menu, &s_main.teamArena );
00411     }
00412     Menu_AddItem( &s_main.menu, &s_main.mods );
00413     Menu_AddItem( &s_main.menu, &s_main.exit );             
00414 
00415     trap_Key_SetCatcher( KEYCATCH_UI );
00416     uis.menusp = 0;
00417     UI_PushMenu ( &s_main.menu );
00418         
00419 }

Here is the call graph for this function:

void UI_ModsMenu void   ) 
 

Definition at line 280 of file ui_mods.c.

References mods_t::menu, s_mods, UI_Mods_MenuInit(), and UI_PushMenu().

00280                          {
00281     UI_Mods_MenuInit();
00282     UI_PushMenu( &s_mods.menu );
00283 }

Here is the call graph for this function:

void UI_ModsMenu_Cache void   ) 
 

Definition at line 265 of file ui_mods.c.

References ART_BACK0, ART_BACK1, ART_FIGHT0, ART_FIGHT1, ART_FRAMEL, ART_FRAMER, and trap_R_RegisterShaderNoMip().

00265                                {
00266     trap_R_RegisterShaderNoMip( ART_BACK0 );
00267     trap_R_RegisterShaderNoMip( ART_BACK1 );
00268     trap_R_RegisterShaderNoMip( ART_FIGHT0 );
00269     trap_R_RegisterShaderNoMip( ART_FIGHT1 );
00270     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00271     trap_R_RegisterShaderNoMip( ART_FRAMER );
00272 }

Here is the call graph for this function:

void UI_MouseEvent int  dx,
int  dy
 

Definition at line 880 of file ui_atoms.c.

References uiStatic_t::activemenu, menucommon_s::bottom, CHAN_LOCAL_SOUND, _tag_menuframework::cursor, _tag_menuframework::cursor_prev, uiStatic_t::cursorx, uiStatic_t::cursory, menucommon_s::flags, i, _tag_menuframework::items, menucommon_s::left, m, menu_move_sound, Menu_SetCursor(), _tag_menuframework::nitems, QMF_GRAYED, menucommon_s::right, menucommon_s::top, trap_S_StartLocalSound(), and uis.

Referenced by UI_Refresh(), and vmMain().

00881 {
00882     int             i;
00883     menucommon_s*   m;
00884 
00885     if (!uis.activemenu)
00886         return;
00887 
00888     // update mouse screen position
00889     uis.cursorx += dx;
00890     if (uis.cursorx < 0)
00891         uis.cursorx = 0;
00892     else if (uis.cursorx > SCREEN_WIDTH)
00893         uis.cursorx = SCREEN_WIDTH;
00894 
00895     uis.cursory += dy;
00896     if (uis.cursory < 0)
00897         uis.cursory = 0;
00898     else if (uis.cursory > SCREEN_HEIGHT)
00899         uis.cursory = SCREEN_HEIGHT;
00900 
00901     // region test the active menu items
00902     for (i=0; i<uis.activemenu->nitems; i++)
00903     {
00904         m = (menucommon_s*)uis.activemenu->items[i];
00905 
00906         if (m->flags & (QMF_GRAYED|QMF_INACTIVE))
00907             continue;
00908 
00909         if ((uis.cursorx < m->left) ||
00910             (uis.cursorx > m->right) ||
00911             (uis.cursory < m->top) ||
00912             (uis.cursory > m->bottom))
00913         {
00914             // cursor out of item bounds
00915             continue;
00916         }
00917 
00918         // set focus to item at cursor
00919         if (uis.activemenu->cursor != i)
00920         {
00921             Menu_SetCursor( uis.activemenu, i );
00922             ((menucommon_s*)(uis.activemenu->items[uis.activemenu->cursor_prev]))->flags &= ~QMF_HASMOUSEFOCUS;
00923 
00924             if ( !(((menucommon_s*)(uis.activemenu->items[uis.activemenu->cursor]))->flags & QMF_SILENT ) ) {
00925                 trap_S_StartLocalSound( menu_move_sound, CHAN_LOCAL_SOUND );
00926             }
00927         }
00928 
00929         ((menucommon_s*)(uis.activemenu->items[uis.activemenu->cursor]))->flags |= QMF_HASMOUSEFOCUS;
00930         return;
00931     }  
00932 
00933     if (uis.activemenu->nitems > 0) {
00934         // out of any region
00935         ((menucommon_s*)(uis.activemenu->items[uis.activemenu->cursor]))->flags &= ~QMF_HASMOUSEFOCUS;
00936     }
00937 }

Here is the call graph for this function:

void UI_NetworkOptionsMenu void   ) 
 

Definition at line 277 of file ui_network.c.

References networkOptionsInfo_t::menu, Menu_SetCursorToItem(), networkOptionsInfo_t::network, networkOptionsInfo, UI_NetworkOptionsMenu_Init(), and UI_PushMenu().

Here is the call graph for this function:

void UI_NetworkOptionsMenu_Cache void   ) 
 

Definition at line 264 of file ui_network.c.

References ART_BACK0, ART_BACK1, ART_FRAMEL, ART_FRAMER, and trap_R_RegisterShaderNoMip().

00264                                          {
00265     trap_R_RegisterShaderNoMip( ART_FRAMEL );
00266     trap_R_RegisterShaderNoMip( ART_FRAMER );
00267     trap_R_RegisterShaderNoMip( ART_BACK0 );
00268     trap_R_RegisterShaderNoMip( ART_BACK1 );
00269 }

Here is the call graph for this function:

void UI_NewGame void   ) 
 

Definition at line 697 of file ui_gameinfo.c.

References trap_Cvar_Set().

Referenced by Reset_MenuEvent(), and UI_SPLevelMenu_ResetAction().

00697                         {
00698     trap_Cvar_Set( "g_spScores1", "" );
00699     trap_Cvar_Set( "g_spScores2", "" );
00700     trap_Cvar_Set( "g_spScores3", "" );
00701     trap_Cvar_Set( "g_spScores4", "" );
00702     trap_Cvar_Set( "g_spScores5", "" );
00703     trap_Cvar_Set( "g_spAwards", "" );
00704     trap_Cvar_Set( "g_spVideos", "" );
00705 }

Here is the call graph for this function:

void UI_PlayerInfo_SetInfo playerInfo_t pi,
int  legsAnim,
int  torsoAnim,
vec3_t  viewAngles,
vec3_t  moveAngles,
weapon_t  weaponNum,
qboolean  chat
 

Definition at line 1139 of file ui_players.c.

References BOTH_DEATH1, playerInfo_t::chat, playerInfo_t::currentWeapon, dp_realtime, jumpHeight, playerInfo_t::lastWeapon, playerInfo_t::legs, LEGS_JUMP, playerInfo_t::legsAnim, playerInfo_t::moveAngles, playerInfo_t::muzzleFlashTime, playerInfo_t::newModel, playerInfo_t::pendingLegsAnim, playerInfo_t::pendingTorsoAnim, playerInfo_t::pendingWeapon, playerInfo_t::torso, TORSO_ATTACK, TORSO_GESTURE, TORSO_RAISE, TORSO_STAND, playerInfo_t::torsoAnim, UI_ForceLegsAnim(), UI_ForceTorsoAnim(), UI_PlayerInfo_SetWeapon(), VectorCopy, playerInfo_t::viewAngles, playerInfo_t::weapon, weapon_t, playerInfo_t::weaponTimer, WP_NONE, lerpFrame_t::yawAngle, and lerpFrame_t::yawing.

Referenced by Controls_UpdateModel(), PlayerModel_UpdateModel(), PlayerSettings_DrawPlayer(), PlayerSettings_SetMenuItems(), UI_DrawOpponent(), and UI_DrawPlayerModel().

01139                                                                                                                                                         {
01140     int         currentAnim;
01141     weapon_t    weaponNum;
01142 
01143     pi->chat = chat;
01144 
01145     // view angles
01146     VectorCopy( viewAngles, pi->viewAngles );
01147 
01148     // move angles
01149     VectorCopy( moveAngles, pi->moveAngles );
01150 
01151     if ( pi->newModel ) {
01152         pi->newModel = qfalse;
01153 
01154         jumpHeight = 0;
01155         pi->pendingLegsAnim = 0;
01156         UI_ForceLegsAnim( pi, legsAnim );
01157         pi->leg