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

Go to the source code of this file.
Data Structures | |
| struct | mods_t |
Defines | |
| #define | ART_BACK0 "menu/art/back_0" |
| #define | ART_BACK1 "menu/art/back_1" |
| #define | ART_FIGHT0 "menu/art/load_0" |
| #define | ART_FIGHT1 "menu/art/load_1" |
| #define | ART_FRAMEL "menu/art/frame2_l" |
| #define | ART_FRAMER "menu/art/frame1_r" |
| #define | GAMEBUFSIZE ( MAX_MODS * 16 ) |
| #define | ID_BACK 10 |
| #define | ID_GO 11 |
| #define | ID_LIST 12 |
| #define | MAX_MODS 64 |
| #define | NAMEBUFSIZE ( MAX_MODS * 48 ) |
Functions | |
| void | UI_Mods_LoadMods (void) |
| void | UI_Mods_MenuEvent (void *ptr, int event) |
| void | UI_Mods_MenuInit (void) |
| void | UI_Mods_ParseInfos (char *modDir, char *modDesc) |
| void | UI_ModsMenu (void) |
| void | UI_ModsMenu_Cache (void) |
Variables | |
| mods_t | s_mods |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 150 of file ui_mods.c. References mods_t::description, mods_t::descriptionList, mods_t::descriptionPtr, mods_t::fs_game, mods_t::fs_gameList, mods_t::fs_gamePtr, i, menulist_s::itemnames, mods_t::list, menulist_s::numitems, s_mods, strlen(), trap_FS_GetFileList(), trap_Print(), UI_Mods_ParseInfos(), and va(). Referenced by UI_Mods_MenuInit(). 00150 {
00151 int numdirs;
00152 char dirlist[2048];
00153 char *dirptr;
00154 char *descptr;
00155 int i;
00156 int dirlen;
00157
00158 s_mods.list.itemnames = (const char **)s_mods.descriptionList;
00159 s_mods.descriptionPtr = s_mods.description;
00160 s_mods.fs_gamePtr = s_mods.fs_game;
00161
00162 // always start off with baseq3
00163 s_mods.list.numitems = 1;
00164 s_mods.list.itemnames[0] = s_mods.descriptionList[0] = "Quake III Arena";
00165 s_mods.fs_gameList[0] = "";
00166
00167 numdirs = trap_FS_GetFileList( "$modlist", "", dirlist, sizeof(dirlist) );
00168 dirptr = dirlist;
00169 for( i = 0; i < numdirs; i++ ) {
00170 dirlen = strlen( dirptr ) + 1;
00171 descptr = dirptr + dirlen;
00172 UI_Mods_ParseInfos( dirptr, descptr);
00173 dirptr += dirlen + strlen(descptr) + 1;
00174 }
00175
00176 trap_Print( va( "%i mods parsed\n", s_mods.list.numitems ) );
00177 if (s_mods.list.numitems > MAX_MODS) {
00178 s_mods.list.numitems = MAX_MODS;
00179 }
00180 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 71 of file ui_mods.c. References menulist_s::curvalue, EXEC_APPEND, mods_t::fs_gameList, ID_BACK, ID_GO, mods_t::list, s_mods, trap_Cmd_ExecuteText(), trap_Cvar_Set(), and UI_PopMenu(). 00071 {
00072 if( event != QM_ACTIVATED ) {
00073 return;
00074 }
00075
00076 switch ( ((menucommon_s*)ptr)->id ) {
00077 case ID_GO:
00078 trap_Cvar_Set( "fs_game", s_mods.fs_gameList[s_mods.list.curvalue] );
00079 trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart;" );
00080 UI_PopMenu();
00081 break;
00082
00083 case ID_BACK:
00084 UI_PopMenu();
00085 break;
00086 }
00087 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 95 of file ui_mods.c. References mods_t::descriptionList, mods_t::descriptionPtr, mods_t::fs_gameList, mods_t::fs_gamePtr, menulist_s::itemnames, mods_t::list, menulist_s::numitems, Q_strncpyz(), s_mods, and strlen(). Referenced by UI_Mods_LoadMods(). 00095 {
00096 s_mods.fs_gameList[s_mods.list.numitems] = s_mods.fs_gamePtr;
00097 Q_strncpyz( s_mods.fs_gamePtr, modDir, 16 );
00098
00099 s_mods.descriptionList[s_mods.list.numitems] = s_mods.descriptionPtr;
00100 Q_strncpyz( s_mods.descriptionPtr, modDesc, 48 );
00101
00102 s_mods.list.itemnames[s_mods.list.numitems] = s_mods.descriptionPtr;
00103 s_mods.descriptionPtr += strlen( s_mods.descriptionPtr ) + 1;
00104 s_mods.fs_gamePtr += strlen( s_mods.fs_gamePtr ) + 1;
00105 s_mods.list.numitems++;
00106 }
|
Here is the call graph for this function:

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

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

|
|
Definition at line 63 of file ui_mods.c. Referenced by UI_Mods_LoadMods(), UI_Mods_MenuEvent(), UI_Mods_MenuInit(), UI_Mods_ParseInfos(), and UI_ModsMenu(). |
1.3.9.1