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

Go to the source code of this file.
Data Structures | |
| struct | errorMessage_t |
| struct | mainmenu_t |
Defines | |
| #define | ID_CINEMATICS 14 |
| #define | ID_DEMOS 13 |
| #define | ID_EXIT 17 |
| #define | ID_MODS 16 |
| #define | ID_MULTIPLAYER 11 |
| #define | ID_SETUP 12 |
| #define | ID_SINGLEPLAYER 10 |
| #define | ID_TEAMARENA 15 |
| #define | MAIN_BANNER_MODEL "models/mapobjects/banner/banner5.md3" |
| #define | MAIN_MENU_VERTICAL_SPACING 34 |
Functions | |
| sfxHandle_t | ErrorMessage_Key (int key) |
| void | Main_MenuDraw (void) |
| void | Main_MenuEvent (void *ptr, int event) |
| void | MainMenu_Cache (void) |
| void | MainMenu_ExitAction (qboolean result) |
| void | UI_MainMenu (void) |
| qboolean | UI_TeamArenaExists (void) |
Variables | |
| errorMessage_t | s_errorMessage |
| mainmenu_t | s_main |
|
|
Definition at line 39 of file ui_menu.c. Referenced by Main_MenuEvent(). |
|
|
Definition at line 38 of file ui_menu.c. Referenced by Main_MenuEvent(). |
|
|
|
|
|
Definition at line 41 of file ui_menu.c. Referenced by Main_MenuEvent(). |
|
|
Definition at line 36 of file ui_menu.c. Referenced by Main_MenuEvent(). |
|
|
|
|
|
Definition at line 35 of file ui_menu.c. Referenced by Main_MenuEvent(). |
|
|
Definition at line 40 of file ui_menu.c. Referenced by Main_MenuEvent(). |
|
|
Definition at line 44 of file ui_menu.c. Referenced by MainMenu_Cache(). |
|
|
|
|
|
Definition at line 144 of file ui_menu.c. References sfxHandle_t, trap_Cvar_Set(), and UI_MainMenu(). 00145 {
00146 trap_Cvar_Set( "com_errorMessage", "" );
00147 UI_MainMenu();
00148 return (menu_null_sound);
00149 }
|
Here is the call graph for this function:

|
|
Definition at line 158 of file ui_menu.c. References AnglesToAxis(), AxisClear(), mainmenu_t::bannerModel, uiStatic_t::demoversion, errorMessage_t::errorMessage, h(), memset(), mainmenu_t::menu, Menu_Draw(), menu_text_color, uiStatic_t::realtime, RF_LIGHTING_ORIGIN, s_errorMessage, s_main, sin(), strlen(), trap_R_AddRefEntityToScene(), trap_R_ClearScene(), trap_R_RenderScene(), UI_AdjustFrom640(), UI_CENTER, UI_DrawProportionalString(), UI_DrawProportionalString_AutoWrapped(), UI_DrawString(), UI_DROPSHADOW, UI_SMALLFONT, uis, vec3_t, VectorCopy, VectorSet, w, x, and y. 00158 {
00159 refdef_t refdef;
00160 refEntity_t ent;
00161 vec3_t origin;
00162 vec3_t angles;
00163 float adjust;
00164 float x, y, w, h;
00165 vec4_t color = {0.5, 0, 0, 1};
00166
00167 // setup the refdef
00168
00169 memset( &refdef, 0, sizeof( refdef ) );
00170
00171 refdef.rdflags = RDF_NOWORLDMODEL;
00172
00173 AxisClear( refdef.viewaxis );
00174
00175 x = 0;
00176 y = 0;
00177 w = 640;
00178 h = 120;
00179 UI_AdjustFrom640( &x, &y, &w, &h );
00180 refdef.x = x;
00181 refdef.y = y;
00182 refdef.width = w;
00183 refdef.height = h;
00184
00185 adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (float)uis.realtime / 1000 );
00186 refdef.fov_x = 60 + adjust;
00187 refdef.fov_y = 19.6875 + adjust;
00188
00189 refdef.time = uis.realtime;
00190
00191 origin[0] = 300;
00192 origin[1] = 0;
00193 origin[2] = -32;
00194
00195 trap_R_ClearScene();
00196
00197 // add the model
00198
00199 memset( &ent, 0, sizeof(ent) );
00200
00201 adjust = 5.0 * sin( (float)uis.realtime / 5000 );
00202 VectorSet( angles, 0, 180 + adjust, 0 );
00203 AnglesToAxis( angles, ent.axis );
00204 ent.hModel = s_main.bannerModel;
00205 VectorCopy( origin, ent.origin );
00206 VectorCopy( origin, ent.lightingOrigin );
00207 ent.renderfx = RF_LIGHTING_ORIGIN | RF_NOSHADOW;
00208 VectorCopy( ent.origin, ent.oldorigin );
00209
00210 trap_R_AddRefEntityToScene( &ent );
00211
00212 trap_R_RenderScene( &refdef );
00213
00214 if (strlen(s_errorMessage.errorMessage))
00215 {
00216 UI_DrawProportionalString_AutoWrapped( 320, 192, 600, 20, s_errorMessage.errorMessage, UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, menu_text_color );
00217 }
00218 else
00219 {
00220 // standard menu drawing
00221 Menu_Draw( &s_main.menu );
00222 }
00223
00224 if (uis.demoversion) {
00225 UI_DrawProportionalString( 320, 372, "DEMO FOR MATURE AUDIENCES DEMO", UI_CENTER|UI_SMALLFONT, color );
00226 UI_DrawString( 320, 400, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color );
00227 } else {
00228 UI_DrawString( 320, 450, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color );
00229 }
00230 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 93 of file ui_menu.c. References EXEC_APPEND, ID_CINEMATICS, ID_DEMOS, ID_EXIT, ID_MODS, ID_MULTIPLAYER, ID_SETUP, ID_SINGLEPLAYER, ID_TEAMARENA, MainMenu_ExitAction(), NULL, trap_Cmd_ExecuteText(), trap_Cvar_Set(), UI_ArenaServersMenu(), UI_CinematicsMenu(), UI_ConfirmMenu(), UI_DemosMenu(), UI_ModsMenu(), UI_SetupMenu(), and UI_SPLevelMenu(). 00093 {
00094 if( event != QM_ACTIVATED ) {
00095 return;
00096 }
00097
00098 switch( ((menucommon_s*)ptr)->id ) {
00099 case ID_SINGLEPLAYER:
00100 UI_SPLevelMenu();
00101 break;
00102
00103 case ID_MULTIPLAYER:
00104 UI_ArenaServersMenu();
00105 break;
00106
00107 case ID_SETUP:
00108 UI_SetupMenu();
00109 break;
00110
00111 case ID_DEMOS:
00112 UI_DemosMenu();
00113 break;
00114
00115 case ID_CINEMATICS:
00116 UI_CinematicsMenu();
00117 break;
00118
00119 case ID_MODS:
00120 UI_ModsMenu();
00121 break;
00122
00123 case ID_TEAMARENA:
00124 trap_Cvar_Set( "fs_game", "missionpack");
00125 trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart;" );
00126 break;
00127
00128 case ID_EXIT:
00129 UI_ConfirmMenu( "EXIT GAME?", NULL, MainMenu_ExitAction );
00130 break;
00131 }
00132 }
|
Here is the call graph for this function:

|
|
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:

|
|
Definition at line 78 of file ui_menu.c. References UI_CreditMenu(), and UI_PopMenu(). Referenced by Main_MenuEvent(). 00078 {
00079 if( !result ) {
00080 return;
00081 }
00082 UI_PopMenu();
00083 UI_CreditMenu();
00084 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 238 of file ui_menu.c. References i, Q_stricmp(), qboolean, strlen(), and trap_FS_GetFileList(). Referenced by UI_MainMenu(). 00238 {
00239 int numdirs;
00240 char dirlist[2048];
00241 char *dirptr;
00242 char *descptr;
00243 int i;
00244 int dirlen;
00245
00246 numdirs = trap_FS_GetFileList( "$modlist", "", dirlist, sizeof(dirlist) );
00247 dirptr = dirlist;
00248 for( i = 0; i < numdirs; i++ ) {
00249 dirlen = strlen( dirptr ) + 1;
00250 descptr = dirptr + dirlen;
00251 if (Q_stricmp(dirptr, "missionpack") == 0) {
00252 return qtrue;
00253 }
00254 dirptr += dirlen + strlen(descptr) + 1;
00255 }
00256 return qfalse;
00257 }
|
Here is the call graph for this function:

|
|
Definition at line 71 of file ui_menu.c. Referenced by Main_MenuDraw(), and UI_MainMenu(). |
|
|
Definition at line 64 of file ui_menu.c. Referenced by Main_MenuDraw(), MainMenu_Cache(), and UI_MainMenu(). |
1.3.9.1