icculus quake2 doxygen  1.0 dev
menu.c File Reference
#include <ctype.h>
#include <io.h>
#include "client.h"
#include "../client/qmenu.h"

Go to the source code of this file.

Classes

struct  menulayer_t
 
struct  playermodelinfo_s
 

Macros

#define NUM_CURSOR_FRAMES   15
 
#define MAX_MENU_DEPTH   8
 
#define MAIN_ITEMS   5
 
#define MAX_SAVEGAMES   15
 
#define MAX_LOCAL_SERVERS   8
 
#define NO_SERVER_STRING   "<no server>"
 
#define NUM_ADDRESSBOOK_ENTRIES   9
 
#define MAX_DISPLAYNAME   16
 
#define MAX_PLAYERMODELS   1024
 

Functions

void M_Menu_Main_f (void)
 
void M_Menu_Game_f (void)
 
void M_Menu_LoadGame_f (void)
 
void M_Menu_SaveGame_f (void)
 
void M_Menu_PlayerConfig_f (void)
 
void M_Menu_DownloadOptions_f (void)
 
void M_Menu_Credits_f (void)
 
void M_Menu_Multiplayer_f (void)
 
void M_Menu_JoinServer_f (void)
 
void M_Menu_AddressBook_f (void)
 
void M_Menu_StartServer_f (void)
 
void M_Menu_DMOptions_f (void)
 
void M_Menu_Video_f (void)
 
void M_Menu_Options_f (void)
 
void M_Menu_Keys_f (void)
 
void M_Menu_Quit_f (void)
 
void M_Menu_Credits (void)
 
static void M_Banner (char *name)
 
void M_PushMenu (void(*draw)(void), const char *(*key)(int k))
 
void M_ForceMenuOff (void)
 
void M_PopMenu (void)
 
const char * Default_MenuKey (menuframework_s *m, int key)
 
void M_DrawCharacter (int cx, int cy, int num)
 
void M_Print (int cx, int cy, char *str)
 
void M_PrintWhite (int cx, int cy, char *str)
 
void M_DrawPic (int x, int y, char *pic)
 
void M_DrawCursor (int x, int y, int f)
 
void M_DrawTextBox (int x, int y, int width, int lines)
 
void M_Main_Draw (void)
 
const char * M_Main_Key (int key)
 
static void Multiplayer_MenuDraw (void)
 
static void PlayerSetupFunc (void *unused)
 
static void JoinNetworkServerFunc (void *unused)
 
static void StartNetworkServerFunc (void *unused)
 
void Multiplayer_MenuInit (void)
 
const char * Multiplayer_MenuKey (int key)
 
static void M_UnbindCommand (char *command)
 
static void M_FindKeysForCommand (char *command, int *twokeys)
 
static void KeyCursorDrawFunc (menuframework_s *menu)
 
static void DrawKeyBindingFunc (void *self)
 
static void KeyBindingFunc (void *self)
 
static void Keys_MenuInit (void)
 
static void Keys_MenuDraw (void)
 
static const char * Keys_MenuKey (int key)
 
static void CrosshairFunc (void *unused)
 
static void JoystickFunc (void *unused)
 
static void CustomizeControlsFunc (void *unused)
 
static void AlwaysRunFunc (void *unused)
 
static void FreeLookFunc (void *unused)
 
static void MouseSpeedFunc (void *unused)
 
static float ClampCvar (float min, float max, float value)
 
static void ControlsSetMenuItemValues (void)
 
static void ControlsResetDefaultsFunc (void *unused)
 
static void InvertMouseFunc (void *unused)
 
static void LookspringFunc (void *unused)
 
static void LookstrafeFunc (void *unused)
 
static void UpdateVolumeFunc (void *unused)
 
static void CDShuffleFunc (void *unused)
 
static void UpdateCDVolumeFunc (void *unused)
 
static void ConsoleFunc (void *unused)
 
static void UpdateSoundQualityFunc (void *unused)
 
void Options_MenuInit (void)
 
void Options_MenuDraw (void)
 
const char * Options_MenuKey (int key)
 
void M_Credits_MenuDraw (void)
 
const char * M_Credits_Key (int key)
 
int Developer_searchpath (int who)
 
static void StartGame (void)
 
static void EasyGameFunc (void *data)
 
static void MediumGameFunc (void *data)
 
static void HardGameFunc (void *data)
 
static void LoadGameFunc (void *unused)
 
static void SaveGameFunc (void *unused)
 
static void CreditsFunc (void *unused)
 
void Game_MenuInit (void)
 
void Game_MenuDraw (void)
 
const char * Game_MenuKey (int key)
 
void Create_Savestrings (void)
 
void LoadGameCallback (void *self)
 
void LoadGame_MenuInit (void)
 
void LoadGame_MenuDraw (void)
 
const char * LoadGame_MenuKey (int key)
 
void SaveGameCallback (void *self)
 
void SaveGame_MenuDraw (void)
 
void SaveGame_MenuInit (void)
 
const char * SaveGame_MenuKey (int key)
 
void M_AddToServerList (netadr_t adr, char *info)
 
void JoinServerFunc (void *self)
 
void AddressBookFunc (void *self)
 
void NullCursorDraw (void *self)
 
void SearchLocalGames (void)
 
void SearchLocalGamesFunc (void *self)
 
void JoinServer_MenuInit (void)
 
void JoinServer_MenuDraw (void)
 
const char * JoinServer_MenuKey (int key)
 
void DMOptionsFunc (void *self)
 
void RulesChangeFunc (void *self)
 
void StartServerActionFunc (void *self)
 
void StartServer_MenuInit (void)
 
void StartServer_MenuDraw (void)
 
const char * StartServer_MenuKey (int key)
 
static void DMFlagCallback (void *self)
 
void DMOptions_MenuInit (void)
 
void DMOptions_MenuDraw (void)
 
const char * DMOptions_MenuKey (int key)
 
static void DownloadCallback (void *self)
 
void DownloadOptions_MenuInit (void)
 
void DownloadOptions_MenuDraw (void)
 
const char * DownloadOptions_MenuKey (int key)
 
void AddressBook_MenuInit (void)
 
const char * AddressBook_MenuKey (int key)
 
void AddressBook_MenuDraw (void)
 
void DownloadOptionsFunc (void *self)
 
static void HandednessCallback (void *unused)
 
static void RateCallback (void *unused)
 
static void ModelCallback (void *unused)
 
static void FreeFileList (char **list, int n)
 
static qboolean IconOfSkinExists (char *skin, char **pcxfiles, int npcxfiles)
 
static qboolean PlayerConfig_ScanDirectories (void)
 
static int pmicmpfnc (const void *_a, const void *_b)
 
qboolean PlayerConfig_MenuInit (void)
 
void PlayerConfig_MenuDraw (void)
 
const char * PlayerConfig_MenuKey (int key)
 
const char * M_Quit_Key (int key)
 
void M_Quit_Draw (void)
 
void M_Init (void)
 
void M_Draw (void)
 
void M_Keydown (int key)
 

Variables

static int m_main_cursor
 
static char * menu_in_sound = "misc/menu1.wav"
 
static char * menu_move_sound = "misc/menu2.wav"
 
static char * menu_out_sound = "misc/menu3.wav"
 
qboolean m_entersound
 
void(* m_drawfunc )(void)
 
const char *(* m_keyfunc )(int key)
 
menulayer_t m_layers [MAX_MENU_DEPTH]
 
int m_menudepth
 
static menuframework_s s_multiplayer_menu
 
static menuaction_s s_join_network_server_action
 
static menuaction_s s_start_network_server_action
 
static menuaction_s s_player_setup_action
 
char * bindnames [][2]
 
int keys_cursor
 
static int bind_grab
 
static menuframework_s s_keys_menu
 
static menuaction_s s_keys_attack_action
 
static menuaction_s s_keys_change_weapon_action
 
static menuaction_s s_keys_walk_forward_action
 
static menuaction_s s_keys_backpedal_action
 
static menuaction_s s_keys_turn_left_action
 
static menuaction_s s_keys_turn_right_action
 
static menuaction_s s_keys_run_action
 
static menuaction_s s_keys_step_left_action
 
static menuaction_s s_keys_step_right_action
 
static menuaction_s s_keys_sidestep_action
 
static menuaction_s s_keys_look_up_action
 
static menuaction_s s_keys_look_down_action
 
static menuaction_s s_keys_center_view_action
 
static menuaction_s s_keys_mouse_look_action
 
static menuaction_s s_keys_keyboard_look_action
 
static menuaction_s s_keys_move_up_action
 
static menuaction_s s_keys_move_down_action
 
static menuaction_s s_keys_inventory_action
 
static menuaction_s s_keys_inv_use_action
 
static menuaction_s s_keys_inv_drop_action
 
static menuaction_s s_keys_inv_prev_action
 
static menuaction_s s_keys_inv_next_action
 
static menuaction_s s_keys_help_computer_action
 
static cvar_twin_noalttab
 
cvar_tin_joystick
 
static menuframework_s s_options_menu
 
static menuaction_s s_options_defaults_action
 
static menuaction_s s_options_customize_options_action
 
static menuslider_s s_options_sensitivity_slider
 
static menulist_s s_options_freelook_box
 
static menulist_s s_options_noalttab_box
 
static menulist_s s_options_alwaysrun_box
 
static menulist_s s_options_invertmouse_box
 
static menulist_s s_options_lookspring_box
 
static menulist_s s_options_lookstrafe_box
 
static menulist_s s_options_crosshair_box
 
static menuslider_s s_options_sfxvolume_slider
 
static menulist_s s_options_joystick_box
 
static menulist_s s_options_cdvolume_box
 
static menulist_s s_options_cdshuffle_box
 
static menulist_s s_options_quality_list
 
static menulist_s s_options_compatibility_list
 
static menulist_s s_options_console_action
 
static int credits_start_time
 
static const char ** credits
 
static char * creditsIndex [256]
 
static char * creditsBuffer
 
static const char * idcredits []
 
static const char * xatcredits []
 
static const char * roguecredits []
 
static int m_game_cursor
 
static menuframework_s s_game_menu
 
static menuaction_s s_easy_game_action
 
static menuaction_s s_medium_game_action
 
static menuaction_s s_hard_game_action
 
static menuaction_s s_load_game_action
 
static menuaction_s s_save_game_action
 
static menuaction_s s_credits_action
 
static menuseparator_s s_blankline
 
static menuframework_s s_savegame_menu
 
static menuframework_s s_loadgame_menu
 
static menuaction_s s_loadgame_actions [MAX_SAVEGAMES]
 
char m_savestrings [MAX_SAVEGAMES][32]
 
qboolean m_savevalid [MAX_SAVEGAMES]
 
static menuaction_s s_savegame_actions [MAX_SAVEGAMES]
 
static menuframework_s s_joinserver_menu
 
static menuseparator_s s_joinserver_server_title
 
static menuaction_s s_joinserver_search_action
 
static menuaction_s s_joinserver_address_book_action
 
static menuaction_s s_joinserver_server_actions [MAX_LOCAL_SERVERS]
 
int m_num_servers
 
static char local_server_names [MAX_LOCAL_SERVERS][80]
 
static netadr_t local_server_netadr [MAX_LOCAL_SERVERS]
 
static menuframework_s s_startserver_menu
 
static char ** mapnames
 
static int nummaps
 
static menuaction_s s_startserver_start_action
 
static menuaction_s s_startserver_dmoptions_action
 
static menufield_s s_timelimit_field
 
static menufield_s s_fraglimit_field
 
static menufield_s s_maxclients_field
 
static menufield_s s_hostname_field
 
static menulist_s s_startmap_list
 
static menulist_s s_rules_box
 
static char dmoptions_statusbar [128]
 
static menuframework_s s_dmoptions_menu
 
static menulist_s s_friendlyfire_box
 
static menulist_s s_falls_box
 
static menulist_s s_weapons_stay_box
 
static menulist_s s_instant_powerups_box
 
static menulist_s s_powerups_box
 
static menulist_s s_health_box
 
static menulist_s s_spawn_farthest_box
 
static menulist_s s_teamplay_box
 
static menulist_s s_samelevel_box
 
static menulist_s s_force_respawn_box
 
static menulist_s s_armor_box
 
static menulist_s s_allow_exit_box
 
static menulist_s s_infinite_ammo_box
 
static menulist_s s_fixed_fov_box
 
static menulist_s s_quad_drop_box
 
static menulist_s s_no_mines_box
 
static menulist_s s_no_nukes_box
 
static menulist_s s_stack_double_box
 
static menulist_s s_no_spheres_box
 
static menuframework_s s_downloadoptions_menu
 
static menuseparator_s s_download_title
 
static menulist_s s_allow_download_box
 
static menulist_s s_allow_download_maps_box
 
static menulist_s s_allow_download_models_box
 
static menulist_s s_allow_download_players_box
 
static menulist_s s_allow_download_sounds_box
 
static menuframework_s s_addressbook_menu
 
static menufield_s s_addressbook_fields [NUM_ADDRESSBOOK_ENTRIES]
 
static menuframework_s s_player_config_menu
 
static menufield_s s_player_name_field
 
static menulist_s s_player_model_box
 
static menulist_s s_player_skin_box
 
static menulist_s s_player_handedness_box
 
static menulist_s s_player_rate_box
 
static menuseparator_s s_player_skin_title
 
static menuseparator_s s_player_model_title
 
static menuseparator_s s_player_hand_title
 
static menuseparator_s s_player_rate_title
 
static menuaction_s s_player_download_action
 
static playermodelinfo_s s_pmi [MAX_PLAYERMODELS]
 
static char * s_pmnames [MAX_PLAYERMODELS]
 
static int s_numplayermodels
 
static int rate_tbl [] = { 2500, 3200, 5000, 10000, 25000, 0 }
 
static const char * rate_names []
 

Macro Definition Documentation

◆ MAIN_ITEMS

#define MAIN_ITEMS   5

Definition at line 388 of file menu.c.

◆ MAX_DISPLAYNAME

#define MAX_DISPLAYNAME   16

Definition at line 3426 of file menu.c.

◆ MAX_LOCAL_SERVERS

#define MAX_LOCAL_SERVERS   8

Definition at line 2264 of file menu.c.

◆ MAX_MENU_DEPTH

#define MAX_MENU_DEPTH   8

Definition at line 63 of file menu.c.

◆ MAX_PLAYERMODELS

#define MAX_PLAYERMODELS   1024

Definition at line 3427 of file menu.c.

◆ MAX_SAVEGAMES

#define MAX_SAVEGAMES   15

Definition at line 2087 of file menu.c.

◆ NO_SERVER_STRING

#define NO_SERVER_STRING   "<no server>"

Definition at line 2273 of file menu.c.

◆ NUM_ADDRESSBOOK_ENTRIES

#define NUM_ADDRESSBOOK_ENTRIES   9

Definition at line 3341 of file menu.c.

◆ NUM_CURSOR_FRAMES

#define NUM_CURSOR_FRAMES   15

Definition at line 29 of file menu.c.

Function Documentation

◆ AddressBook_MenuDraw()

void AddressBook_MenuDraw ( void  )

Definition at line 3395 of file menu.c.

3396 {
3397  M_Banner( "m_banner_addressbook" );
3399 }

Referenced by M_Menu_AddressBook_f().

◆ AddressBook_MenuInit()

void AddressBook_MenuInit ( void  )

Definition at line 3346 of file menu.c.

3347 {
3348  int i;
3349 
3350  s_addressbook_menu.x = viddef.width / 2 - 142;
3351  s_addressbook_menu.y = viddef.height / 2 - 58;
3353 
3354  for ( i = 0; i < NUM_ADDRESSBOOK_ENTRIES; i++ )
3355  {
3356  cvar_t *adr;
3357  char buffer[20];
3358 
3359  Com_sprintf( buffer, sizeof( buffer ), "adr%d", i );
3360 
3361  adr = Cvar_Get( buffer, "", CVAR_ARCHIVE );
3362 
3367  s_addressbook_fields[i].generic.y = i * 18 + 0;
3372 
3373  strcpy( s_addressbook_fields[i].buffer, adr->string );
3374 
3376  }
3377 }

Referenced by M_Menu_AddressBook_f().

◆ AddressBook_MenuKey()

const char* AddressBook_MenuKey ( int  key)

Definition at line 3379 of file menu.c.

3380 {
3381  if ( key == K_ESCAPE )
3382  {
3383  int index;
3384  char buffer[20];
3385 
3386  for ( index = 0; index < NUM_ADDRESSBOOK_ENTRIES; index++ )
3387  {
3388  Com_sprintf( buffer, sizeof( buffer ), "adr%d", index );
3390  }
3391  }
3392  return Default_MenuKey( &s_addressbook_menu, key );
3393 }

Referenced by M_Menu_AddressBook_f().

◆ AddressBookFunc()

void AddressBookFunc ( void self)

Definition at line 2326 of file menu.c.

2327 {
2329 }

Referenced by JoinServer_MenuInit().

◆ AlwaysRunFunc()

static void AlwaysRunFunc ( void unused)
static

Definition at line 1066 of file menu.c.

1067 {
1069 }

Referenced by Options_MenuInit().

◆ CDShuffleFunc()

static void CDShuffleFunc ( void unused)
static

Definition at line 1156 of file menu.c.

1157 {
1159 }

Referenced by Options_MenuInit().

◆ ClampCvar()

static float ClampCvar ( float  min,
float  max,
float  value 
)
static

Definition at line 1088 of file menu.c.

1089 {
1090  if ( value < min ) return min;
1091  if ( value > max ) return max;
1092  return value;
1093 }

Referenced by ControlsSetMenuItemValues(), and StartServerActionFunc().

◆ ConsoleFunc()

static void ConsoleFunc ( void unused)
static

Definition at line 1182 of file menu.c.

1183 {
1184  /*
1185  ** the proper way to do this is probably to have ToggleConsole_f accept a parameter
1186  */
1187  extern void Key_ClearTyping( void );
1188 
1189  if ( cl.attractloop )
1190  {
1191  Cbuf_AddText ("killserver\n");
1192  return;
1193  }
1194 
1195  Key_ClearTyping ();
1196  Con_ClearNotify ();
1197 
1198  M_ForceMenuOff ();
1200 }

Referenced by Options_MenuInit().

◆ ControlsResetDefaultsFunc()

static void ControlsResetDefaultsFunc ( void unused)
static

Definition at line 1128 of file menu.c.

1129 {
1130  Cbuf_AddText ("exec default.cfg\n");
1131  Cbuf_Execute();
1132 
1134 }

Referenced by Options_MenuInit().

◆ ControlsSetMenuItemValues()

static void ControlsSetMenuItemValues ( void  )
static

Definition at line 1095 of file menu.c.

1096 {
1099 
1101 
1102  s_options_quality_list.curvalue = !Cvar_VariableValue( "s_loadas8bit" );
1104 
1105  Cvar_SetValue( "cl_run", ClampCvar( 0, 1, cl_run->value ) );
1107 
1109 
1110  Cvar_SetValue( "lookspring", ClampCvar( 0, 1, lookspring->value ) );
1112 
1113  Cvar_SetValue( "lookstrafe", ClampCvar( 0, 1, lookstrafe->value ) );
1115 
1116  Cvar_SetValue( "freelook", ClampCvar( 0, 1, freelook->value ) );
1118 
1119  Cvar_SetValue( "crosshair", ClampCvar( 0, 3, crosshair->value ) );
1121 
1122  Cvar_SetValue( "in_joystick", ClampCvar( 0, 1, in_joystick->value ) );
1124 
1126 }

Referenced by ControlsResetDefaultsFunc(), and Options_MenuInit().

◆ Create_Savestrings()

void Create_Savestrings ( void  )

Definition at line 2097 of file menu.c.

2098 {
2099  int i;
2100  FILE *f;
2101  char name[MAX_OSPATH];
2102 
2103  for (i=0 ; i<MAX_SAVEGAMES ; i++)
2104  {
2105  Com_sprintf (name, sizeof(name), "%s/save/save%i/server.ssv", FS_Gamedir(), i);
2106  f = fopen (name, "rb");
2107  if (!f)
2108  {
2109  strcpy (m_savestrings[i], "<EMPTY>");
2110  m_savevalid[i] = false;
2111  }
2112  else
2113  {
2114  FS_Read (m_savestrings[i], sizeof(m_savestrings[i]), f);
2115  fclose (f);
2116  m_savevalid[i] = true;
2117  }
2118  }
2119 }

Referenced by LoadGame_MenuInit(), M_Menu_SaveGame_f(), and SaveGame_MenuInit().

◆ CreditsFunc()

static void CreditsFunc ( void unused)
static

Definition at line 1994 of file menu.c.

1995 {
1996  M_Menu_Credits_f();
1997 }

Referenced by Game_MenuInit().

◆ CrosshairFunc()

static void CrosshairFunc ( void unused)
static

Definition at line 1051 of file menu.c.

1052 {
1054 }

Referenced by Options_MenuInit().

◆ CustomizeControlsFunc()

static void CustomizeControlsFunc ( void unused)
static

Definition at line 1061 of file menu.c.

1062 {
1063  M_Menu_Keys_f();
1064 }

Referenced by Options_MenuInit().

◆ Default_MenuKey()

const char* Default_MenuKey ( menuframework_s m,
int  key 
)

Definition at line 142 of file menu.c.

143 {
144  const char *sound = NULL;
146 
147  if ( m )
148  {
149  if ( ( item = Menu_ItemAtCursor( m ) ) != 0 )
150  {
151  if ( item->type == MTYPE_FIELD )
152  {
153  if ( Field_Key( ( menufield_s * ) item, key ) )
154  return NULL;
155  }
156  }
157  }
158 
159  switch ( key )
160  {
161  case K_ESCAPE:
162  M_PopMenu();
163  return menu_out_sound;
164  case K_KP_UPARROW:
165  case K_UPARROW:
166  if ( m )
167  {
168  m->cursor--;
169  Menu_AdjustCursor( m, -1 );
170  sound = menu_move_sound;
171  }
172  break;
173  case K_TAB:
174  if ( m )
175  {
176  m->cursor++;
177  Menu_AdjustCursor( m, 1 );
178  sound = menu_move_sound;
179  }
180  break;
181  case K_KP_DOWNARROW:
182  case K_DOWNARROW:
183  if ( m )
184  {
185  m->cursor++;
186  Menu_AdjustCursor( m, 1 );
187  sound = menu_move_sound;
188  }
189  break;
190  case K_KP_LEFTARROW:
191  case K_LEFTARROW:
192  if ( m )
193  {
194  Menu_SlideItem( m, -1 );
195  sound = menu_move_sound;
196  }
197  break;
198  case K_KP_RIGHTARROW:
199  case K_RIGHTARROW:
200  if ( m )
201  {
202  Menu_SlideItem( m, 1 );
203  sound = menu_move_sound;
204  }
205  break;
206 
207  case K_MOUSE1:
208  case K_MOUSE2:
209  case K_MOUSE3:
210  case K_MOUSE4:
211  case K_MOUSE5:
212  case K_JOY1:
213  case K_JOY2:
214  case K_JOY3:
215  case K_JOY4:
216  case K_AUX1:
217  case K_AUX2:
218  case K_AUX3:
219  case K_AUX4:
220  case K_AUX5:
221  case K_AUX6:
222  case K_AUX7:
223  case K_AUX8:
224  case K_AUX9:
225  case K_AUX10:
226  case K_AUX11:
227  case K_AUX12:
228  case K_AUX13:
229  case K_AUX14:
230  case K_AUX15:
231  case K_AUX16:
232  case K_AUX17:
233  case K_AUX18:
234  case K_AUX19:
235  case K_AUX20:
236  case K_AUX21:
237  case K_AUX22:
238  case K_AUX23:
239  case K_AUX24:
240  case K_AUX25:
241  case K_AUX26:
242  case K_AUX27:
243  case K_AUX28:
244  case K_AUX29:
245  case K_AUX30:
246  case K_AUX31:
247  case K_AUX32:
248 
249  case K_KP_ENTER:
250  case K_ENTER:
251  if ( m )
252  Menu_SelectItem( m );
253  sound = menu_move_sound;
254  break;
255  }
256 
257  return sound;
258 }

Referenced by AddressBook_MenuKey(), DMOptions_MenuKey(), DownloadOptions_MenuKey(), Game_MenuKey(), JoinServer_MenuKey(), Keys_MenuKey(), LoadGame_MenuKey(), Multiplayer_MenuKey(), Options_MenuKey(), PlayerConfig_MenuKey(), SaveGame_MenuKey(), and StartServer_MenuKey().

◆ Developer_searchpath()

int Developer_searchpath ( int  who)

Definition at line 159 of file files.c.

160 {
161 
162  int ch;
163  // PMM - warning removal
164 // char *start;
165  searchpath_t *search;
166 
167  if (who == 1) // xatrix
168  ch = 'x';
169  else if (who == 2)
170  ch = 'r';
171 
172  for (search = fs_searchpaths ; search ; search = search->next)
173  {
174  if (strstr (search->filename, "xatrix"))
175  return 1;
176 
177  if (strstr (search->filename, "rogue"))
178  return 2;
179 /*
180  start = strchr (search->filename, ch);
181 
182  if (start == NULL)
183  continue;
184 
185  if (strcmp (start ,"xatrix") == 0)
186  return (1);
187 */
188  }
189  return (0);
190 
191 }

Referenced by DMFlagCallback(), DMOptions_MenuInit(), M_Menu_Credits_f(), RulesChangeFunc(), StartServer_MenuInit(), and StartServerActionFunc().

◆ DMFlagCallback()

static void DMFlagCallback ( void self)
static

Definition at line 2834 of file menu.c.

2835 {
2836  menulist_s *f = ( menulist_s * ) self;
2837  int flags;
2838  int bit = 0;
2839 
2840  flags = Cvar_VariableValue( "dmflags" );
2841 
2842  if ( f == &s_friendlyfire_box )
2843  {
2844  if ( f->curvalue )
2846  else
2848  goto setvalue;
2849  }
2850  else if ( f == &s_falls_box )
2851  {
2852  if ( f->curvalue )
2853  flags &= ~DF_NO_FALLING;
2854  else
2855  flags |= DF_NO_FALLING;
2856  goto setvalue;
2857  }
2858  else if ( f == &s_weapons_stay_box )
2859  {
2860  bit = DF_WEAPONS_STAY;
2861  }
2862  else if ( f == &s_instant_powerups_box )
2863  {
2864  bit = DF_INSTANT_ITEMS;
2865  }
2866  else if ( f == &s_allow_exit_box )
2867  {
2868  bit = DF_ALLOW_EXIT;
2869  }
2870  else if ( f == &s_powerups_box )
2871  {
2872  if ( f->curvalue )
2873  flags &= ~DF_NO_ITEMS;
2874  else
2875  flags |= DF_NO_ITEMS;
2876  goto setvalue;
2877  }
2878  else if ( f == &s_health_box )
2879  {
2880  if ( f->curvalue )
2881  flags &= ~DF_NO_HEALTH;
2882  else
2883  flags |= DF_NO_HEALTH;
2884  goto setvalue;
2885  }
2886  else if ( f == &s_spawn_farthest_box )
2887  {
2888  bit = DF_SPAWN_FARTHEST;
2889  }
2890  else if ( f == &s_teamplay_box )
2891  {
2892  if ( f->curvalue == 1 )
2893  {
2894  flags |= DF_SKINTEAMS;
2895  flags &= ~DF_MODELTEAMS;
2896  }
2897  else if ( f->curvalue == 2 )
2898  {
2899  flags |= DF_MODELTEAMS;
2900  flags &= ~DF_SKINTEAMS;
2901  }
2902  else
2903  {
2904  flags &= ~( DF_MODELTEAMS | DF_SKINTEAMS );
2905  }
2906 
2907  goto setvalue;
2908  }
2909  else if ( f == &s_samelevel_box )
2910  {
2911  bit = DF_SAME_LEVEL;
2912  }
2913  else if ( f == &s_force_respawn_box )
2914  {
2915  bit = DF_FORCE_RESPAWN;
2916  }
2917  else if ( f == &s_armor_box )
2918  {
2919  if ( f->curvalue )
2920  flags &= ~DF_NO_ARMOR;
2921  else
2922  flags |= DF_NO_ARMOR;
2923  goto setvalue;
2924  }
2925  else if ( f == &s_infinite_ammo_box )
2926  {
2927  bit = DF_INFINITE_AMMO;
2928  }
2929  else if ( f == &s_fixed_fov_box )
2930  {
2931  bit = DF_FIXED_FOV;
2932  }
2933  else if ( f == &s_quad_drop_box )
2934  {
2935  bit = DF_QUAD_DROP;
2936  }
2937 
2938 //=======
2939 //ROGUE
2940  else if (Developer_searchpath(2) == 2)
2941  {
2942  if ( f == &s_no_mines_box)
2943  {
2944  bit = DF_NO_MINES;
2945  }
2946  else if ( f == &s_no_nukes_box)
2947  {
2948  bit = DF_NO_NUKES;
2949  }
2950  else if ( f == &s_stack_double_box)
2951  {
2952  bit = DF_NO_STACK_DOUBLE;
2953  }
2954  else if ( f == &s_no_spheres_box)
2955  {
2956  bit = DF_NO_SPHERES;
2957  }
2958  }
2959 //ROGUE
2960 //=======
2961 
2962  if ( f )
2963  {
2964  if ( f->curvalue == 0 )
2965  flags &= ~bit;
2966  else
2967  flags |= bit;
2968  }
2969 
2970 setvalue:
2971  Cvar_SetValue ("dmflags", flags);
2972 
2973  Com_sprintf( dmoptions_statusbar, sizeof( dmoptions_statusbar ), "dmflags = %d", flags );
2974 
2975 }

Referenced by DMOptions_MenuInit().

◆ DMOptions_MenuDraw()

void DMOptions_MenuDraw ( void  )

Definition at line 3187 of file menu.c.

3188 {
3190 }

Referenced by M_Menu_DMOptions_f().

◆ DMOptions_MenuInit()

void DMOptions_MenuInit ( void  )

Definition at line 2977 of file menu.c.

2978 {
2979  static const char *yes_no_names[] =
2980  {
2981  "no", "yes", 0
2982  };
2983  static const char *teamplay_names[] =
2984  {
2985  "disabled", "by skin", "by model", 0
2986  };
2987  int dmflags = Cvar_VariableValue( "dmflags" );
2988  int y = 0;
2989 
2990  s_dmoptions_menu.x = viddef.width * 0.50;
2992 
2994  s_falls_box.generic.x = 0;
2995  s_falls_box.generic.y = y;
2996  s_falls_box.generic.name = "falling damage";
2998  s_falls_box.itemnames = yes_no_names;
3000 
3003  s_weapons_stay_box.generic.y = y += 10;
3004  s_weapons_stay_box.generic.name = "weapons stay";
3006  s_weapons_stay_box.itemnames = yes_no_names;
3008 
3012  s_instant_powerups_box.generic.name = "instant powerups";
3014  s_instant_powerups_box.itemnames = yes_no_names;
3016 
3018  s_powerups_box.generic.x = 0;
3019  s_powerups_box.generic.y = y += 10;
3020  s_powerups_box.generic.name = "allow powerups";
3022  s_powerups_box.itemnames = yes_no_names;
3024 
3026  s_health_box.generic.x = 0;
3027  s_health_box.generic.y = y += 10;
3029  s_health_box.generic.name = "allow health";
3030  s_health_box.itemnames = yes_no_names;
3032 
3034  s_armor_box.generic.x = 0;
3035  s_armor_box.generic.y = y += 10;
3036  s_armor_box.generic.name = "allow armor";
3038  s_armor_box.itemnames = yes_no_names;
3039  s_armor_box.curvalue = ( dmflags & DF_NO_ARMOR ) == 0;
3040 
3043  s_spawn_farthest_box.generic.y = y += 10;
3044  s_spawn_farthest_box.generic.name = "spawn farthest";
3046  s_spawn_farthest_box.itemnames = yes_no_names;
3048 
3051  s_samelevel_box.generic.y = y += 10;
3052  s_samelevel_box.generic.name = "same map";
3054  s_samelevel_box.itemnames = yes_no_names;
3056 
3059  s_force_respawn_box.generic.y = y += 10;
3060  s_force_respawn_box.generic.name = "force respawn";
3062  s_force_respawn_box.itemnames = yes_no_names;
3064 
3066  s_teamplay_box.generic.x = 0;
3067  s_teamplay_box.generic.y = y += 10;
3068  s_teamplay_box.generic.name = "teamplay";
3070  s_teamplay_box.itemnames = teamplay_names;
3071 
3074  s_allow_exit_box.generic.y = y += 10;
3075  s_allow_exit_box.generic.name = "allow exit";
3077  s_allow_exit_box.itemnames = yes_no_names;
3079 
3082  s_infinite_ammo_box.generic.y = y += 10;
3083  s_infinite_ammo_box.generic.name = "infinite ammo";
3085  s_infinite_ammo_box.itemnames = yes_no_names;
3087 
3090  s_fixed_fov_box.generic.y = y += 10;
3091  s_fixed_fov_box.generic.name = "fixed FOV";
3093  s_fixed_fov_box.itemnames = yes_no_names;
3095 
3098  s_quad_drop_box.generic.y = y += 10;
3099  s_quad_drop_box.generic.name = "quad drop";
3101  s_quad_drop_box.itemnames = yes_no_names;
3103 
3106  s_friendlyfire_box.generic.y = y += 10;
3107  s_friendlyfire_box.generic.name = "friendly fire";
3109  s_friendlyfire_box.itemnames = yes_no_names;
3111 
3112 //============
3113 //ROGUE
3114  if(Developer_searchpath(2) == 2)
3115  {
3117  s_no_mines_box.generic.x = 0;
3118  s_no_mines_box.generic.y = y += 10;
3119  s_no_mines_box.generic.name = "remove mines";
3121  s_no_mines_box.itemnames = yes_no_names;
3123 
3125  s_no_nukes_box.generic.x = 0;
3126  s_no_nukes_box.generic.y = y += 10;
3127  s_no_nukes_box.generic.name = "remove nukes";
3129  s_no_nukes_box.itemnames = yes_no_names;
3131 
3134  s_stack_double_box.generic.y = y += 10;
3135  s_stack_double_box.generic.name = "2x/4x stacking off";
3137  s_stack_double_box.itemnames = yes_no_names;
3139 
3142  s_no_spheres_box.generic.y = y += 10;
3143  s_no_spheres_box.generic.name = "remove spheres";
3145  s_no_spheres_box.itemnames = yes_no_names;
3147 
3148  }
3149 //ROGUE
3150 //============
3151 
3167 
3168 //=======
3169 //ROGUE
3170  if(Developer_searchpath(2) == 2)
3171  {
3176  }
3177 //ROGUE
3178 //=======
3179 
3181 
3182  // set the original dmflags statusbar
3183  DMFlagCallback( 0 );
3185 }

Referenced by M_Menu_DMOptions_f().

◆ DMOptions_MenuKey()

const char* DMOptions_MenuKey ( int  key)

Definition at line 3192 of file menu.c.

3193 {
3194  return Default_MenuKey( &s_dmoptions_menu, key );
3195 }

Referenced by M_Menu_DMOptions_f().

◆ DMOptionsFunc()

void DMOptionsFunc ( void self)

Definition at line 2450 of file menu.c.

2451 {
2452  if (s_rules_box.curvalue == 1)
2453  return;
2455 }

Referenced by StartServer_MenuInit().

◆ DownloadCallback()

static void DownloadCallback ( void self)
static

Definition at line 3219 of file menu.c.

3220 {
3221  menulist_s *f = ( menulist_s * ) self;
3222 
3223  if (f == &s_allow_download_box)
3224  {
3225  Cvar_SetValue("allow_download", f->curvalue);
3226  }
3227 
3228  else if (f == &s_allow_download_maps_box)
3229  {
3230  Cvar_SetValue("allow_download_maps", f->curvalue);
3231  }
3232 
3233  else if (f == &s_allow_download_models_box)
3234  {
3235  Cvar_SetValue("allow_download_models", f->curvalue);
3236  }
3237 
3238  else if (f == &s_allow_download_players_box)
3239  {
3240  Cvar_SetValue("allow_download_players", f->curvalue);
3241  }
3242 
3243  else if (f == &s_allow_download_sounds_box)
3244  {
3245  Cvar_SetValue("allow_download_sounds", f->curvalue);
3246  }
3247 }

Referenced by DownloadOptions_MenuInit().

◆ DownloadOptions_MenuDraw()

void DownloadOptions_MenuDraw ( void  )

Definition at line 3319 of file menu.c.

3320 {
3322 }

Referenced by M_Menu_DownloadOptions_f().

◆ DownloadOptions_MenuInit()

void DownloadOptions_MenuInit ( void  )

Definition at line 3249 of file menu.c.

3250 {
3251  static const char *yes_no_names[] =
3252  {
3253  "no", "yes", 0
3254  };
3255  int y = 0;
3256 
3259 
3261  s_download_title.generic.name = "Download Options";
3262  s_download_title.generic.x = 48;
3264 
3267  s_allow_download_box.generic.y = y += 20;
3268  s_allow_download_box.generic.name = "allow downloading";
3270  s_allow_download_box.itemnames = yes_no_names;
3271  s_allow_download_box.curvalue = (Cvar_VariableValue("allow_download") != 0);
3272 
3278  s_allow_download_maps_box.itemnames = yes_no_names;
3279  s_allow_download_maps_box.curvalue = (Cvar_VariableValue("allow_download_maps") != 0);
3280 
3284  s_allow_download_players_box.generic.name = "player models/skins";
3286  s_allow_download_players_box.itemnames = yes_no_names;
3287  s_allow_download_players_box.curvalue = (Cvar_VariableValue("allow_download_players") != 0);
3288 
3294  s_allow_download_models_box.itemnames = yes_no_names;
3295  s_allow_download_models_box.curvalue = (Cvar_VariableValue("allow_download_models") != 0);
3296 
3302  s_allow_download_sounds_box.itemnames = yes_no_names;
3303  s_allow_download_sounds_box.curvalue = (Cvar_VariableValue("allow_download_sounds") != 0);
3304 
3311 
3313 
3314  // skip over title
3315  if (s_downloadoptions_menu.cursor == 0)
3317 }

Referenced by M_Menu_DownloadOptions_f().

◆ DownloadOptions_MenuKey()

const char* DownloadOptions_MenuKey ( int  key)

Definition at line 3324 of file menu.c.

3325 {
3326  return Default_MenuKey( &s_downloadoptions_menu, key );
3327 }

Referenced by M_Menu_DownloadOptions_f().

◆ DownloadOptionsFunc()

void DownloadOptionsFunc ( void self)

Definition at line 3445 of file menu.c.

3446 {
3448 }

Referenced by PlayerConfig_MenuInit().

◆ DrawKeyBindingFunc()

static void DrawKeyBindingFunc ( void self)
static

Definition at line 706 of file menu.c.

707 {
708  int keys[2];
709  menuaction_s *a = ( menuaction_s * ) self;
710 
712 
713  if (keys[0] == -1)
714  {
715  Menu_DrawString( a->generic.x + a->generic.parent->x + 16, a->generic.y + a->generic.parent->y, "???" );
716  }
717  else
718  {
719  int x;
720  const char *name;
721 
722  name = Key_KeynumToString (keys[0]);
723 
724  Menu_DrawString( a->generic.x + a->generic.parent->x + 16, a->generic.y + a->generic.parent->y, name );
725 
726  x = strlen(name) * 8;
727 
728  if (keys[1] != -1)
729  {
730  Menu_DrawString( a->generic.x + a->generic.parent->x + 24 + x, a->generic.y + a->generic.parent->y, "or" );
731  Menu_DrawString( a->generic.x + a->generic.parent->x + 48 + x, a->generic.y + a->generic.parent->y, Key_KeynumToString (keys[1]) );
732  }
733  }
734 }

Referenced by Keys_MenuInit().

◆ EasyGameFunc()

static void EasyGameFunc ( void data)
static

Definition at line 1966 of file menu.c.

1967 {
1968  Cvar_ForceSet( "skill", "0" );
1969  StartGame();
1970 }

Referenced by Game_MenuInit().

◆ FreeFileList()

static void FreeFileList ( char **  list,
int  n 
)
static

Definition at line 3467 of file menu.c.

3468 {
3469  int i;
3470 
3471  for ( i = 0; i < n; i++ )
3472  {
3473  if ( list[i] )
3474  {
3475  free( list[i] );
3476  list[i] = 0;
3477  }
3478  }
3479  free( list );
3480 }

Referenced by PlayerConfig_ScanDirectories().

◆ FreeLookFunc()

static void FreeLookFunc ( void unused)
static

Definition at line 1071 of file menu.c.

1072 {
1074 }

Referenced by Options_MenuInit().

◆ Game_MenuDraw()

void Game_MenuDraw ( void  )

Definition at line 2060 of file menu.c.

2061 {
2062  M_Banner( "m_banner_game" );
2064  Menu_Draw( &s_game_menu );
2065 }

Referenced by M_Menu_Game_f().

◆ Game_MenuInit()

void Game_MenuInit ( void  )

Definition at line 1999 of file menu.c.

2000 {
2001  s_game_menu.x = viddef.width * 0.50;
2002  s_game_menu.nitems = 0;
2003 
2008  s_easy_game_action.generic.name = "easy";
2010 
2015  s_medium_game_action.generic.name = "medium";
2017 
2022  s_hard_game_action.generic.name = "hard";
2024 
2026 
2031  s_load_game_action.generic.name = "load game";
2033 
2038  s_save_game_action.generic.name = "save game";
2040 
2044  s_credits_action.generic.y = 60;
2045  s_credits_action.generic.name = "credits";
2047 
2048  Menu_AddItem( &s_game_menu, ( void * ) &s_easy_game_action );
2050  Menu_AddItem( &s_game_menu, ( void * ) &s_hard_game_action );
2051  Menu_AddItem( &s_game_menu, ( void * ) &s_blankline );
2052  Menu_AddItem( &s_game_menu, ( void * ) &s_load_game_action );
2053  Menu_AddItem( &s_game_menu, ( void * ) &s_save_game_action );
2054  Menu_AddItem( &s_game_menu, ( void * ) &s_blankline );
2055  Menu_AddItem( &s_game_menu, ( void * ) &s_credits_action );
2056 
2058 }

Referenced by M_Menu_Game_f().

◆ Game_MenuKey()

const char* Game_MenuKey ( int  key)

Definition at line 2067 of file menu.c.

2068 {
2069  return Default_MenuKey( &s_game_menu, key );
2070 }

Referenced by M_Menu_Game_f().

◆ HandednessCallback()

static void HandednessCallback ( void unused)
static

Definition at line 3450 of file menu.c.

3451 {
3453 }

Referenced by PlayerConfig_MenuInit().

◆ HardGameFunc()

static void HardGameFunc ( void data)
static

Definition at line 1978 of file menu.c.

1979 {
1980  Cvar_ForceSet( "skill", "2" );
1981  StartGame();
1982 }

Referenced by Game_MenuInit().

◆ IconOfSkinExists()

static qboolean IconOfSkinExists ( char *  skin,
char **  pcxfiles,
int  npcxfiles 
)
static

Definition at line 3482 of file menu.c.

3483 {
3484  int i;
3485  char scratch[1024];
3486 
3487  strcpy( scratch, skin );
3488  *strrchr( scratch, '.' ) = 0;
3489  strcat( scratch, "_i.pcx" );
3490 
3491  for ( i = 0; i < npcxfiles; i++ )
3492  {
3493  if ( strcmp( pcxfiles[i], scratch ) == 0 )
3494  return true;
3495  }
3496 
3497  return false;
3498 }

Referenced by PlayerConfig_ScanDirectories().

◆ InvertMouseFunc()

static void InvertMouseFunc ( void unused)
static

Definition at line 1136 of file menu.c.

1137 {
1138  Cvar_SetValue( "m_pitch", -m_pitch->value );
1139 }

Referenced by Options_MenuInit().

◆ JoinNetworkServerFunc()

static void JoinNetworkServerFunc ( void unused)
static

Definition at line 524 of file menu.c.

525 {
527 }

Referenced by Multiplayer_MenuInit().

◆ JoinServer_MenuDraw()

void JoinServer_MenuDraw ( void  )

Definition at line 2411 of file menu.c.

2412 {
2413  M_Banner( "m_banner_join_server" );
2415 }

Referenced by M_Menu_JoinServer_f().

◆ JoinServer_MenuInit()

void JoinServer_MenuInit ( void  )

Definition at line 2360 of file menu.c.

2361 {
2362  int i;
2363 
2364  s_joinserver_menu.x = viddef.width * 0.50 - 120;
2366 
2373 
2375  s_joinserver_search_action.generic.name = "refresh server list";
2380  s_joinserver_search_action.generic.statusbar = "search for servers";
2381 
2383  s_joinserver_server_title.generic.name = "connect to...";
2386 
2387  for ( i = 0; i < MAX_LOCAL_SERVERS; i++ )
2388  {
2396  s_joinserver_server_actions[i].generic.statusbar = "press ENTER to connect";
2397  }
2398 
2402 
2403  for ( i = 0; i < 8; i++ )
2405 
2407 
2408  SearchLocalGames();
2409 }

Referenced by M_Menu_JoinServer_f().

◆ JoinServer_MenuKey()

const char* JoinServer_MenuKey ( int  key)

Definition at line 2418 of file menu.c.

2419 {
2420  return Default_MenuKey( &s_joinserver_menu, key );
2421 }

Referenced by M_Menu_JoinServer_f().

◆ JoinServerFunc()

void JoinServerFunc ( void self)

Definition at line 2308 of file menu.c.

2309 {
2310  char buffer[128];
2311  int index;
2312 
2313  index = ( menuaction_s * ) self - s_joinserver_server_actions;
2314 
2315  if ( Q_stricmp( local_server_names[index], NO_SERVER_STRING ) == 0 )
2316  return;
2317 
2318  if (index >= m_num_servers)
2319  return;
2320 
2321  Com_sprintf (buffer, sizeof(buffer), "connect %s\n", NET_AdrToString (local_server_netadr[index]));
2322  Cbuf_AddText (buffer);
2323  M_ForceMenuOff ();
2324 }

Referenced by JoinServer_MenuInit().

◆ JoystickFunc()

static void JoystickFunc ( void unused)
static

Definition at line 1056 of file menu.c.

1057 {
1058  Cvar_SetValue( "in_joystick", s_options_joystick_box.curvalue );
1059 }

Referenced by Options_MenuInit().

◆ KeyBindingFunc()

static void KeyBindingFunc ( void self)
static

Definition at line 736 of file menu.c.

737 {
738  menuaction_s *a = ( menuaction_s * ) self;
739  int keys[2];
740 
741  M_FindKeysForCommand( bindnames[a->generic.localdata[0]][0], keys );
742 
743  if (keys[1] != -1)
745 
746  bind_grab = true;
747 
748  Menu_SetStatusBar( &s_keys_menu, "press a key or button for this action" );
749 }

Referenced by Keys_MenuKey().

◆ KeyCursorDrawFunc()

static void KeyCursorDrawFunc ( menuframework_s menu)
static

Definition at line 691 of file menu.c.

692 {
693 #ifdef QMAX
694  if ( bind_grab )
695  re.DrawChar( menu->x, menu->y + menu->cursor * 9, '=' , 1);
696  else
697  re.DrawChar( menu->x, menu->y + menu->cursor * 9, 12 + ( ( int ) ( Sys_Milliseconds() / 250 ) & 1 ) , 1);
698 #else
699  if ( bind_grab )
700  re.DrawChar( menu->x, menu->y + menu->cursor * 9, '=' );
701  else
702  re.DrawChar( menu->x, menu->y + menu->cursor * 9, 12 + ( ( int ) ( Sys_Milliseconds() / 250 ) & 1 ) );
703 #endif
704 }

Referenced by Keys_MenuInit().

◆ Keys_MenuDraw()

static void Keys_MenuDraw ( void  )
static

Definition at line 974 of file menu.c.

975 {
978 }

Referenced by M_Menu_Keys_f().

◆ Keys_MenuInit()

static void Keys_MenuInit ( void  )
static

Definition at line 751 of file menu.c.

752 {
753  int y = 0;
754  int i = 0;
755 
756  s_keys_menu.x = viddef.width * 0.50;
757  s_keys_menu.nitems = 0;
759 
767 
775 
783 
791 
799 
807 
811  s_keys_run_action.generic.y = y += 9;
815 
823 
831 
839 
847 
855 
863 
871 
879 
887 
895 
903 
911 
919 
927 
935 
943 
950  Menu_AddItem( &s_keys_menu, ( void * ) &s_keys_run_action );
961 
967 
969 
970  Menu_SetStatusBar( &s_keys_menu, "enter to change, backspace to clear" );
972 }

Referenced by M_Menu_Keys_f().

◆ Keys_MenuKey()

static const char* Keys_MenuKey ( int  key)
static

Definition at line 980 of file menu.c.

981 {
983 
984  if ( bind_grab )
985  {
986  if ( key != K_ESCAPE && key != '`' )
987  {
988  char cmd[1024];
989 
990  Com_sprintf (cmd, sizeof(cmd), "bind \"%s\" \"%s\"\n", Key_KeynumToString(key), bindnames[item->generic.localdata[0]][0]);
991  Cbuf_InsertText (cmd);
992  }
993 
994  Menu_SetStatusBar( &s_keys_menu, "enter to change, backspace to clear" );
995  bind_grab = false;
996  return menu_out_sound;
997  }
998 
999  switch ( key )
1000  {
1001  case K_KP_ENTER:
1002  case K_ENTER:
1003  KeyBindingFunc( item );
1004  return menu_in_sound;
1005  case K_BACKSPACE: // delete bindings
1006  case K_DEL: // delete bindings
1007  case K_KP_DEL:
1008  M_UnbindCommand( bindnames[item->generic.localdata[0]][0] );
1009  return menu_out_sound;
1010  default:
1011  return Default_MenuKey( &s_keys_menu, key );
1012  }
1013 }

Referenced by M_Menu_Keys_f().

◆ LoadGame_MenuDraw()

void LoadGame_MenuDraw ( void  )

Definition at line 2158 of file menu.c.

2159 {
2160  M_Banner( "m_banner_load_game" );
2161 // Menu_AdjustCursor( &s_loadgame_menu, 1 );
2163 }

Referenced by M_Menu_LoadGame_f().

◆ LoadGame_MenuInit()

void LoadGame_MenuInit ( void  )

Definition at line 2130 of file menu.c.

2131 {
2132  int i;
2133 
2134  s_loadgame_menu.x = viddef.width / 2 - 120;
2135  s_loadgame_menu.y = viddef.height / 2 - 58;
2136  s_loadgame_menu.nitems = 0;
2137 
2139 
2140  for ( i = 0; i < MAX_SAVEGAMES; i++ )
2141  {
2146 
2148  s_loadgame_actions[i].generic.y = ( i ) * 10;
2149  if (i>0) // separate from autosave
2150  s_loadgame_actions[i].generic.y += 10;
2151 
2153 
2155  }
2156 }

Referenced by M_Menu_LoadGame_f().

◆ LoadGame_MenuKey()

const char* LoadGame_MenuKey ( int  key)

Definition at line 2165 of file menu.c.

2166 {
2167  if ( key == K_ESCAPE || key == K_ENTER )
2168  {
2170  if ( s_savegame_menu.cursor < 0 )
2171  s_savegame_menu.cursor = 0;
2172  }
2173  return Default_MenuKey( &s_loadgame_menu, key );
2174 }

Referenced by M_Menu_LoadGame_f().

◆ LoadGameCallback()

void LoadGameCallback ( void self)

Definition at line 2121 of file menu.c.

2122 {
2123  menuaction_s *a = ( menuaction_s * ) self;
2124 
2125  if ( m_savevalid[ a->generic.localdata[0] ] )
2126  Cbuf_AddText (va("load save%i\n", a->generic.localdata[0] ) );
2127  M_ForceMenuOff ();
2128 }

Referenced by LoadGame_MenuInit().

◆ LoadGameFunc()

static void LoadGameFunc ( void unused)
static

Definition at line 1984 of file menu.c.

1985 {
1986  M_Menu_LoadGame_f ();
1987 }

Referenced by Game_MenuInit().

◆ LookspringFunc()

static void LookspringFunc ( void unused)
static

Definition at line 1141 of file menu.c.

1142 {
1143  Cvar_SetValue( "lookspring", !lookspring->value );
1144 }

Referenced by Options_MenuInit().

◆ LookstrafeFunc()

static void LookstrafeFunc ( void unused)
static

Definition at line 1146 of file menu.c.

1147 {
1148  Cvar_SetValue( "lookstrafe", !lookstrafe->value );
1149 }

Referenced by Options_MenuInit().

◆ M_AddToServerList()

void M_AddToServerList ( netadr_t  adr,
char *  info 
)

Definition at line 2281 of file menu.c.

2282 {
2283  int i;
2284 
2286  return;
2287  while ( *info == ' ' )
2288  info++;
2289 
2290  // ignore if duplicated
2291  for (i=0 ; i<m_num_servers ; i++)
2292  if (!strcmp(info, local_server_names[i]))
2293  return;
2294 
2296 #ifdef HAVE_IPV6
2297  // Show the IP address as well. Useful to identify whether
2298  // the server is IPv6 or IPv4.
2300  "%s %s", info, NET_AdrToString(adr));
2301 #else
2302  strncpy (local_server_names[m_num_servers], info, sizeof(local_server_names[0])-1);
2303 #endif
2304  m_num_servers++;
2305 }

Referenced by CL_ParseStatusMessage().

◆ M_Banner()

static void M_Banner ( char *  name)
static

Definition at line 75 of file menu.c.

76 {
77  int w, h;
78 
79  re.DrawGetPicSize (&w, &h, name );
80  re.DrawPic( viddef.width / 2 - w / 2, viddef.height / 2 - 110, name );
81 }

Referenced by AddressBook_MenuDraw(), Game_MenuDraw(), JoinServer_MenuDraw(), LoadGame_MenuDraw(), Multiplayer_MenuDraw(), Options_MenuDraw(), and SaveGame_MenuDraw().

◆ M_Credits_Key()

const char* M_Credits_Key ( int  key)

Definition at line 1863 of file menu.c.

1864 {
1865  switch (key)
1866  {
1867  case K_ESCAPE:
1868  if (creditsBuffer)
1870  M_PopMenu ();
1871  break;
1872  }
1873 
1874  return menu_out_sound;
1875 
1876 }

Referenced by M_Menu_Credits_f().

◆ M_Credits_MenuDraw()

void M_Credits_MenuDraw ( void  )

Definition at line 1812 of file menu.c.

1813 {
1814  int i, y;
1815 
1816  /*
1817  ** draw the credits
1818  */
1819  for ( i = 0, y = viddef.height - ( ( cls.realtime - credits_start_time ) / 40.0F ); credits[i] && y < viddef.height; y += 10, i++ )
1820  {
1821  int j, stringoffset = 0;
1822  int bold = false;
1823 
1824  if ( y <= -8 )
1825  continue;
1826 
1827  if ( credits[i][0] == '+' )
1828  {
1829  bold = true;
1830  stringoffset = 1;
1831  }
1832  else
1833  {
1834  bold = false;
1835  stringoffset = 0;
1836  }
1837 
1838  for ( j = 0; credits[i][j+stringoffset]; j++ )
1839  {
1840  int x;
1841 
1842  x = ( viddef.width - strlen( credits[i] ) * 8 - stringoffset * 8 ) / 2 + ( j + stringoffset ) * 8;
1843 
1844  if ( bold )
1845 #ifdef QMAX
1846  re.DrawChar( x, y, credits[i][j+stringoffset] + 128,1);
1847 #else
1848  re.DrawChar( x, y, credits[i][j+stringoffset] + 128 );
1849 #endif
1850  else
1851 #ifdef QMAX
1852  re.DrawChar( x, y, credits[i][j+stringoffset],1);
1853 #else
1854  re.DrawChar( x, y, credits[i][j+stringoffset]);
1855 #endif
1856  }
1857  }
1858 
1859  if ( y < 0 )
1861 }

Referenced by M_Menu_Credits_f().

◆ M_Draw()

void M_Draw ( void  )

Definition at line 4045 of file menu.c.

4046 {
4047  if (cls.key_dest != key_menu)
4048  return;
4049 
4050  // repaint everything next frame
4051  SCR_DirtyScreen ();
4052 
4053  // dim everything behind it down
4054  if (cl.cinematictime > 0)
4055  re.DrawFill (0,0,viddef.width, viddef.height, 0);
4056  else
4057  re.DrawFadeScreen ();
4058 
4059  m_drawfunc ();
4060 
4061  // delay playing the enter sound until after the
4062  // menu has been drawn, to avoid delay while
4063  // caching images
4064  if (m_entersound)
4065  {
4067  m_entersound = false;
4068  }
4069 }

Referenced by SCR_UpdateScreen().

◆ M_DrawCharacter()

void M_DrawCharacter ( int  cx,
int  cy,
int  num 
)

Definition at line 271 of file menu.c.

272 {
273 #ifdef QMAX
274  re.DrawChar ( cx + ((viddef.width - 320)>>1), cy + ((viddef.height - 240)>>1), num, 1);
275 #else
276  re.DrawChar ( cx + ((viddef.width - 320)>>1), cy + ((viddef.height - 240)>>1), num);
277 #endif
278 }

Referenced by M_DrawTextBox(), M_Print(), and M_PrintWhite().

◆ M_DrawCursor()

void M_DrawCursor ( int  x,
int  y,
int  f 
)

Definition at line 315 of file menu.c.

316 {
317  char cursorname[80];
318  static qboolean cached;
319 
320  if ( !cached )
321  {
322  int i;
323 
324  for ( i = 0; i < NUM_CURSOR_FRAMES; i++ )
325  {
326  Com_sprintf( cursorname, sizeof( cursorname ), "m_cursor%d", i );
327 
328  re.RegisterPic( cursorname );
329  }
330  cached = true;
331  }
332 
333  Com_sprintf( cursorname, sizeof(cursorname), "m_cursor%d", f );
334  re.DrawPic( x, y, cursorname );
335 }

Referenced by M_Main_Draw().

◆ M_DrawPic()

void M_DrawPic ( int  x,
int  y,
char *  pic 
)

Definition at line 300 of file menu.c.

301 {
302  re.DrawPic (x + ((viddef.width - 320)>>1), y + ((viddef.height - 240)>>1), pic);
303 }

◆ M_DrawTextBox()

void M_DrawTextBox ( int  x,
int  y,
int  width,
int  lines 
)

Definition at line 337 of file menu.c.

338 {
339  int cx, cy;
340  int n;
341 
342  // draw left side
343  cx = x;
344  cy = y;
345  M_DrawCharacter (cx, cy, 1);
346  for (n = 0; n < lines; n++)
347  {
348  cy += 8;
349  M_DrawCharacter (cx, cy, 4);
350  }
351  M_DrawCharacter (cx, cy+8, 7);
352 
353  // draw middle
354  cx += 8;
355  while (width > 0)
356  {
357  cy = y;
358  M_DrawCharacter (cx, cy, 2);
359  for (n = 0; n < lines; n++)
360  {
361  cy += 8;
362  M_DrawCharacter (cx, cy, 5);
363  }
364  M_DrawCharacter (cx, cy+8, 8);
365  width -= 1;
366  cx += 8;
367  }
368 
369  // draw right side
370  cy = y;
371  M_DrawCharacter (cx, cy, 3);
372  for (n = 0; n < lines; n++)
373  {
374  cy += 8;
375  M_DrawCharacter (cx, cy, 6);
376  }
377  M_DrawCharacter (cx, cy+8, 9);
378 }

Referenced by PlayerConfig_MenuDraw(), SearchLocalGames(), and UpdateSoundQualityFunc().

◆ M_FindKeysForCommand()

static void M_FindKeysForCommand ( char *  command,
int twokeys 
)
static

Definition at line 665 of file menu.c.

666 {
667  int count;
668  int j;
669  int l;
670  char *b;
671 
672  twokeys[0] = twokeys[1] = -1;
673  l = strlen(command);
674  count = 0;
675 
676  for (j=0 ; j<256 ; j++)
677  {
678  b = keybindings[j];
679  if (!b)
680  continue;
681  if (!strncmp (b, command, l) )
682  {
683  twokeys[count] = j;
684  count++;
685  if (count == 2)
686  break;
687  }
688  }
689 }

Referenced by DrawKeyBindingFunc(), and KeyBindingFunc().

◆ M_ForceMenuOff()

void M_ForceMenuOff ( void  )

◆ M_Init()

void M_Init ( void  )

Definition at line 4019 of file menu.c.

4020 {
4021  Cmd_AddCommand ("menu_main", M_Menu_Main_f);
4022  Cmd_AddCommand ("menu_game", M_Menu_Game_f);
4023  Cmd_AddCommand ("menu_loadgame", M_Menu_LoadGame_f);
4024  Cmd_AddCommand ("menu_savegame", M_Menu_SaveGame_f);
4025  Cmd_AddCommand ("menu_joinserver", M_Menu_JoinServer_f);
4026  Cmd_AddCommand ("menu_addressbook", M_Menu_AddressBook_f);
4027  Cmd_AddCommand ("menu_startserver", M_Menu_StartServer_f);
4028  Cmd_AddCommand ("menu_dmoptions", M_Menu_DMOptions_f);
4029  Cmd_AddCommand ("menu_playerconfig", M_Menu_PlayerConfig_f);
4030  Cmd_AddCommand ("menu_downloadoptions", M_Menu_DownloadOptions_f);
4031  Cmd_AddCommand ("menu_credits", M_Menu_Credits_f );
4032  Cmd_AddCommand ("menu_multiplayer", M_Menu_Multiplayer_f );
4033  Cmd_AddCommand ("menu_video", M_Menu_Video_f);
4034  Cmd_AddCommand ("menu_options", M_Menu_Options_f);
4035  Cmd_AddCommand ("menu_keys", M_Menu_Keys_f);
4036  Cmd_AddCommand ("menu_quit", M_Menu_Quit_f);
4037 }

Referenced by CL_Init().

◆ M_Keydown()

void M_Keydown ( int  key)

Definition at line 4077 of file menu.c.

4078 {
4079  const char *s;
4080 
4081  if (m_keyfunc)
4082  if ( ( s = m_keyfunc( key ) ) != 0 )
4083  S_StartLocalSound( ( char * ) s );
4084 }

Referenced by Key_Event().

◆ M_Main_Draw()

void M_Main_Draw ( void  )

Definition at line 391 of file menu.c.

392 {
393  int i;
394  int w, h;
395  int ystart;
396  int xoffset;
397  int widest = -1;
398  int totalheight = 0;
399  char litname[80];
400  char *names[] =
401  {
402  "m_main_game",
403  "m_main_multiplayer",
404  "m_main_options",
405  "m_main_video",
406  "m_main_quit",
407  0
408  };
409 
410  for ( i = 0; names[i] != 0; i++ )
411  {
412  re.DrawGetPicSize( &w, &h, names[i] );
413 
414  if ( w > widest )
415  widest = w;
416  totalheight += ( h + 12 );
417  }
418 
419  ystart = ( viddef.height / 2 - 110 );
420  xoffset = ( viddef.width - widest + 70 ) / 2;
421 
422  for ( i = 0; names[i] != 0; i++ )
423  {
424  if ( i != m_main_cursor )
425  re.DrawPic( xoffset, ystart + i * 40 + 13, names[i] );
426  }
427  strcpy( litname, names[m_main_cursor] );
428  strcat( litname, "_sel" );
429  re.DrawPic( xoffset, ystart + m_main_cursor * 40 + 13, litname );
430 
431  M_DrawCursor( xoffset - 25, ystart + m_main_cursor * 40 + 11, (int)(cls.realtime / 100)%NUM_CURSOR_FRAMES );
432 
433  re.DrawGetPicSize( &w, &h, "m_main_plaque" );
434  re.DrawPic( xoffset - 30 - w, ystart, "m_main_plaque" );
435 
436  re.DrawPic( xoffset - 30 - w, ystart + h + 5, "m_main_logo" );
437 }

Referenced by M_Menu_Main_f().

◆ M_Main_Key()

const char* M_Main_Key ( int  key)

Definition at line 440 of file menu.c.

441 {
442  const char *sound = menu_move_sound;
443 
444  switch (key)
445  {
446  case K_ESCAPE:
447  M_PopMenu ();
448  break;
449 
450  case K_KP_DOWNARROW:
451  case K_DOWNARROW:
452  if (++m_main_cursor >= MAIN_ITEMS)
453  m_main_cursor = 0;
454  return sound;
455 
456  case K_KP_UPARROW:
457  case K_UPARROW:
458  if (--m_main_cursor < 0)
460  return sound;
461 
462  case K_KP_ENTER:
463  case K_ENTER:
464  m_entersound = true;
465 
466  switch (m_main_cursor)
467  {
468  case 0:
469  M_Menu_Game_f ();
470  break;
471 
472  case 1:
474  break;
475 
476  case 2:
477  M_Menu_Options_f ();
478  break;
479 
480  case 3:
481  M_Menu_Video_f ();
482  break;
483 
484  case 4:
485  M_Menu_Quit_f ();
486  break;
487  }
488  }
489 
490  return NULL;
491 }

Referenced by M_Menu_Main_f().

◆ M_Menu_AddressBook_f()

void M_Menu_AddressBook_f ( void  )

Definition at line 3401 of file menu.c.

Referenced by AddressBookFunc(), and M_Init().

◆ M_Menu_Credits()

void M_Menu_Credits ( void  )

◆ M_Menu_Credits_f()

void M_Menu_Credits_f ( void  )

Definition at line 1880 of file menu.c.

1881 {
1882  int n;
1883  int count;
1884  char *p;
1885  int isdeveloper = 0;
1886 
1887  creditsBuffer = NULL;
1888  count = FS_LoadFile ("credits", (void **)&creditsBuffer);
1889  if (count != -1)
1890  {
1891  p = creditsBuffer;
1892  for (n = 0; n < 255; n++)
1893  {
1894  creditsIndex[n] = p;
1895  while (*p != '\r' && *p != '\n')
1896  {
1897  p++;
1898  if (--count == 0)
1899  break;
1900  }
1901  if (*p == '\r')
1902  {
1903  *p++ = 0;
1904  if (--count == 0)
1905  break;
1906  }
1907  *p++ = 0;
1908  if (--count == 0)
1909  break;
1910  }
1911  creditsIndex[++n] = 0;
1912  credits = (const char **)creditsIndex;
1913  }
1914  else
1915  {
1916  isdeveloper = Developer_searchpath (1);
1917 
1918  if (isdeveloper == 1) // xatrix
1919  credits = xatcredits;
1920  else if (isdeveloper == 2) // ROGUE
1922  else
1923  {
1924  credits = idcredits;
1925  }
1926 
1927  }
1928 
1931 }

Referenced by CreditsFunc(), and M_Init().

◆ M_Menu_DMOptions_f()

void M_Menu_DMOptions_f ( void  )

Definition at line 3197 of file menu.c.

3198 {
3201 }

Referenced by DMOptionsFunc(), and M_Init().

◆ M_Menu_DownloadOptions_f()

void M_Menu_DownloadOptions_f ( void  )

Definition at line 3329 of file menu.c.

Referenced by DownloadOptionsFunc(), and M_Init().

◆ M_Menu_Game_f()

void M_Menu_Game_f ( void  )

Definition at line 2072 of file menu.c.

2073 {
2074  Game_MenuInit();
2076  m_game_cursor = 1;
2077 }

Referenced by M_Init(), and M_Main_Key().

◆ M_Menu_JoinServer_f()

void M_Menu_JoinServer_f ( void  )

Definition at line 2423 of file menu.c.

Referenced by JoinNetworkServerFunc(), and M_Init().

◆ M_Menu_Keys_f()

void M_Menu_Keys_f ( void  )

Definition at line 1015 of file menu.c.

1016 {
1017  Keys_MenuInit();
1019 }

Referenced by CustomizeControlsFunc(), and M_Init().

◆ M_Menu_LoadGame_f()

void M_Menu_LoadGame_f ( void  )

Definition at line 2176 of file menu.c.

2177 {
2180 }

Referenced by LoadGameFunc(), and M_Init().

◆ M_Menu_Main_f()

void M_Menu_Main_f ( void  )

Definition at line 494 of file menu.c.

495 {
497 }

Referenced by Key_Event(), and M_Init().

◆ M_Menu_Multiplayer_f()

void M_Menu_Multiplayer_f ( void  )

Definition at line 574 of file menu.c.

Referenced by M_Init(), and M_Main_Key().

◆ M_Menu_Options_f()

void M_Menu_Options_f ( void  )

Definition at line 1434 of file menu.c.

1435 {
1436  Options_MenuInit();
1438 }

Referenced by M_Init(), and M_Main_Key().

◆ M_Menu_PlayerConfig_f()

void M_Menu_PlayerConfig_f ( void  )

Definition at line 3932 of file menu.c.

3933 {
3934  if (!PlayerConfig_MenuInit())
3935  {
3936  Menu_SetStatusBar( &s_multiplayer_menu, "No valid player models found" );
3937  return;
3938  }
3941 }

Referenced by M_Init(), and PlayerSetupFunc().

◆ M_Menu_Quit_f()

void M_Menu_Quit_f ( void  )

Definition at line 4003 of file menu.c.

4004 {
4006 }

Referenced by M_Init(), and M_Main_Key().

◆ M_Menu_SaveGame_f()

void M_Menu_SaveGame_f ( void  )

Definition at line 2246 of file menu.c.

2247 {
2248  if (!Com_ServerState())
2249  return; // not playing a game
2250 
2253  Create_Savestrings ();
2254 }

Referenced by M_Init(), and SaveGameFunc().

◆ M_Menu_StartServer_f()

void M_Menu_StartServer_f ( void  )

Definition at line 2794 of file menu.c.

Referenced by M_Init(), and StartNetworkServerFunc().

◆ M_Menu_Video_f()

void M_Menu_Video_f ( void  )

Definition at line 1448 of file menu.c.

1449 {
1450  VID_MenuInit();
1452 }

Referenced by M_Init(), and M_Main_Key().

◆ M_PopMenu()

void M_PopMenu ( void  )

Definition at line 127 of file menu.c.

128 {
130  if (m_menudepth < 1)
131  Com_Error (ERR_FATAL, "M_PopMenu: depth < 1");
132  m_menudepth--;
133 
136 
137  if (!m_menudepth)
138  M_ForceMenuOff ();
139 }

Referenced by CancelChanges(), Default_MenuKey(), M_Credits_Key(), M_Main_Key(), and M_Quit_Key().

◆ M_Print()

void M_Print ( int  cx,
int  cy,
char *  str 
)

Definition at line 280 of file menu.c.

281 {
282  while (*str)
283  {
284  M_DrawCharacter (cx, cy, (*str)+128);
285  str++;
286  cx += 8;
287  }
288 }

Referenced by SearchLocalGames(), and UpdateSoundQualityFunc().

◆ M_PrintWhite()

void M_PrintWhite ( int  cx,
int  cy,
char *  str 
)

Definition at line 290 of file menu.c.

291 {
292  while (*str)
293  {
294  M_DrawCharacter (cx, cy, *str);
295  str++;
296  cx += 8;
297  }
298 }

◆ M_PushMenu()

void M_PushMenu ( void(*)(void draw,
const char *(*)(int k)  key 
)

Definition at line 83 of file menu.c.

84 {
85  int i;
86 
87  if (Cvar_VariableValue ("maxclients") == 1
88  && Com_ServerState ())
89  Cvar_Set ("paused", "1");
90 
91  // if this menu is already present, drop back to that level
92  // to avoid stacking menus by hotkeys
93  for (i=0 ; i<m_menudepth ; i++)
94  if (m_layers[i].draw == draw &&
95  m_layers[i].key == key)
96  {
97  m_menudepth = i;
98  }
99 
100  if (i == m_menudepth)
101  {
103  Com_Error (ERR_FATAL, "M_PushMenu: MAX_MENU_DEPTH");
106  m_menudepth++;
107  }
108 
109  m_drawfunc = draw;
110  m_keyfunc = key;
111 
112  m_entersound = true;
113 
115 }

Referenced by M_Menu_AddressBook_f(), M_Menu_Credits_f(), M_Menu_DMOptions_f(), M_Menu_DownloadOptions_f(), M_Menu_Game_f(), M_Menu_JoinServer_f(), M_Menu_Keys_f(), M_Menu_LoadGame_f(), M_Menu_Main_f(), M_Menu_Multiplayer_f(), M_Menu_Options_f(), M_Menu_PlayerConfig_f(), M_Menu_Quit_f(), M_Menu_SaveGame_f(), M_Menu_StartServer_f(), and M_Menu_Video_f().

◆ M_Quit_Draw()

void M_Quit_Draw ( void  )

Definition at line 3994 of file menu.c.

3995 {
3996  int w, h;
3997 
3998  re.DrawGetPicSize (&w, &h, "quit");
3999  re.DrawPic ( (viddef.width-w)/2, (viddef.height-h)/2, "quit");
4000 }

Referenced by M_Menu_Quit_f().

◆ M_Quit_Key()

const char* M_Quit_Key ( int  key)

Definition at line 3969 of file menu.c.

3970 {
3971  switch (key)
3972  {
3973  case K_ESCAPE:
3974  case 'n':
3975  case 'N':
3976  M_PopMenu ();
3977  break;
3978 
3979  case 'Y':
3980  case 'y':
3982  CL_Quit_f ();
3983  break;
3984 
3985  default:
3986  break;
3987  }
3988 
3989  return NULL;
3990 
3991 }

Referenced by M_Menu_Quit_f().

◆ M_UnbindCommand()

static void M_UnbindCommand ( char *  command)
static

Definition at line 647 of file menu.c.

648 {
649  int j;
650  int l;
651  char *b;
652 
653  l = strlen(command);
654 
655  for (j=0 ; j<256 ; j++)
656  {
657  b = keybindings[j];
658  if (!b)
659  continue;
660  if (!strncmp (b, command, l) )
661  Key_SetBinding (j, "");
662  }
663 }

Referenced by KeyBindingFunc(), and Keys_MenuKey().

◆ MediumGameFunc()

static void MediumGameFunc ( void data)
static

Definition at line 1972 of file menu.c.

1973 {
1974  Cvar_ForceSet( "skill", "1" );
1975  StartGame();
1976 }

Referenced by Game_MenuInit().

◆ ModelCallback()

static void ModelCallback ( void unused)
static

Definition at line 3461 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ MouseSpeedFunc()

static void MouseSpeedFunc ( void unused)
static

Definition at line 1076 of file menu.c.

1077 {
1078  Cvar_SetValue( "sensitivity", s_options_sensitivity_slider.curvalue / 2.0F );
1079 }

Referenced by Options_MenuInit().

◆ Multiplayer_MenuDraw()

static void Multiplayer_MenuDraw ( void  )
static

Definition at line 511 of file menu.c.

512 {
513  M_Banner( "m_banner_multiplayer" );
514 
517 }

Referenced by M_Menu_Multiplayer_f().

◆ Multiplayer_MenuInit()

void Multiplayer_MenuInit ( void  )

Definition at line 534 of file menu.c.

535 {
536  s_multiplayer_menu.x = viddef.width * 0.50 - 64;
538 
543  s_join_network_server_action.generic.name = " join network server";
545 
550  s_start_network_server_action.generic.name = " start network server";
552 
557  s_player_setup_action.generic.name = " player setup";
559 
563 
565 
567 }

Referenced by M_Menu_Multiplayer_f().

◆ Multiplayer_MenuKey()

const char* Multiplayer_MenuKey ( int  key)

Definition at line 569 of file menu.c.

570 {
571  return Default_MenuKey( &s_multiplayer_menu, key );
572 }

Referenced by M_Menu_Multiplayer_f().

◆ NullCursorDraw()

void NullCursorDraw ( void self)

Definition at line 2331 of file menu.c.

2332 {
2333 }

◆ Options_MenuDraw()

void Options_MenuDraw ( void  )

Definition at line 1422 of file menu.c.

1423 {
1424  M_Banner( "m_banner_options" );
1427 }

Referenced by M_Menu_Options_f().

◆ Options_MenuInit()

void Options_MenuInit ( void  )

Definition at line 1228 of file menu.c.

1229 {
1230  static const char *cd_music_items[] =
1231  {
1232  "disabled",
1233  "enabled",
1234  0
1235  };
1236 
1237  static const char *cd_shuffle[] =
1238  {
1239  "disabled",
1240  "enabled",
1241  0
1242  };
1243 
1244  static const char *quality_items[] =
1245  {
1246  "low", "high", 0
1247  };
1248 
1249  static const char *compatibility_items[] =
1250  {
1251  "max compatibility", "max performance", 0
1252  };
1253 
1254  static const char *yesno_names[] =
1255  {
1256  "no",
1257  "yes",
1258  0
1259  };
1260 
1261  static const char *crosshair_names[] =
1262  {
1263  "none",
1264  "cross",
1265  "dot",
1266  "angle",
1267  0
1268  };
1269 
1270  win_noalttab = Cvar_Get( "win_noalttab", "0", CVAR_ARCHIVE );
1271 
1272  /*
1273  ** configure controls menu and menu items
1274  */
1275  s_options_menu.x = viddef.width / 2;
1276  s_options_menu.y = viddef.height / 2 - 58;
1277  s_options_menu.nitems = 0;
1278 
1282  s_options_sfxvolume_slider.generic.name = "effects volume";
1287 
1291  s_options_cdvolume_box.generic.name = "CD music";
1293  s_options_cdvolume_box.itemnames = cd_music_items;
1295 
1299  s_options_cdshuffle_box.generic.name = "CD shuffle";
1301  s_options_cdshuffle_box.itemnames = cd_shuffle;
1303 
1307  s_options_quality_list.generic.name = "sound quality";
1309  s_options_quality_list.itemnames = quality_items;
1310  s_options_quality_list.curvalue = !Cvar_VariableValue( "s_loadas8bit" );
1311 
1315  s_options_compatibility_list.generic.name = "sound compatibility";
1317  s_options_compatibility_list.itemnames = compatibility_items;
1319 
1323  s_options_sensitivity_slider.generic.name = "mouse speed";
1327 
1331  s_options_alwaysrun_box.generic.name = "always run";
1333  s_options_alwaysrun_box.itemnames = yesno_names;
1334 
1338  s_options_invertmouse_box.generic.name = "invert mouse";
1340  s_options_invertmouse_box.itemnames = yesno_names;
1341 
1345  s_options_lookspring_box.generic.name = "lookspring";
1347  s_options_lookspring_box.itemnames = yesno_names;
1348 
1352  s_options_lookstrafe_box.generic.name = "lookstrafe";
1354  s_options_lookstrafe_box.itemnames = yesno_names;
1355 
1359  s_options_freelook_box.generic.name = "free look";
1361  s_options_freelook_box.itemnames = yesno_names;
1362 
1366  s_options_crosshair_box.generic.name = "crosshair";
1368  s_options_crosshair_box.itemnames = crosshair_names;
1369 #if 0
1373  s_options_noalttab_box.generic.name = "disable alt-tab";
1374  s_options_noalttab_box.generic.callback = NoAltTabFunc;
1375  s_options_noalttab_box.itemnames = yesno_names;
1376 #endif
1380  s_options_joystick_box.generic.name = "use joystick";
1382  s_options_joystick_box.itemnames = yesno_names;
1383 
1387  s_options_customize_options_action.generic.name = "customize controls";
1389 
1393  s_options_defaults_action.generic.name = "reset defaults";
1395 
1399  s_options_console_action.generic.name = "go to console";
1401 
1403 
1420 }

Referenced by M_Menu_Options_f().

◆ Options_MenuKey()

const char* Options_MenuKey ( int  key)

Definition at line 1429 of file menu.c.

1430 {
1431  return Default_MenuKey( &s_options_menu, key );
1432 }

Referenced by M_Menu_Options_f().

◆ PlayerConfig_MenuDraw()

void PlayerConfig_MenuDraw ( void  )

Definition at line 3838 of file menu.c.

3839 {
3840  extern float CalcFov( float fov_x, float w, float h );
3841  refdef_t refdef;
3842  char scratch[MAX_QPATH];
3843 
3844  memset( &refdef, 0, sizeof( refdef ) );
3845 
3846  refdef.x = viddef.width / 2;
3847  refdef.y = viddef.height / 2 - 72;
3848  refdef.width = 144;
3849  refdef.height = 168;
3850  refdef.fov_x = 40;
3851  refdef.fov_y = CalcFov( refdef.fov_x, refdef.width, refdef.height );
3852  refdef.time = cls.realtime*0.001;
3853 
3855  {
3856  static int yaw;
3857  entity_t entity;
3858 
3859  memset( &entity, 0, sizeof( entity ) );
3860 
3861  Com_sprintf( scratch, sizeof( scratch ), "players/%s/tris.md2", s_pmi[s_player_model_box.curvalue].directory );
3862  entity.model = re.RegisterModel( scratch );
3864  entity.skin = re.RegisterSkin( scratch );
3865  entity.flags = RF_FULLBRIGHT;
3866  entity.origin[0] = 80;
3867  entity.origin[1] = 0;
3868  entity.origin[2] = 0;
3869  VectorCopy( entity.origin, entity.oldorigin );
3870  entity.frame = 0;
3871  entity.oldframe = 0;
3872  entity.backlerp = 0.0;
3873  entity.angles[1] = yaw++;
3874  if ( ++yaw > 360 )
3875  yaw -= 360;
3876 
3877  refdef.areabits = 0;
3878  refdef.num_entities = 1;
3879  refdef.entities = &entity;
3880  refdef.lightstyles = 0;
3881  refdef.rdflags = RDF_NOWORLDMODEL;
3882 
3884 
3885  M_DrawTextBox( ( refdef.x ) * ( 320.0F / viddef.width ) - 8, ( viddef.height / 2 ) * ( 240.0F / viddef.height) - 77, refdef.width / 8, refdef.height / 8 );
3886  refdef.height += 4;
3887 
3888  re.RenderFrame( &refdef );
3889 
3890  Com_sprintf( scratch, sizeof( scratch ), "/players/%s/%s_i.pcx",
3893  re.DrawPic( s_player_config_menu.x - 40, refdef.y, scratch );
3894  }
3895 }

Referenced by M_Menu_PlayerConfig_f().

◆ PlayerConfig_MenuInit()

qboolean PlayerConfig_MenuInit ( void  )

Definition at line 3676 of file menu.c.

3677 {
3678  extern cvar_t *name;
3679  extern cvar_t *skin;
3680  char currentdirectory[1024];
3681  char currentskin[1024];
3682  int i = 0;
3683 
3684  int currentdirectoryindex = 0;
3685  int currentskinindex = 0;
3686 
3687  cvar_t *hand = Cvar_Get( "hand", "0", CVAR_USERINFO | CVAR_ARCHIVE );
3688 
3689  static const char *handedness[] = { "right", "left", "center", 0 };
3690 
3692 
3693  if (s_numplayermodels == 0)
3694  return false;
3695 
3696  if ( hand->value < 0 || hand->value > 2 )
3697  Cvar_SetValue( "hand", 0 );
3698 
3699  strcpy( currentdirectory, skin->string );
3700 
3701  if ( strchr( currentdirectory, '/' ) )
3702  {
3703  strcpy( currentskin, strchr( currentdirectory, '/' ) + 1 );
3704  *strchr( currentdirectory, '/' ) = 0;
3705  }
3706  else if ( strchr( currentdirectory, '\\' ) )
3707  {
3708  strcpy( currentskin, strchr( currentdirectory, '\\' ) + 1 );
3709  *strchr( currentdirectory, '\\' ) = 0;
3710  }
3711  else
3712  {
3713  strcpy( currentdirectory, "male" );
3714  strcpy( currentskin, "grunt" );
3715  }
3716 
3717  qsort( s_pmi, s_numplayermodels, sizeof( s_pmi[0] ), pmicmpfnc );
3718 
3719  memset( s_pmnames, 0, sizeof( s_pmnames ) );
3720  for ( i = 0; i < s_numplayermodels; i++ )
3721  {
3723  if ( Q_stricmp( s_pmi[i].directory, currentdirectory ) == 0 )
3724  {
3725  int j;
3726 
3727  currentdirectoryindex = i;
3728 
3729  for ( j = 0; j < s_pmi[i].nskins; j++ )
3730  {
3731  if ( Q_stricmp( s_pmi[i].skindisplaynames[j], currentskin ) == 0 )
3732  {
3733  currentskinindex = j;
3734  break;
3735  }
3736  }
3737  }
3738  }
3739 
3740  s_player_config_menu.x = viddef.width / 2 - 95;
3741  s_player_config_menu.y = viddef.height / 2 - 97;
3743 
3745  s_player_name_field.generic.name = "name";
3751  strcpy( s_player_name_field.buffer, name->string );
3752  s_player_name_field.cursor = strlen( name->string );
3753 
3755  s_player_model_title.generic.name = "model";
3758 
3764  s_player_model_box.curvalue = currentdirectoryindex;
3765  s_player_model_box.itemnames = (const char **)s_pmnames;
3766 
3768  s_player_skin_title.generic.name = "skin";
3771 
3773  s_player_skin_box.generic.x = -56;
3778  s_player_skin_box.curvalue = currentskinindex;
3779  s_player_skin_box.itemnames = (const char **)s_pmi[currentdirectoryindex].skindisplaynames;
3780 
3782  s_player_hand_title.generic.name = "handedness";
3785 
3793  s_player_handedness_box.itemnames = handedness;
3794 
3795  for (i = 0; i < sizeof(rate_tbl) / sizeof(*rate_tbl) - 1; i++)
3796  if (Cvar_VariableValue("rate") == rate_tbl[i])
3797  break;
3798 
3800  s_player_rate_title.generic.name = "connect speed";
3803 
3805  s_player_rate_box.generic.x = -56;
3806  s_player_rate_box.generic.y = 166;
3812 
3814  s_player_download_action.generic.name = "download options";
3820 
3825  {
3828  }
3834 
3835  return true;
3836 }

Referenced by M_Menu_PlayerConfig_f().

◆ PlayerConfig_MenuKey()

const char* PlayerConfig_MenuKey ( int  key)

Definition at line 3897 of file menu.c.

3898 {
3899  int i;
3900 
3901  if ( key == K_ESCAPE )
3902  {
3903  char scratch[1024];
3904 
3905  Cvar_Set( "name", s_player_name_field.buffer );
3906 
3907  Com_sprintf( scratch, sizeof( scratch ), "%s/%s",
3910 
3911  Cvar_Set( "skin", scratch );
3912 
3913  for ( i = 0; i < s_numplayermodels; i++ )
3914  {
3915  int j;
3916 
3917  for ( j = 0; j < s_pmi[i].nskins; j++ )
3918  {
3919  if ( s_pmi[i].skindisplaynames[j] )
3920  free( s_pmi[i].skindisplaynames[j] );
3921  s_pmi[i].skindisplaynames[j] = 0;
3922  }
3923  free( s_pmi[i].skindisplaynames );
3924  s_pmi[i].skindisplaynames = 0;
3925  s_pmi[i].nskins = 0;
3926  }
3927  }
3928  return Default_MenuKey( &s_player_config_menu, key );
3929 }

Referenced by M_Menu_PlayerConfig_f().

◆ PlayerConfig_ScanDirectories()

static qboolean PlayerConfig_ScanDirectories ( void  )
static

Definition at line 3500 of file menu.c.

3501 {
3502  char findname[1024];
3503  char scratch[1024];
3504  int ndirs = 0, npms = 0;
3505  char **dirnames;
3506  char *path = NULL;
3507  int i;
3508 
3509  extern char **FS_ListFiles( char *, int *, unsigned, unsigned );
3510 
3511  s_numplayermodels = 0;
3512 
3513  /*
3514  ** get a list of directories
3515  */
3516  do
3517  {
3518  path = FS_NextPath( path );
3519 
3520  /*
3521  * PATCH: eliasm
3522  *
3523  * If FS_NextPath returns NULL we get a SEGV on the next line.
3524  * On other platforms this propably works (path becomes
3525  * the null string or something like that.
3526  */
3527  if( path == NULL ) {
3528  break;
3529  }
3530  /* END OF PATCH */
3531 
3532  Com_sprintf( findname, sizeof(findname), "%s/players/*.*", path );
3533 
3534  if ( ( dirnames = FS_ListFiles( findname, &ndirs, SFF_SUBDIR, 0 ) ) != 0 )
3535  break;
3536  } while ( path );
3537 
3538  if ( !dirnames )
3539  return false;
3540 
3541  /*
3542  ** go through the subdirectories
3543  */
3544  npms = ndirs;
3545  if ( npms > MAX_PLAYERMODELS )
3546  npms = MAX_PLAYERMODELS;
3547 
3548  for ( i = 0; i < npms; i++ )
3549  {
3550  int k, s;
3551  char *a, *b, *c;
3552  char **pcxnames;
3553  char **skinnames;
3554  int npcxfiles;
3555  int nskins = 0;
3556 
3557  if ( dirnames[i] == 0 )
3558  continue;
3559 
3560  // verify the existence of tris.md2
3561  strcpy( scratch, dirnames[i] );
3562  strcat( scratch, "/tris.md2" );
3563  if ( !Sys_FindFirst( scratch, 0, SFF_SUBDIR | SFF_HIDDEN | SFF_SYSTEM ) )
3564  {
3565  free( dirnames[i] );
3566  dirnames[i] = 0;
3567  Sys_FindClose();
3568  continue;
3569  }
3570  Sys_FindClose();
3571 
3572  // verify the existence of at least one pcx skin
3573  strcpy( scratch, dirnames[i] );
3574  strcat( scratch, "/*.pcx" );
3575  pcxnames = FS_ListFiles( scratch, &npcxfiles, 0, SFF_SUBDIR | SFF_HIDDEN | SFF_SYSTEM );
3576 
3577  if ( !pcxnames )
3578  {
3579  free( dirnames[i] );
3580  dirnames[i] = 0;
3581  continue;
3582  }
3583 
3584  // count valid skins, which consist of a skin with a matching "_i" icon
3585  for ( k = 0; k < npcxfiles-1; k++ )
3586  {
3587  if ( !strstr( pcxnames[k], "_i.pcx" ) )
3588  {
3589  if ( IconOfSkinExists( pcxnames[k], pcxnames, npcxfiles - 1 ) )
3590  {
3591  nskins++;
3592  }
3593  }
3594  }
3595  if ( !nskins )
3596  continue;
3597 
3598  skinnames = malloc( sizeof( char * ) * ( nskins + 1 ) );
3599  memset( skinnames, 0, sizeof( char * ) * ( nskins + 1 ) );
3600 
3601  // copy the valid skins
3602  for ( s = 0, k = 0; k < npcxfiles-1; k++ )
3603  {
3604  char *a, *b, *c;
3605 
3606  if ( !strstr( pcxnames[k], "_i.pcx" ) )
3607  {
3608  if ( IconOfSkinExists( pcxnames[k], pcxnames, npcxfiles - 1 ) )
3609  {
3610  a = strrchr( pcxnames[k], '/' );
3611  b = strrchr( pcxnames[k], '\\' );
3612 
3613  if ( a > b )
3614  c = a;
3615  else
3616  c = b;
3617 
3618  strcpy( scratch, c + 1 );
3619 
3620  if ( strrchr( scratch, '.' ) )
3621  *strrchr( scratch, '.' ) = 0;
3622 
3623  skinnames[s] = strdup( scratch );
3624  s++;
3625  }
3626  }
3627  }
3628 
3629  // at this point we have a valid player model
3630  s_pmi[s_numplayermodels].nskins = nskins;
3632 
3633  // make short name for the model
3634  a = strrchr( dirnames[i], '/' );
3635  b = strrchr( dirnames[i], '\\' );
3636 
3637  if ( a > b )
3638  c = a;
3639  else
3640  c = b;
3641 
3642  strncpy( s_pmi[s_numplayermodels].displayname, c + 1, MAX_DISPLAYNAME-1 );
3643  strcpy( s_pmi[s_numplayermodels].directory, c + 1 );
3644 
3645  FreeFileList( pcxnames, npcxfiles );
3646 
3648  }
3649  if ( dirnames )
3650  FreeFileList( dirnames, ndirs );
3651  return true;
3652 }

Referenced by PlayerConfig_MenuInit().

◆ PlayerSetupFunc()

static void PlayerSetupFunc ( void unused)
static

Definition at line 519 of file menu.c.

520 {
522 }

Referenced by Multiplayer_MenuInit().

◆ pmicmpfnc()

static int pmicmpfnc ( const void _a,
const void _b 
)
static

Definition at line 3654 of file menu.c.

3655 {
3656  const playermodelinfo_s *a = ( const playermodelinfo_s * ) _a;
3657  const playermodelinfo_s *b = ( const playermodelinfo_s * ) _b;
3658 
3659  /*
3660  ** sort by male, female, then alphabetical
3661  */
3662  if ( strcmp( a->directory, "male" ) == 0 )
3663  return -1;
3664  else if ( strcmp( b->directory, "male" ) == 0 )
3665  return 1;
3666 
3667  if ( strcmp( a->directory, "female" ) == 0 )
3668  return -1;
3669  else if ( strcmp( b->directory, "female" ) == 0 )
3670  return 1;
3671 
3672  return strcmp( a->directory, b->directory );
3673 }

Referenced by PlayerConfig_MenuInit().

◆ RateCallback()

static void RateCallback ( void unused)
static

Definition at line 3455 of file menu.c.

3456 {
3457  if (s_player_rate_box.curvalue != sizeof(rate_tbl) / sizeof(*rate_tbl) - 1)
3459 }

Referenced by PlayerConfig_MenuInit().

◆ RulesChangeFunc()

void RulesChangeFunc ( void self)

Definition at line 2457 of file menu.c.

2458 {
2459  // DM
2460  if (s_rules_box.curvalue == 0)
2461  {
2464  }
2465  else if(s_rules_box.curvalue == 1) // coop // PGM
2466  {
2467  s_maxclients_field.generic.statusbar = "4 maximum for cooperative";
2468  if (atoi(s_maxclients_field.buffer) > 4)
2469  strcpy( s_maxclients_field.buffer, "4" );
2470  s_startserver_dmoptions_action.generic.statusbar = "N/A for cooperative";
2471  }
2472 //=====
2473 //PGM
2474  // ROGUE GAMES
2475  else if(Developer_searchpath(2) == 2)
2476  {
2477  if (s_rules_box.curvalue == 2) // tag
2478  {
2481  }
2482 /*
2483  else if(s_rules_box.curvalue == 3) // deathball
2484  {
2485  s_maxclients_field.generic.statusbar = NULL;
2486  s_startserver_dmoptions_action.generic.statusbar = NULL;
2487  }
2488 */
2489  }
2490 //PGM
2491 //=====
2492 }

Referenced by StartServer_MenuInit().

◆ SaveGame_MenuDraw()

void SaveGame_MenuDraw ( void  )

Definition at line 2201 of file menu.c.

2202 {
2203  M_Banner( "m_banner_save_game" );
2206 }

Referenced by M_Menu_SaveGame_f().

◆ SaveGame_MenuInit()

void SaveGame_MenuInit ( void  )

Definition at line 2208 of file menu.c.

2209 {
2210  int i;
2211 
2212  s_savegame_menu.x = viddef.width / 2 - 120;
2213  s_savegame_menu.y = viddef.height / 2 - 58;
2214  s_savegame_menu.nitems = 0;
2215 
2217 
2218  // don't include the autosave slot
2219  for ( i = 0; i < MAX_SAVEGAMES-1; i++ )
2220  {
2225 
2227  s_savegame_actions[i].generic.y = ( i ) * 10;
2228 
2230 
2232  }
2233 }

Referenced by M_Menu_SaveGame_f().

◆ SaveGame_MenuKey()

const char* SaveGame_MenuKey ( int  key)

Definition at line 2235 of file menu.c.

2236 {
2237  if ( key == K_ENTER || key == K_ESCAPE )
2238  {
2240  if ( s_loadgame_menu.cursor < 0 )
2241  s_loadgame_menu.cursor = 0;
2242  }
2243  return Default_MenuKey( &s_savegame_menu, key );
2244 }

Referenced by M_Menu_SaveGame_f().

◆ SaveGameCallback()

void SaveGameCallback ( void self)

Definition at line 2193 of file menu.c.

2194 {
2195  menuaction_s *a = ( menuaction_s * ) self;
2196 
2197  Cbuf_AddText (va("save save%i\n", a->generic.localdata[0] ));
2198  M_ForceMenuOff ();
2199 }

Referenced by SaveGame_MenuInit().

◆ SaveGameFunc()

static void SaveGameFunc ( void unused)
static

Definition at line 1989 of file menu.c.

1990 {
1992 }

Referenced by Game_MenuInit().

◆ SearchLocalGames()

void SearchLocalGames ( void  )

Definition at line 2335 of file menu.c.

2336 {
2337  int i;
2338 
2339  m_num_servers = 0;
2340  for (i=0 ; i<MAX_LOCAL_SERVERS ; i++)
2342 
2343  M_DrawTextBox( 8, 120 - 48, 36, 3 );
2344  M_Print( 16 + 16, 120 - 48 + 8, "Searching for local servers, this" );
2345  M_Print( 16 + 16, 120 - 48 + 16, "could take up to a minute, so" );
2346  M_Print( 16 + 16, 120 - 48 + 24, "please be patient." );
2347 
2348  // the text box won't show up unless we do a buffer swap
2349  re.EndFrame();
2350 
2351  // send out info packets
2352  CL_PingServers_f();
2353 }

Referenced by JoinServer_MenuInit(), and SearchLocalGamesFunc().

◆ SearchLocalGamesFunc()

void SearchLocalGamesFunc ( void self)

Definition at line 2355 of file menu.c.

2356 {
2357  SearchLocalGames();
2358 }

Referenced by JoinServer_MenuInit().

◆ StartGame()

static void StartGame ( void  )
static

Definition at line 1952 of file menu.c.

1953 {
1954  // disable updates and start the cinematic going
1955  cl.servercount = -1;
1956  M_ForceMenuOff ();
1957  Cvar_SetValue( "deathmatch", 0 );
1958  Cvar_SetValue( "coop", 0 );
1959 
1960  Cvar_SetValue( "gamerules", 0 ); //PGM
1961 
1962  Cbuf_AddText ("loading ; killserver ; wait ; newgame\n");
1963  cls.key_dest = key_game;
1964 }

Referenced by EasyGameFunc(), HardGameFunc(), and MediumGameFunc().

◆ StartNetworkServerFunc()

static void StartNetworkServerFunc ( void unused)
static

Definition at line 529 of file menu.c.

530 {
532 }

Referenced by Multiplayer_MenuInit().

◆ StartServer_MenuDraw()

void StartServer_MenuDraw ( void  )

Definition at line 2770 of file menu.c.

2771 {
2773 }

Referenced by M_Menu_StartServer_f().

◆ StartServer_MenuInit()

void StartServer_MenuInit ( void  )

Definition at line 2565 of file menu.c.

2566 {
2567  static const char *dm_coop_names[] =
2568  {
2569  "deathmatch",
2570  "cooperative",
2571  0
2572  };
2573 //=======
2574 //PGM
2575  static const char *dm_coop_names_rogue[] =
2576  {
2577  "deathmatch",
2578  "cooperative",
2579  "tag",
2580 // "deathball",
2581  0
2582  };
2583 //PGM
2584 //=======
2585  char *buffer;
2586  char mapsname[1024];
2587  char *s;
2588  int length;
2589  int i;
2590  FILE *fp;
2591 
2592  /*
2593  ** load the list of map names
2594  */
2595  Com_sprintf( mapsname, sizeof( mapsname ), "%s/maps.lst", FS_Gamedir() );
2596  if ( ( fp = fopen( mapsname, "rb" ) ) == 0 )
2597  {
2598  if ( ( length = FS_LoadFile( "maps.lst", ( void ** ) &buffer ) ) == -1 )
2599  Com_Error( ERR_DROP, "couldn't find maps.lst\n" );
2600  }
2601  else
2602  {
2603 #ifdef _WIN32
2604  length = filelength( fileno( fp ) );
2605 #else
2606  fseek(fp, 0, SEEK_END);
2607  length = ftell(fp);
2608  fseek(fp, 0, SEEK_SET);
2609 #endif
2610  buffer = malloc( length );
2611  fread( buffer, length, 1, fp );
2612  }
2613 
2614  s = buffer;
2615 
2616  i = 0;
2617  while ( i < length )
2618  {
2619  if ( s[i] == '\r' )
2620  nummaps++;
2621  i++;
2622  }
2623 
2624  if ( nummaps == 0 )
2625  Com_Error( ERR_DROP, "no maps in maps.lst\n" );
2626 
2627  mapnames = malloc( sizeof( char * ) * ( nummaps + 1 ) );
2628  memset( mapnames, 0, sizeof( char * ) * ( nummaps + 1 ) );
2629 
2630  s = buffer;
2631 
2632  for ( i = 0; i < nummaps; i++ )
2633  {
2634  char shortname[MAX_TOKEN_CHARS];
2635  char longname[MAX_TOKEN_CHARS];
2636  char scratch[200];
2637  int j, l;
2638 
2639  strcpy( shortname, COM_Parse( &s ) );
2640  l = strlen(shortname);
2641  for (j=0 ; j<l ; j++)
2642  shortname[j] = toupper(shortname[j]);
2643  strcpy( longname, COM_Parse( &s ) );
2644  Com_sprintf( scratch, sizeof( scratch ), "%s\n%s", longname, shortname );
2645 
2646  mapnames[i] = malloc( strlen( scratch ) + 1 );
2647  strcpy( mapnames[i], scratch );
2648  }
2649  mapnames[nummaps] = 0;
2650 
2651  if ( fp != 0 )
2652  {
2653  fp = 0;
2654  free( buffer );
2655  }
2656  else
2657  {
2658  FS_FreeFile( buffer );
2659  }
2660 
2661  /*
2662  ** initialize the menu stuff
2663  */
2664  s_startserver_menu.x = viddef.width * 0.50;
2666 
2670  s_startmap_list.generic.name = "initial map";
2671  s_startmap_list.itemnames = (const char **)mapnames;
2672 
2674  s_rules_box.generic.x = 0;
2675  s_rules_box.generic.y = 20;
2676  s_rules_box.generic.name = "rules";
2677 
2678 //PGM - rogue games only available with rogue DLL.
2679  if(Developer_searchpath(2) == 2)
2680  s_rules_box.itemnames = dm_coop_names_rogue;
2681  else
2682  s_rules_box.itemnames = dm_coop_names;
2683 //PGM
2684 
2685  if (Cvar_VariableValue("coop"))
2686  s_rules_box.curvalue = 1;
2687  else
2688  s_rules_box.curvalue = 0;
2690 
2692  s_timelimit_field.generic.name = "time limit";
2696  s_timelimit_field.generic.statusbar = "0 = no limit";
2699  strcpy( s_timelimit_field.buffer, Cvar_VariableString("timelimit") );
2700 
2702  s_fraglimit_field.generic.name = "frag limit";
2706  s_fraglimit_field.generic.statusbar = "0 = no limit";
2709  strcpy( s_fraglimit_field.buffer, Cvar_VariableString("fraglimit") );
2710 
2711  /*
2712  ** maxclients determines the maximum number of players that can join
2713  ** the game. If maxclients is only "1" then we should default the menu
2714  ** option to 8 players, otherwise use whatever its current value is.
2715  ** Clamping will be done when the server is actually started.
2716  */
2718  s_maxclients_field.generic.name = "max players";
2725  if ( Cvar_VariableValue( "maxclients" ) == 1 )
2726  strcpy( s_maxclients_field.buffer, "8" );
2727  else
2728  strcpy( s_maxclients_field.buffer, Cvar_VariableString("maxclients") );
2729 
2731  s_hostname_field.generic.name = "hostname";
2734  s_hostname_field.generic.y = 90;
2736  s_hostname_field.length = 12;
2738  strcpy( s_hostname_field.buffer, Cvar_VariableString("hostname") );
2739 
2741  s_startserver_dmoptions_action.generic.name = " deathmatch flags";
2747 
2754 
2763 
2765 
2766  // call this now to set proper inital state
2767  RulesChangeFunc ( NULL );
2768 }

Referenced by M_Menu_StartServer_f().

◆ StartServer_MenuKey()

const char* StartServer_MenuKey ( int  key)

Definition at line 2775 of file menu.c.

2776 {
2777  if ( key == K_ESCAPE )
2778  {
2779  if ( mapnames )
2780  {
2781  int i;
2782 
2783  for ( i = 0; i < nummaps; i++ )
2784  free( mapnames[i] );
2785  free( mapnames );
2786  }
2787  mapnames = 0;
2788  nummaps = 0;
2789  }
2790 
2791  return Default_MenuKey( &s_startserver_menu, key );
2792 }

Referenced by M_Menu_StartServer_f().

◆ StartServerActionFunc()

void StartServerActionFunc ( void self)

Definition at line 2494 of file menu.c.

2495 {
2496  char startmap[1024];
2497  int timelimit;
2498  int fraglimit;
2499  int maxclients;
2500  char *spot;
2501 
2502  strcpy( startmap, strchr( mapnames[s_startmap_list.curvalue], '\n' ) + 1 );
2503 
2507 
2508  Cvar_SetValue( "maxclients", ClampCvar( 0, maxclients, maxclients ) );
2509  Cvar_SetValue ("timelimit", ClampCvar( 0, timelimit, timelimit ) );
2510  Cvar_SetValue ("fraglimit", ClampCvar( 0, fraglimit, fraglimit ) );
2511  Cvar_Set("hostname", s_hostname_field.buffer );
2512 // Cvar_SetValue ("deathmatch", !s_rules_box.curvalue );
2513 // Cvar_SetValue ("coop", s_rules_box.curvalue );
2514 
2515 //PGM
2516  if((s_rules_box.curvalue < 2) || (Developer_searchpath(2) != 2))
2517  {
2518  Cvar_SetValue ("deathmatch", !s_rules_box.curvalue );
2519  Cvar_SetValue ("coop", s_rules_box.curvalue );
2520  Cvar_SetValue ("gamerules", 0 );
2521  }
2522  else
2523  {
2524  Cvar_SetValue ("deathmatch", 1 ); // deathmatch is always true for rogue games, right?
2525  Cvar_SetValue ("coop", 0 ); // FIXME - this might need to depend on which game we're running
2526  Cvar_SetValue ("gamerules", s_rules_box.curvalue );
2527  }
2528 //PGM
2529 
2530  spot = NULL;
2531  if (s_rules_box.curvalue == 1) // PGM
2532  {
2533  if(Q_stricmp(startmap, "bunk1") == 0)
2534  spot = "start";
2535  else if(Q_stricmp(startmap, "mintro") == 0)
2536  spot = "start";
2537  else if(Q_stricmp(startmap, "fact1") == 0)
2538  spot = "start";
2539  else if(Q_stricmp(startmap, "power1") == 0)
2540  spot = "pstart";
2541  else if(Q_stricmp(startmap, "biggun") == 0)
2542  spot = "bstart";
2543  else if(Q_stricmp(startmap, "hangar1") == 0)
2544  spot = "unitstart";
2545  else if(Q_stricmp(startmap, "city1") == 0)
2546  spot = "unitstart";
2547  else if(Q_stricmp(startmap, "boss1") == 0)
2548  spot = "bosstart";
2549  }
2550 
2551  if (spot)
2552  {
2553  if (Com_ServerState())
2554  Cbuf_AddText ("disconnect\n");
2555  Cbuf_AddText (va("gamemap \"*%s$%s\"\n", startmap, spot));
2556  }
2557  else
2558  {
2559  Cbuf_AddText (va("map %s\n", startmap));
2560  }
2561 
2562  M_ForceMenuOff ();
2563 }

Referenced by StartServer_MenuInit().

◆ UpdateCDVolumeFunc()

static void UpdateCDVolumeFunc ( void unused)
static

Definition at line 1161 of file menu.c.

1162 {
1165  {
1166  CDAudio_Init();
1168  {
1170  }
1171  else
1172  {
1173  CDAudio_Play(atoi(cl.configstrings[CS_CDTRACK]), true);
1174  }
1175  }
1176  else
1177  {
1178  CDAudio_Stop();
1179  }
1180 }

Referenced by Options_MenuInit().

◆ UpdateSoundQualityFunc()

static void UpdateSoundQualityFunc ( void unused)
static

Definition at line 1202 of file menu.c.

1203 {
1205  {
1206  Cvar_SetValue( "s_khz", 22 );
1207  Cvar_SetValue( "s_loadas8bit", false );
1208  }
1209  else
1210  {
1211  Cvar_SetValue( "s_khz", 11 );
1212  Cvar_SetValue( "s_loadas8bit", true );
1213  }
1214 
1216 
1217  M_DrawTextBox( 8, 120 - 48, 36, 3 );
1218  M_Print( 16 + 16, 120 - 48 + 8, "Restarting the sound system. This" );
1219  M_Print( 16 + 16, 120 - 48 + 16, "could take up to a minute, so" );
1220  M_Print( 16 + 16, 120 - 48 + 24, "please be patient." );
1221 
1222  // the text box won't show up unless we do a buffer swap
1223  re.EndFrame();
1224 
1225  CL_Snd_Restart_f();
1226 }

Referenced by Options_MenuInit().

◆ UpdateVolumeFunc()

static void UpdateVolumeFunc ( void unused)
static

Definition at line 1151 of file menu.c.

1152 {
1154 }

Referenced by Options_MenuInit().

Variable Documentation

◆ bind_grab

int bind_grab
static

Definition at line 619 of file menu.c.

Referenced by KeyBindingFunc(), KeyCursorDrawFunc(), and Keys_MenuKey().

◆ bindnames

char* bindnames[][2]
Initial value:
=
{
{"+attack", "attack"},
{"weapnext", "next weapon"},
{"weapprev", "previous weapon"},
{"+forward", "walk forward"},
{"+back", "backpedal"},
{"+left", "turn left"},
{"+right", "turn right"},
{"+speed", "run"},
{"+moveleft", "step left"},
{"+moveright", "step right"},
{"+strafe", "sidestep"},
{"+lookup", "look up"},
{"+lookdown", "look down"},
{"centerview", "center view"},
{"+mlook", "mouse look"},
{"+klook", "keyboard look"},
{"+moveup", "up / jump"},
{"+movedown", "down / crouch"},
{"inven", "inventory"},
{"invuse", "use item"},
{"invdrop", "drop item"},
{"invprev", "prev item"},
{"invnext", "next item"},
{"cmd help", "help computer" },
{ 0, 0 }
}

Definition at line 587 of file menu.c.

Referenced by DrawKeyBindingFunc(), KeyBindingFunc(), Keys_MenuInit(), and Keys_MenuKey().

◆ credits

const char** credits
static

Definition at line 1462 of file menu.c.

Referenced by M_Credits_MenuDraw(), and M_Menu_Credits_f().

◆ credits_start_time

int credits_start_time
static

Definition at line 1461 of file menu.c.

Referenced by M_Credits_MenuDraw(), and M_Menu_Credits_f().

◆ creditsBuffer

char* creditsBuffer
static

Definition at line 1464 of file menu.c.

Referenced by M_Credits_Key(), and M_Menu_Credits_f().

◆ creditsIndex

char* creditsIndex[256]
static

Definition at line 1463 of file menu.c.

Referenced by M_Menu_Credits_f().

◆ dmoptions_statusbar

char dmoptions_statusbar[128]
static

Definition at line 2807 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ idcredits

const char* idcredits[]
static

Definition at line 1465 of file menu.c.

Referenced by M_Menu_Credits_f().

◆ in_joystick

cvar_t* in_joystick

Definition at line 55 of file in_win.c.

Referenced by ControlsSetMenuItemValues(), IN_Init(), and IN_JoyMove().

◆ keys_cursor

int keys_cursor

Definition at line 618 of file menu.c.

◆ local_server_names

char local_server_names[MAX_LOCAL_SERVERS][80]
static

Definition at line 2276 of file menu.c.

Referenced by JoinServer_MenuInit(), JoinServerFunc(), M_AddToServerList(), and SearchLocalGames().

◆ local_server_netadr

netadr_t local_server_netadr[MAX_LOCAL_SERVERS]
static

Definition at line 2279 of file menu.c.

Referenced by JoinServerFunc(), and M_AddToServerList().

◆ m_drawfunc

void(* m_drawfunc) (void)

Definition at line 57 of file menu.c.

Referenced by M_Draw(), M_ForceMenuOff(), M_PopMenu(), and M_PushMenu().

◆ m_entersound

qboolean m_entersound

Definition at line 54 of file menu.c.

Referenced by M_Draw(), M_Main_Key(), and M_PushMenu().

◆ m_game_cursor

int m_game_cursor
static

Definition at line 1941 of file menu.c.

Referenced by M_Menu_Game_f().

◆ m_keyfunc

const char*(* m_keyfunc) (int key)

Definition at line 58 of file menu.c.

Referenced by M_ForceMenuOff(), M_Keydown(), M_PopMenu(), and M_PushMenu().

◆ m_layers

Definition at line 72 of file menu.c.

Referenced by M_PopMenu(), and M_PushMenu().

◆ m_main_cursor

int m_main_cursor
static

Definition at line 27 of file menu.c.

Referenced by M_Main_Draw(), and M_Main_Key().

◆ m_menudepth

int m_menudepth

Definition at line 73 of file menu.c.

Referenced by M_ForceMenuOff(), M_PopMenu(), and M_PushMenu().

◆ m_num_servers

int m_num_servers

Definition at line 2272 of file menu.c.

Referenced by JoinServerFunc(), M_AddToServerList(), and SearchLocalGames().

◆ m_savestrings

char m_savestrings[MAX_SAVEGAMES][32]

Definition at line 2094 of file menu.c.

Referenced by Create_Savestrings(), LoadGame_MenuInit(), and SaveGame_MenuInit().

◆ m_savevalid

qboolean m_savevalid[MAX_SAVEGAMES]

Definition at line 2095 of file menu.c.

Referenced by Create_Savestrings(), and LoadGameCallback().

◆ mapnames

char** mapnames
static

Definition at line 2438 of file menu.c.

Referenced by StartServer_MenuInit(), StartServer_MenuKey(), and StartServerActionFunc().

◆ menu_in_sound

char* menu_in_sound = "misc/menu1.wav"
static

Definition at line 31 of file menu.c.

Referenced by Keys_MenuKey(), and M_Draw().

◆ menu_move_sound

char* menu_move_sound = "misc/menu2.wav"
static

Definition at line 32 of file menu.c.

Referenced by Default_MenuKey(), and M_Main_Key().

◆ menu_out_sound

char* menu_out_sound = "misc/menu3.wav"
static

Definition at line 33 of file menu.c.

Referenced by Default_MenuKey(), Keys_MenuKey(), M_Credits_Key(), and M_PopMenu().

◆ nummaps

int nummaps
static

Definition at line 2439 of file menu.c.

Referenced by R_BuildLightMap(), StartServer_MenuInit(), and StartServer_MenuKey().

◆ rate_names

const char* rate_names[]
static
Initial value:
= { "28.8 Modem", "33.6 Modem", "Single ISDN",
"Dual ISDN/Cable", "T1/LAN", "User defined", 0 }

Definition at line 3442 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ rate_tbl

int rate_tbl[] = { 2500, 3200, 5000, 10000, 25000, 0 }
static

Definition at line 3441 of file menu.c.

Referenced by PlayerConfig_MenuInit(), and RateCallback().

◆ roguecredits

const char* roguecredits[]
static

Definition at line 1697 of file menu.c.

Referenced by M_Menu_Credits_f().

◆ s_addressbook_fields

menufield_s s_addressbook_fields[NUM_ADDRESSBOOK_ENTRIES]
static

Definition at line 3344 of file menu.c.

Referenced by AddressBook_MenuInit(), and AddressBook_MenuKey().

◆ s_addressbook_menu

menuframework_s s_addressbook_menu
static

Definition at line 3343 of file menu.c.

Referenced by AddressBook_MenuDraw(), AddressBook_MenuInit(), and AddressBook_MenuKey().

◆ s_allow_download_box

menulist_s s_allow_download_box
static

Definition at line 3213 of file menu.c.

Referenced by DownloadCallback(), and DownloadOptions_MenuInit().

◆ s_allow_download_maps_box

menulist_s s_allow_download_maps_box
static

Definition at line 3214 of file menu.c.

Referenced by DownloadCallback(), and DownloadOptions_MenuInit().

◆ s_allow_download_models_box

menulist_s s_allow_download_models_box
static

Definition at line 3215 of file menu.c.

Referenced by DownloadCallback(), and DownloadOptions_MenuInit().

◆ s_allow_download_players_box

menulist_s s_allow_download_players_box
static

Definition at line 3216 of file menu.c.

Referenced by DownloadCallback(), and DownloadOptions_MenuInit().

◆ s_allow_download_sounds_box

menulist_s s_allow_download_sounds_box
static

Definition at line 3217 of file menu.c.

Referenced by DownloadCallback(), and DownloadOptions_MenuInit().

◆ s_allow_exit_box

menulist_s s_allow_exit_box
static

Definition at line 2822 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_armor_box

menulist_s s_armor_box
static

Definition at line 2821 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_blankline

menuseparator_s s_blankline
static

Definition at line 1950 of file menu.c.

Referenced by Game_MenuInit().

◆ s_credits_action

menuaction_s s_credits_action
static

Definition at line 1949 of file menu.c.

Referenced by Game_MenuInit().

◆ s_dmoptions_menu

menuframework_s s_dmoptions_menu
static

Definition at line 2809 of file menu.c.

Referenced by DMOptions_MenuDraw(), DMOptions_MenuInit(), and DMOptions_MenuKey().

◆ s_download_title

menuseparator_s s_download_title
static

Definition at line 3212 of file menu.c.

Referenced by DownloadOptions_MenuInit().

◆ s_downloadoptions_menu

menuframework_s s_downloadoptions_menu
static

◆ s_easy_game_action

menuaction_s s_easy_game_action
static

Definition at line 1944 of file menu.c.

Referenced by Game_MenuInit().

◆ s_falls_box

menulist_s s_falls_box
static

Definition at line 2812 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_fixed_fov_box

menulist_s s_fixed_fov_box
static

Definition at line 2824 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_force_respawn_box

menulist_s s_force_respawn_box
static

Definition at line 2820 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_fraglimit_field

menufield_s s_fraglimit_field
static

Definition at line 2444 of file menu.c.

Referenced by StartServer_MenuInit(), and StartServerActionFunc().

◆ s_friendlyfire_box

menulist_s s_friendlyfire_box
static

Definition at line 2811 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_game_menu

menuframework_s s_game_menu
static

Definition at line 1943 of file menu.c.

Referenced by Game_MenuDraw(), Game_MenuInit(), and Game_MenuKey().

◆ s_hard_game_action

menuaction_s s_hard_game_action
static

Definition at line 1946 of file menu.c.

Referenced by Game_MenuInit().

◆ s_health_box

menulist_s s_health_box
static

Definition at line 2816 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_hostname_field

menufield_s s_hostname_field
static

Definition at line 2446 of file menu.c.

Referenced by StartServer_MenuInit(), and StartServerActionFunc().

◆ s_infinite_ammo_box

menulist_s s_infinite_ammo_box
static

Definition at line 2823 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_instant_powerups_box

menulist_s s_instant_powerups_box
static

Definition at line 2814 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_join_network_server_action

menuaction_s s_join_network_server_action
static

Definition at line 507 of file menu.c.

Referenced by Multiplayer_MenuInit().

◆ s_joinserver_address_book_action

menuaction_s s_joinserver_address_book_action
static

Definition at line 2269 of file menu.c.

Referenced by JoinServer_MenuInit().

◆ s_joinserver_menu

menuframework_s s_joinserver_menu
static

Definition at line 2266 of file menu.c.

Referenced by JoinServer_MenuDraw(), JoinServer_MenuInit(), and JoinServer_MenuKey().

◆ s_joinserver_search_action

menuaction_s s_joinserver_search_action
static

Definition at line 2268 of file menu.c.

Referenced by JoinServer_MenuInit().

◆ s_joinserver_server_actions

menuaction_s s_joinserver_server_actions[MAX_LOCAL_SERVERS]
static

Definition at line 2270 of file menu.c.

Referenced by JoinServer_MenuInit(), and JoinServerFunc().

◆ s_joinserver_server_title

menuseparator_s s_joinserver_server_title
static

Definition at line 2267 of file menu.c.

Referenced by JoinServer_MenuInit().

◆ s_keys_attack_action

menuaction_s s_keys_attack_action
static

Definition at line 622 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_backpedal_action

menuaction_s s_keys_backpedal_action
static

Definition at line 625 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_center_view_action

menuaction_s s_keys_center_view_action
static

Definition at line 634 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_change_weapon_action

menuaction_s s_keys_change_weapon_action
static

Definition at line 623 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_help_computer_action

menuaction_s s_keys_help_computer_action
static

Definition at line 645 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_inv_drop_action

menuaction_s s_keys_inv_drop_action
static

Definition at line 641 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_inv_next_action

menuaction_s s_keys_inv_next_action
static

Definition at line 643 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_inv_prev_action

menuaction_s s_keys_inv_prev_action
static

Definition at line 642 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_inv_use_action

menuaction_s s_keys_inv_use_action
static

Definition at line 640 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_inventory_action

menuaction_s s_keys_inventory_action
static

Definition at line 639 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_keyboard_look_action

menuaction_s s_keys_keyboard_look_action
static

Definition at line 636 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_look_down_action

menuaction_s s_keys_look_down_action
static

Definition at line 633 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_look_up_action

menuaction_s s_keys_look_up_action
static

Definition at line 632 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_menu

menuframework_s s_keys_menu
static

Definition at line 621 of file menu.c.

Referenced by KeyBindingFunc(), Keys_MenuDraw(), Keys_MenuInit(), and Keys_MenuKey().

◆ s_keys_mouse_look_action

menuaction_s s_keys_mouse_look_action
static

Definition at line 635 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_move_down_action

menuaction_s s_keys_move_down_action
static

Definition at line 638 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_move_up_action

menuaction_s s_keys_move_up_action
static

Definition at line 637 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_run_action

menuaction_s s_keys_run_action
static

Definition at line 628 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_sidestep_action

menuaction_s s_keys_sidestep_action
static

Definition at line 631 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_step_left_action

menuaction_s s_keys_step_left_action
static

Definition at line 629 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_step_right_action

menuaction_s s_keys_step_right_action
static

Definition at line 630 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_turn_left_action

menuaction_s s_keys_turn_left_action
static

Definition at line 626 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_turn_right_action

menuaction_s s_keys_turn_right_action
static

Definition at line 627 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_keys_walk_forward_action

menuaction_s s_keys_walk_forward_action
static

Definition at line 624 of file menu.c.

Referenced by Keys_MenuInit().

◆ s_load_game_action

menuaction_s s_load_game_action
static

Definition at line 1947 of file menu.c.

Referenced by Game_MenuInit().

◆ s_loadgame_actions

menuaction_s s_loadgame_actions[MAX_SAVEGAMES]
static

Definition at line 2092 of file menu.c.

Referenced by LoadGame_MenuInit().

◆ s_loadgame_menu

menuframework_s s_loadgame_menu
static

Definition at line 2091 of file menu.c.

Referenced by LoadGame_MenuDraw(), LoadGame_MenuInit(), LoadGame_MenuKey(), and SaveGame_MenuKey().

◆ s_maxclients_field

menufield_s s_maxclients_field
static

Definition at line 2445 of file menu.c.

Referenced by RulesChangeFunc(), StartServer_MenuInit(), and StartServerActionFunc().

◆ s_medium_game_action

menuaction_s s_medium_game_action
static

Definition at line 1945 of file menu.c.

Referenced by Game_MenuInit().

◆ s_multiplayer_menu

menuframework_s s_multiplayer_menu
static

◆ s_no_mines_box

menulist_s s_no_mines_box
static

Definition at line 2828 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_no_nukes_box

menulist_s s_no_nukes_box
static

Definition at line 2829 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_no_spheres_box

menulist_s s_no_spheres_box
static

Definition at line 2831 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_numplayermodels

int s_numplayermodels
static

◆ s_options_alwaysrun_box

menulist_s s_options_alwaysrun_box
static

Definition at line 1038 of file menu.c.

Referenced by AlwaysRunFunc(), ControlsSetMenuItemValues(), and Options_MenuInit().

◆ s_options_cdshuffle_box

menulist_s s_options_cdshuffle_box
static

◆ s_options_cdvolume_box

menulist_s s_options_cdvolume_box
static

Definition at line 1045 of file menu.c.

Referenced by ControlsSetMenuItemValues(), Options_MenuInit(), and UpdateCDVolumeFunc().

◆ s_options_compatibility_list

menulist_s s_options_compatibility_list
static

Definition at line 1048 of file menu.c.

Referenced by Options_MenuInit(), and UpdateSoundQualityFunc().

◆ s_options_console_action

menulist_s s_options_console_action
static

Definition at line 1049 of file menu.c.

Referenced by Options_MenuInit().

◆ s_options_crosshair_box

menulist_s s_options_crosshair_box
static

Definition at line 1042 of file menu.c.

Referenced by ControlsSetMenuItemValues(), CrosshairFunc(), and Options_MenuInit().

◆ s_options_customize_options_action

menuaction_s s_options_customize_options_action
static

Definition at line 1034 of file menu.c.

Referenced by Options_MenuInit().

◆ s_options_defaults_action

menuaction_s s_options_defaults_action
static

Definition at line 1033 of file menu.c.

Referenced by Options_MenuInit().

◆ s_options_freelook_box

menulist_s s_options_freelook_box
static

Definition at line 1036 of file menu.c.

Referenced by ControlsSetMenuItemValues(), FreeLookFunc(), and Options_MenuInit().

◆ s_options_invertmouse_box

menulist_s s_options_invertmouse_box
static

Definition at line 1039 of file menu.c.

Referenced by ControlsSetMenuItemValues(), and Options_MenuInit().

◆ s_options_joystick_box

menulist_s s_options_joystick_box
static

Definition at line 1044 of file menu.c.

Referenced by ControlsSetMenuItemValues(), JoystickFunc(), and Options_MenuInit().

◆ s_options_lookspring_box

menulist_s s_options_lookspring_box
static

Definition at line 1040 of file menu.c.

Referenced by ControlsSetMenuItemValues(), and Options_MenuInit().

◆ s_options_lookstrafe_box

menulist_s s_options_lookstrafe_box
static

Definition at line 1041 of file menu.c.

Referenced by ControlsSetMenuItemValues(), and Options_MenuInit().

◆ s_options_menu

menuframework_s s_options_menu
static

Definition at line 1032 of file menu.c.

Referenced by Options_MenuDraw(), Options_MenuInit(), and Options_MenuKey().

◆ s_options_noalttab_box

menulist_s s_options_noalttab_box
static

Definition at line 1037 of file menu.c.

Referenced by ControlsSetMenuItemValues(), and Options_MenuInit().

◆ s_options_quality_list

menulist_s s_options_quality_list
static

Definition at line 1047 of file menu.c.

Referenced by ControlsSetMenuItemValues(), Options_MenuInit(), and UpdateSoundQualityFunc().

◆ s_options_sensitivity_slider

menuslider_s s_options_sensitivity_slider
static

Definition at line 1035 of file menu.c.

Referenced by ControlsSetMenuItemValues(), MouseSpeedFunc(), and Options_MenuInit().

◆ s_options_sfxvolume_slider

menuslider_s s_options_sfxvolume_slider
static

Definition at line 1043 of file menu.c.

Referenced by ControlsSetMenuItemValues(), Options_MenuInit(), and UpdateVolumeFunc().

◆ s_player_config_menu

menuframework_s s_player_config_menu
static

Definition at line 3414 of file menu.c.

Referenced by PlayerConfig_MenuDraw(), PlayerConfig_MenuInit(), and PlayerConfig_MenuKey().

◆ s_player_download_action

menuaction_s s_player_download_action
static

Definition at line 3424 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ s_player_hand_title

menuseparator_s s_player_hand_title
static

Definition at line 3422 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ s_player_handedness_box

menulist_s s_player_handedness_box
static

Definition at line 3418 of file menu.c.

Referenced by HandednessCallback(), and PlayerConfig_MenuInit().

◆ s_player_model_box

menulist_s s_player_model_box
static

◆ s_player_model_title

menuseparator_s s_player_model_title
static

Definition at line 3421 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ s_player_name_field

menufield_s s_player_name_field
static

Definition at line 3415 of file menu.c.

Referenced by PlayerConfig_MenuInit(), and PlayerConfig_MenuKey().

◆ s_player_rate_box

menulist_s s_player_rate_box
static

Definition at line 3419 of file menu.c.

Referenced by PlayerConfig_MenuInit(), and RateCallback().

◆ s_player_rate_title

menuseparator_s s_player_rate_title
static

Definition at line 3423 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ s_player_setup_action

menuaction_s s_player_setup_action
static

Definition at line 509 of file menu.c.

Referenced by Multiplayer_MenuInit().

◆ s_player_skin_box

menulist_s s_player_skin_box
static

◆ s_player_skin_title

menuseparator_s s_player_skin_title
static

Definition at line 3420 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ s_pmi

◆ s_pmnames

char* s_pmnames[MAX_PLAYERMODELS]
static

Definition at line 3438 of file menu.c.

Referenced by PlayerConfig_MenuInit().

◆ s_powerups_box

menulist_s s_powerups_box
static

Definition at line 2815 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_quad_drop_box

menulist_s s_quad_drop_box
static

Definition at line 2825 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_rules_box

menulist_s s_rules_box
static

◆ s_samelevel_box

menulist_s s_samelevel_box
static

Definition at line 2819 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_save_game_action

menuaction_s s_save_game_action
static

Definition at line 1948 of file menu.c.

Referenced by Game_MenuInit().

◆ s_savegame_actions

menuaction_s s_savegame_actions[MAX_SAVEGAMES]
static

Definition at line 2191 of file menu.c.

Referenced by SaveGame_MenuInit().

◆ s_savegame_menu

static menuframework_s s_savegame_menu
static

Definition at line 2089 of file menu.c.

Referenced by LoadGame_MenuKey(), SaveGame_MenuDraw(), SaveGame_MenuInit(), and SaveGame_MenuKey().

◆ s_spawn_farthest_box

menulist_s s_spawn_farthest_box
static

Definition at line 2817 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_stack_double_box

menulist_s s_stack_double_box
static

Definition at line 2830 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_start_network_server_action

menuaction_s s_start_network_server_action
static

Definition at line 508 of file menu.c.

Referenced by Multiplayer_MenuInit().

◆ s_startmap_list

menulist_s s_startmap_list
static

Definition at line 2447 of file menu.c.

Referenced by StartServer_MenuInit(), and StartServerActionFunc().

◆ s_startserver_dmoptions_action

menuaction_s s_startserver_dmoptions_action
static

Definition at line 2442 of file menu.c.

Referenced by RulesChangeFunc(), and StartServer_MenuInit().

◆ s_startserver_menu

menuframework_s s_startserver_menu
static

Definition at line 2437 of file menu.c.

Referenced by StartServer_MenuDraw(), StartServer_MenuInit(), and StartServer_MenuKey().

◆ s_startserver_start_action

menuaction_s s_startserver_start_action
static

Definition at line 2441 of file menu.c.

Referenced by StartServer_MenuInit().

◆ s_teamplay_box

menulist_s s_teamplay_box
static

Definition at line 2818 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ s_timelimit_field

menufield_s s_timelimit_field
static

Definition at line 2443 of file menu.c.

Referenced by StartServer_MenuInit(), and StartServerActionFunc().

◆ s_weapons_stay_box

menulist_s s_weapons_stay_box
static

Definition at line 2813 of file menu.c.

Referenced by DMFlagCallback(), and DMOptions_MenuInit().

◆ win_noalttab

cvar_t* win_noalttab
static

Definition at line 1029 of file menu.c.

Referenced by ControlsSetMenuItemValues(), and Options_MenuInit().

◆ xatcredits

const char* xatcredits[]
static

Definition at line 1556 of file menu.c.

Referenced by M_Menu_Credits_f().

M_Credits_Key
const char * M_Credits_Key(int key)
Definition: menu.c:1863
crosshair
cvar_t * crosshair
Definition: cl_view.c:33
s_join_network_server_action
static menuaction_s s_join_network_server_action
Definition: menu.c:507
sensitivity
cvar_t * sensitivity
Definition: cl_main.c:80
s_startmap_list
static menulist_s s_startmap_list
Definition: menu.c:2447
K_AUX3
@ K_AUX3
Definition: keys.h:99
AddressBookFunc
void AddressBookFunc(void *self)
Definition: menu.c:2326
s_options_alwaysrun_box
static menulist_s s_options_alwaysrun_box
Definition: menu.c:1038
M_Menu_Multiplayer_f
void M_Menu_Multiplayer_f(void)
Definition: menu.c:574
refexport_t::RegisterSkin
struct image_s *(* RegisterSkin)(char *name)
Definition: ref.h:177
nummaps
static int nummaps
Definition: menu.c:2439
s_medium_game_action
static menuaction_s s_medium_game_action
Definition: menu.c:1945
s_keys_backpedal_action
static menuaction_s s_keys_backpedal_action
Definition: menu.c:625
edict_s::s
entity_state_t s
Definition: g_local.h:964
CDAudio_Stop
void CDAudio_Stop(void)
FS_Read
void FS_Read(void *buffer, int len, FILE *f)
Definition: files.c:346
M_Menu_JoinServer_f
void M_Menu_JoinServer_f(void)
Definition: menu.c:2423
s_dmoptions_menu
static menuframework_s s_dmoptions_menu
Definition: menu.c:2809
value
GLfloat value
Definition: qgl_win.c:63
s_joinserver_server_title
static menuseparator_s s_joinserver_server_title
Definition: menu.c:2267
s_player_handedness_box
static menulist_s s_player_handedness_box
Definition: menu.c:3418
entity_s::skin
struct image_s * skin
Definition: ref.h:75
s_quad_drop_box
static menulist_s s_quad_drop_box
Definition: menu.c:2825
K_DOWNARROW
@ K_DOWNARROW
Definition: keys.h:34
searchpath_s::filename
char filename[MAX_OSPATH]
Definition: files.c:78
s_player_setup_action
static menuaction_s s_player_setup_action
Definition: menu.c:509
s_samelevel_box
static menulist_s s_samelevel_box
Definition: menu.c:2819
M_Print
void M_Print(int cx, int cy, char *str)
Definition: menu.c:280
MAIN_ITEMS
#define MAIN_ITEMS
Definition: menu.c:388
K_AUX31
@ K_AUX31
Definition: keys.h:127
CreditsFunc
static void CreditsFunc(void *unused)
Definition: menu.c:1994
client_state_t::servercount
int servercount
Definition: client.h:174
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
entity_s::origin
float origin[3]
Definition: ref.h:57
entity_s::model
struct model_s * model
Definition: ref.h:51
s_joinserver_address_book_action
static menuaction_s s_joinserver_address_book_action
Definition: menu.c:2269
s_player_skin_box
static menulist_s s_player_skin_box
Definition: menu.c:3417
s_hard_game_action
static menuaction_s s_hard_game_action
Definition: menu.c:1946
s_startserver_start_action
static menuaction_s s_startserver_start_action
Definition: menu.c:2441
DF_WEAPONS_STAY
#define DF_WEAPONS_STAY
Definition: q_shared.h:1050
Multiplayer_MenuKey
const char * Multiplayer_MenuKey(int key)
Definition: menu.c:569
Keys_MenuInit
static void Keys_MenuInit(void)
Definition: menu.c:751
refdef_t
Definition: ref.h:120
NO_SERVER_STRING
#define NO_SERVER_STRING
Definition: menu.c:2273
K_KP_UPARROW
@ K_KP_UPARROW
Definition: keys.h:61
JoinServer_MenuDraw
void JoinServer_MenuDraw(void)
Definition: menu.c:2411
playermodelinfo_s::directory
char directory[MAX_QPATH]
Definition: menu.c:3434
DF_NO_FALLING
#define DF_NO_FALLING
Definition: q_shared.h:1051
client_state_t::attractloop
qboolean attractloop
Definition: client.h:173
Multiplayer_MenuDraw
static void Multiplayer_MenuDraw(void)
Definition: menu.c:511
StartServerActionFunc
void StartServerActionFunc(void *self)
Definition: menu.c:2494
M_Main_Draw
void M_Main_Draw(void)
Definition: menu.c:391
MAX_MENU_DEPTH
#define MAX_MENU_DEPTH
Definition: menu.c:63
AlwaysRunFunc
static void AlwaysRunFunc(void *unused)
Definition: menu.c:1066
s_allow_exit_box
static menulist_s s_allow_exit_box
Definition: menu.c:2822
K_MOUSE4
@ K_MOUSE4
Definition: keys.h:82
InvertMouseFunc
static void InvertMouseFunc(void *unused)
Definition: menu.c:1136
MAX_DISPLAYNAME
#define MAX_DISPLAYNAME
Definition: menu.c:3426
maxclients
cvar_t * maxclients
Definition: g_main.c:44
DMOptions_MenuDraw
void DMOptions_MenuDraw(void)
Definition: menu.c:3187
Multiplayer_MenuInit
void Multiplayer_MenuInit(void)
Definition: menu.c:534
FreeLookFunc
static void FreeLookFunc(void *unused)
Definition: menu.c:1071
menucommon_s::localdata
int localdata[4]
Definition: qmenu.h:71
Key_SetBinding
void Key_SetBinding(int keynum, char *binding)
Definition: keys.c:509
DownloadOptions_MenuInit
void DownloadOptions_MenuInit(void)
Definition: menu.c:3249
menufield_s::generic
menucommon_s generic
Definition: qmenu.h:84
menufield_s::visible_length
int visible_length
Definition: qmenu.h:89
StartServer_MenuKey
const char * StartServer_MenuKey(int key)
Definition: menu.c:2775
cl_run
cvar_t * cl_run
Definition: cl_input.c:229
RulesChangeFunc
void RulesChangeFunc(void *self)
Definition: menu.c:2457
StartGame
static void StartGame(void)
Definition: menu.c:1952
s_player_rate_title
static menuseparator_s s_player_rate_title
Definition: menu.c:3423
ModelCallback
static void ModelCallback(void *unused)
Definition: menu.c:3461
s_startserver_dmoptions_action
static menuaction_s s_startserver_dmoptions_action
Definition: menu.c:2442
DownloadOptions_MenuKey
const char * DownloadOptions_MenuKey(int key)
Definition: menu.c:3324
CL_PingServers_f
void CL_PingServers_f(void)
Definition: cl_main.c:817
menucommon_s::type
int type
Definition: qmenu.h:66
refdef_t::areabits
byte * areabits
Definition: ref.h:130
K_MOUSE5
@ K_MOUSE5
Definition: keys.h:83
s_keys_attack_action
static menuaction_s s_keys_attack_action
Definition: menu.c:622
s_options_lookstrafe_box
static menulist_s s_options_lookstrafe_box
Definition: menu.c:1041
M_Menu_Main_f
void M_Menu_Main_f(void)
Definition: menu.c:494
K_AUX26
@ K_AUX26
Definition: keys.h:122
s_rules_box
static menulist_s s_rules_box
Definition: menu.c:2448
s_loadgame_actions
static menuaction_s s_loadgame_actions[MAX_SAVEGAMES]
Definition: menu.c:2092
M_Quit_Key
const char * M_Quit_Key(int key)
Definition: menu.c:3969
s_options_joystick_box
static menulist_s s_options_joystick_box
Definition: menu.c:1044
menu_out_sound
static char * menu_out_sound
Definition: menu.c:33
M_DrawTextBox
void M_DrawTextBox(int x, int y, int width, int lines)
Definition: menu.c:337
_tag_menuframework::y
int y
Definition: qmenu.h:51
s_player_name_field
static menufield_s s_player_name_field
Definition: menu.c:3415
menuslider_s::generic
menucommon_s generic
Definition: qmenu.h:95
K_AUX28
@ K_AUX28
Definition: keys.h:124
roguecredits
static const char * roguecredits[]
Definition: menu.c:1697
JoinNetworkServerFunc
static void JoinNetworkServerFunc(void *unused)
Definition: menu.c:524
menufield_s::length
int length
Definition: qmenu.h:88
MediumGameFunc
static void MediumGameFunc(void *data)
Definition: menu.c:1972
RateCallback
static void RateCallback(void *unused)
Definition: menu.c:3455
s_options_defaults_action
static menuaction_s s_options_defaults_action
Definition: menu.c:1033
CS_CDTRACK
#define CS_CDTRACK
Definition: q_shared.h:1126
refexport_t::RegisterPic
struct image_s *(* RegisterPic)(char *name)
Definition: ref.h:178
K_AUX13
@ K_AUX13
Definition: keys.h:109
refexport_t::DrawFill
void(* DrawFill)(int x, int y, int w, int h, int c)
Definition: ref.h:198
s_options_console_action
static menulist_s s_options_console_action
Definition: menu.c:1049
xoffset
GLint GLint xoffset
Definition: qgl_win.c:118
Create_Savestrings
void Create_Savestrings(void)
Definition: menu.c:2097
s_powerups_box
static menulist_s s_powerups_box
Definition: menu.c:2815
M_Menu_SaveGame_f
void M_Menu_SaveGame_f(void)
Definition: menu.c:2246
M_Menu_StartServer_f
void M_Menu_StartServer_f(void)
Definition: menu.c:2794
cvar_s::string
char * string
Definition: q_shared.h:320
qboolean
qboolean
Definition: q_shared.h:56
x
GLint GLenum GLint x
Definition: qgl_win.c:116
viddef_t::width
int width
Definition: vid.h:29
i
int i
Definition: q_shared.c:305
PlayerConfig_MenuKey
const char * PlayerConfig_MenuKey(int key)
Definition: menu.c:3897
s_start_network_server_action
static menuaction_s s_start_network_server_action
Definition: menu.c:508
refdef_t::y
int y
Definition: ref.h:122
DF_INFINITE_AMMO
#define DF_INFINITE_AMMO
Definition: q_shared.h:1061
DMOptions_MenuInit
void DMOptions_MenuInit(void)
Definition: menu.c:2977
ControlsResetDefaultsFunc
static void ControlsResetDefaultsFunc(void *unused)
Definition: menu.c:1128
LoadGame_MenuInit
void LoadGame_MenuInit(void)
Definition: menu.c:2130
UpdateVolumeFunc
static void UpdateVolumeFunc(void *unused)
Definition: menu.c:1151
ClampCvar
static float ClampCvar(float min, float max, float value)
Definition: menu.c:1088
keybindings
char * keybindings[K_LAST]
Definition: keys.c:39
K_AUX18
@ K_AUX18
Definition: keys.h:114
K_AUX4
@ K_AUX4
Definition: keys.h:100
UpdateCDVolumeFunc
static void UpdateCDVolumeFunc(void *unused)
Definition: menu.c:1161
K_KP_LEFTARROW
@ K_KP_LEFTARROW
Definition: keys.h:63
K_AUX23
@ K_AUX23
Definition: keys.h:119
menucommon_s::flags
unsigned flags
Definition: qmenu.h:72
menucommon_s::x
int x
Definition: qmenu.h:68
m_num_servers
int m_num_servers
Definition: menu.c:2272
s_options_customize_options_action
static menuaction_s s_options_customize_options_action
Definition: menu.c:1034
M_Quit_Draw
void M_Quit_Draw(void)
Definition: menu.c:3994
K_AUX2
@ K_AUX2
Definition: keys.h:98
EasyGameFunc
static void EasyGameFunc(void *data)
Definition: menu.c:1966
idcredits
static const char * idcredits[]
Definition: menu.c:1465
s_friendlyfire_box
static menulist_s s_friendlyfire_box
Definition: menu.c:2811
buffer
GLenum GLfloat * buffer
Definition: qgl_win.c:151
PlayerConfig_ScanDirectories
static qboolean PlayerConfig_ScanDirectories(void)
Definition: menu.c:3500
QMF_LEFT_JUSTIFY
#define QMF_LEFT_JUSTIFY
Definition: qmenu.h:45
viddef_t::height
int height
Definition: vid.h:29
s_stack_double_box
static menulist_s s_stack_double_box
Definition: menu.c:2830
DownloadOptions_MenuDraw
void DownloadOptions_MenuDraw(void)
Definition: menu.c:3319
client_state_t::cinematictime
int cinematictime
Definition: client.h:165
DownloadOptionsFunc
void DownloadOptionsFunc(void *self)
Definition: menu.c:3445
FS_NextPath
char * FS_NextPath(char *prevpath)
Definition: files.c:865
MAX_TOKEN_CHARS
#define MAX_TOKEN_CHARS
Definition: q_shared.h:71
credits_start_time
static int credits_start_time
Definition: menu.c:1461
s_keys_step_right_action
static menuaction_s s_keys_step_right_action
Definition: menu.c:630
creditsIndex
static char * creditsIndex[256]
Definition: menu.c:1463
NET_AdrToString
char * NET_AdrToString(netadr_t a)
Definition: net_wins.c:156
refdef_t::rdflags
int rdflags
Definition: ref.h:128
s_game_menu
static menuframework_s s_game_menu
Definition: menu.c:1943
menucommon_s::ownerdraw
void(* ownerdraw)(void *self)
Definition: qmenu.h:78
K_AUX8
@ K_AUX8
Definition: keys.h:104
DF_SPAWN_FARTHEST
#define DF_SPAWN_FARTHEST
Definition: q_shared.h:1057
s_options_invertmouse_box
static menulist_s s_options_invertmouse_box
Definition: menu.c:1039
width
GLint GLsizei width
Definition: qgl_win.c:115
K_AUX12
@ K_AUX12
Definition: keys.h:108
menuaction_s::generic
menucommon_s generic
Definition: qmenu.h:115
DF_NO_ITEMS
#define DF_NO_ITEMS
Definition: q_shared.h:1049
entity_s::flags
int flags
Definition: ref.h:76
SCR_DirtyScreen
void SCR_DirtyScreen(void)
Definition: cl_scrn.c:687
SaveGame_MenuInit
void SaveGame_MenuInit(void)
Definition: menu.c:2208
K_AUX11
@ K_AUX11
Definition: keys.h:107
DF_ALLOW_EXIT
#define DF_ALLOW_EXIT
Definition: q_shared.h:1060
Keys_MenuKey
static const char * Keys_MenuKey(int key)
Definition: menu.c:980
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
s_keys_change_weapon_action
static menuaction_s s_keys_change_weapon_action
Definition: menu.c:623
Menu_Center
void Menu_Center(menuframework_s *menu)
Definition: qmenu.c:340
HandednessCallback
static void HandednessCallback(void *unused)
Definition: menu.c:3450
cvar_s
Definition: q_shared.h:317
K_AUX17
@ K_AUX17
Definition: keys.h:113
s_credits_action
static menuaction_s s_credits_action
Definition: menu.c:1949
DF_FORCE_RESPAWN
#define DF_FORCE_RESPAWN
Definition: q_shared.h:1058
DF_FIXED_FOV
#define DF_FIXED_FOV
Definition: q_shared.h:1063
win_noalttab
static cvar_t * win_noalttab
Definition: menu.c:1029
s_startserver_menu
static menuframework_s s_startserver_menu
Definition: menu.c:2437
K_ENTER
@ K_ENTER
Definition: keys.h:26
key_menu
@ key_menu
Definition: client.h:220
SaveGameCallback
void SaveGameCallback(void *self)
Definition: menu.c:2193
freelook
cvar_t * freelook
Definition: cl_main.c:24
s_pmnames
static char * s_pmnames[MAX_PLAYERMODELS]
Definition: menu.c:3438
DF_NO_NUKES
#define DF_NO_NUKES
Definition: q_shared.h:1071
K_JOY3
@ K_JOY3
Definition: keys.h:90
QMF_GRAYED
#define QMF_GRAYED
Definition: qmenu.h:46
menuslider_s::minvalue
float minvalue
Definition: qmenu.h:97
s_keys_look_down_action
static menuaction_s s_keys_look_down_action
Definition: menu.c:633
s_allow_download_models_box
static menulist_s s_allow_download_models_box
Definition: menu.c:3215
viddef
viddef_t viddef
Definition: vid_dll.c:49
LookstrafeFunc
static void LookstrafeFunc(void *unused)
Definition: menu.c:1146
K_AUX29
@ K_AUX29
Definition: keys.h:125
refexport_t::EndFrame
void(* EndFrame)(void)
Definition: ref.h:209
j
GLint j
Definition: qgl_win.c:150
m_menudepth
int m_menudepth
Definition: menu.c:73
DMOptionsFunc
void DMOptionsFunc(void *self)
Definition: menu.c:2450
CustomizeControlsFunc
static void CustomizeControlsFunc(void *unused)
Definition: menu.c:1061
m_layers
menulayer_t m_layers[MAX_MENU_DEPTH]
Definition: menu.c:72
s_weapons_stay_box
static menulist_s s_weapons_stay_box
Definition: menu.c:2813
va
char * va(char *format,...)
Definition: q_shared.c:1050
s_keys_inv_next_action
static menuaction_s s_keys_inv_next_action
Definition: menu.c:643
s_options_cdshuffle_box
static menulist_s s_options_cdshuffle_box
Definition: menu.c:1046
NUM_CURSOR_FRAMES
#define NUM_CURSOR_FRAMES
Definition: menu.c:29
Menu_DrawString
void Menu_DrawString(int x, int y, const char *string)
Definition: qmenu.c:438
DF_INSTANT_ITEMS
#define DF_INSTANT_ITEMS
Definition: q_shared.h:1052
K_LEFTARROW
@ K_LEFTARROW
Definition: keys.h:35
Cvar_ForceSet
cvar_t * Cvar_ForceSet(char *var_name, char *value)
Definition: cvar.c:268
ControlsSetMenuItemValues
static void ControlsSetMenuItemValues(void)
Definition: menu.c:1095
K_AUX6
@ K_AUX6
Definition: keys.h:102
menufield_s::cursor
int cursor
Definition: qmenu.h:87
DF_NO_HEALTH
#define DF_NO_HEALTH
Definition: q_shared.h:1048
searchpath_s::next
struct searchpath_s * next
Definition: files.c:80
s_savegame_actions
static menuaction_s s_savegame_actions[MAX_SAVEGAMES]
Definition: menu.c:2191
K_AUX27
@ K_AUX27
Definition: keys.h:123
CDAudio_Play
void CDAudio_Play(int track, qboolean looping)
Definition: cd_win.c:182
K_AUX20
@ K_AUX20
Definition: keys.h:116
K_ESCAPE
@ K_ESCAPE
Definition: keys.h:27
M_Menu_Keys_f
void M_Menu_Keys_f(void)
Definition: menu.c:1015
refexport_t::DrawFadeScreen
void(* DrawFadeScreen)(void)
Definition: ref.h:199
s_armor_box
static menulist_s s_armor_box
Definition: menu.c:2821
M_Menu_DownloadOptions_f
void M_Menu_DownloadOptions_f(void)
Definition: menu.c:3329
edict_s::item
gitem_t * item
Definition: g_local.h:1104
Menu_Draw
void Menu_Draw(menuframework_s *menu)
Definition: qmenu.c:350
Game_MenuDraw
void Game_MenuDraw(void)
Definition: menu.c:2060
RDF_NOWORLDMODEL
#define RDF_NOWORLDMODEL
Definition: q_shared.h:646
K_AUX21
@ K_AUX21
Definition: keys.h:117
menulayer_t::key
const char *(* key)(int k)
Definition: menu.c:69
searchpath_s
Definition: files.c:76
s_keys_look_up_action
static menuaction_s s_keys_look_up_action
Definition: menu.c:632
menu_in_sound
static char * menu_in_sound
Definition: menu.c:31
s_joinserver_server_actions
static menuaction_s s_joinserver_server_actions[MAX_LOCAL_SERVERS]
Definition: menu.c:2270
s_teamplay_box
static menulist_s s_teamplay_box
Definition: menu.c:2818
MAX_LOCAL_SERVERS
#define MAX_LOCAL_SERVERS
Definition: menu.c:2264
menucommon_s::y
int y
Definition: qmenu.h:68
skin
cvar_t * skin
Definition: cl_main.c:95
M_Menu_Credits_f
void M_Menu_Credits_f(void)
Definition: menu.c:1880
creditsBuffer
static char * creditsBuffer
Definition: menu.c:1464
CL_Snd_Restart_f
void CL_Snd_Restart_f(void)
Definition: cl_main.c:1119
menucommon_s
Definition: qmenu.h:64
m_savevalid
qboolean m_savevalid[MAX_SAVEGAMES]
Definition: menu.c:2095
s_options_menu
static menuframework_s s_options_menu
Definition: menu.c:1032
rate_tbl
static int rate_tbl[]
Definition: menu.c:3441
Keys_MenuDraw
static void Keys_MenuDraw(void)
Definition: menu.c:974
timelimit
cvar_t * timelimit
Definition: g_main.c:40
s_loadgame_menu
static menuframework_s s_loadgame_menu
Definition: menu.c:2091
s_joinserver_menu
static menuframework_s s_joinserver_menu
Definition: menu.c:2266
Sys_FindFirst
char * Sys_FindFirst(char *path, unsigned musthave, unsigned canthave)
Definition: q_shwin.c:173
s_numplayermodels
static int s_numplayermodels
Definition: menu.c:3439
s_instant_powerups_box
static menulist_s s_instant_powerups_box
Definition: menu.c:2814
s_keys_move_down_action
static menuaction_s s_keys_move_down_action
Definition: menu.c:638
s_keys_mouse_look_action
static menuaction_s s_keys_mouse_look_action
Definition: menu.c:635
LoadGameCallback
void LoadGameCallback(void *self)
Definition: menu.c:2121
Developer_searchpath
int Developer_searchpath(int who)
Definition: files.c:159
menulist_s
Definition: qmenu.h:104
DF_SKINTEAMS
#define DF_SKINTEAMS
Definition: q_shared.h:1054
JoystickFunc
static void JoystickFunc(void *unused)
Definition: menu.c:1056
K_JOY1
@ K_JOY1
Definition: keys.h:88
KeyCursorDrawFunc
static void KeyCursorDrawFunc(menuframework_s *menu)
Definition: menu.c:691
HardGameFunc
static void HardGameFunc(void *data)
Definition: menu.c:1978
K_AUX30
@ K_AUX30
Definition: keys.h:126
AddressBook_MenuKey
const char * AddressBook_MenuKey(int key)
Definition: menu.c:3379
s_keys_walk_forward_action
static menuaction_s s_keys_walk_forward_action
Definition: menu.c:624
s_options_compatibility_list
static menulist_s s_options_compatibility_list
Definition: menu.c:1048
DF_SAME_LEVEL
#define DF_SAME_LEVEL
Definition: q_shared.h:1053
Menu_ItemAtCursor
void * Menu_ItemAtCursor(menuframework_s *m)
Definition: qmenu.c:478
Menu_SelectItem
qboolean Menu_SelectItem(menuframework_s *s)
Definition: qmenu.c:486
M_PopMenu
void M_PopMenu(void)
Definition: menu.c:127
DF_QUAD_DROP
#define DF_QUAD_DROP
Definition: q_shared.h:1062
Menu_AdjustCursor
void Menu_AdjustCursor(menuframework_s *m, int dir)
Definition: qmenu.c:292
K_KP_RIGHTARROW
@ K_KP_RIGHTARROW
Definition: keys.h:65
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
menucommon_s::callback
void(* callback)(void *self)
Definition: qmenu.h:76
Key_KeynumToString
char * Key_KeynumToString(int keynum)
Definition: keys.c:482
s_no_mines_box
static menulist_s s_no_mines_box
Definition: menu.c:2828
key_game
@ key_game
Definition: client.h:220
entity_s::oldframe
int oldframe
Definition: ref.h:64
FS_LoadFile
int FS_LoadFile(char *path, void **buffer)
Definition: files.c:394
s_fixed_fov_box
static menulist_s s_fixed_fov_box
Definition: menu.c:2824
menuslider_s::maxvalue
float maxvalue
Definition: qmenu.h:98
K_AUX5
@ K_AUX5
Definition: keys.h:101
lookspring
cvar_t * lookspring
Definition: cl_main.c:78
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:309
M_Banner
static void M_Banner(char *name)
Definition: menu.c:75
_tag_menuframework::cursordraw
void(* cursordraw)(struct _tag_menuframework *m)
Definition: qmenu.h:60
s_falls_box
static menulist_s s_falls_box
Definition: menu.c:2812
lookstrafe
cvar_t * lookstrafe
Definition: cl_main.c:79
_tag_menuframework::cursor
int cursor
Definition: qmenu.h:52
s_keys_keyboard_look_action
static menuaction_s s_keys_keyboard_look_action
Definition: menu.c:636
s_no_nukes_box
static menulist_s s_no_nukes_box
Definition: menu.c:2829
cvar_s::value
float value
Definition: q_shared.h:324
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
m_game_cursor
static int m_game_cursor
Definition: menu.c:1941
PlayerConfig_MenuDraw
void PlayerConfig_MenuDraw(void)
Definition: menu.c:3838
VID_MenuDraw
void VID_MenuDraw(void)
Definition: vid_menu.c:405
Cvar_SetValue
void Cvar_SetValue(char *var_name, float value)
Definition: cvar.c:317
entity_s::backlerp
float backlerp
Definition: ref.h:69
K_JOY4
@ K_JOY4
Definition: keys.h:91
m_drawfunc
void(* m_drawfunc)(void)
Definition: menu.c:57
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:74
M_ForceMenuOff
void M_ForceMenuOff(void)
Definition: menu.c:117
ConsoleFunc
static void ConsoleFunc(void *unused)
Definition: menu.c:1182
UpdateSoundQualityFunc
static void UpdateSoundQualityFunc(void *unused)
Definition: menu.c:1202
M_Menu_DMOptions_f
void M_Menu_DMOptions_f(void)
Definition: menu.c:3197
key_console
@ key_console
Definition: client.h:220
Options_MenuInit
void Options_MenuInit(void)
Definition: menu.c:1228
credits
static const char ** credits
Definition: menu.c:1462
refexport_t::DrawGetPicSize
void(* DrawGetPicSize)(int *w, int *h, char *name)
Definition: ref.h:195
NULL
#define NULL
Definition: q_shared.h:60
FS_ListFiles
char ** FS_ListFiles(char *findname, int *numfiles, unsigned musthave, unsigned canthave)
Definition: files.c:738
menucommon_s::cursor_offset
int cursor_offset
Definition: qmenu.h:70
CDAudio_RandomPlay
void CDAudio_RandomPlay(void)
Definition: cd_win.c:190
CalcFov
float CalcFov(float fov_x, float width, float height)
Definition: cl_view.c:416
local_server_netadr
static netadr_t local_server_netadr[MAX_LOCAL_SERVERS]
Definition: menu.c:2279
refdef_t::time
float time
Definition: ref.h:127
s_options_sensitivity_slider
static menuslider_s s_options_sensitivity_slider
Definition: menu.c:1035
xatcredits
static const char * xatcredits[]
Definition: menu.c:1556
s_hostname_field
static menufield_s s_hostname_field
Definition: menu.c:2446
JoinServerFunc
void JoinServerFunc(void *self)
Definition: menu.c:2308
MTYPE_ACTION
#define MTYPE_ACTION
Definition: qmenu.h:27
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
menuaction_s
Definition: qmenu.h:113
M_Menu_AddressBook_f
void M_Menu_AddressBook_f(void)
Definition: menu.c:3401
s_options_lookspring_box
static menulist_s s_options_lookspring_box
Definition: menu.c:1040
Con_ClearNotify
void Con_ClearNotify(void)
Definition: console.c:215
s_options_freelook_box
static menulist_s s_options_freelook_box
Definition: menu.c:1036
refexport_t::DrawPic
void(* DrawPic)(int x, int y, char *name)
Definition: ref.h:196
refdef_t::height
int height
Definition: ref.h:122
in_joystick
cvar_t * in_joystick
Definition: in_win.c:55
DF_NO_MINES
#define DF_NO_MINES
Definition: q_shared.h:1069
rate_names
static const char * rate_names[]
Definition: menu.c:3442
K_MOUSE3
@ K_MOUSE3
Definition: keys.h:81
refexport_t::RegisterModel
struct model_s *(* RegisterModel)(char *name)
Definition: ref.h:176
K_AUX1
@ K_AUX1
Definition: keys.h:97
pmicmpfnc
static int pmicmpfnc(const void *_a, const void *_b)
Definition: menu.c:3654
dmoptions_statusbar
static char dmoptions_statusbar[128]
Definition: menu.c:2807
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
K_KP_ENTER
@ K_KP_ENTER
Definition: keys.h:69
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1192
s_keys_move_up_action
static menuaction_s s_keys_move_up_action
Definition: menu.c:637
s_health_box
static menulist_s s_health_box
Definition: menu.c:2816
s_save_game_action
static menuaction_s s_save_game_action
Definition: menu.c:1948
menulayer_t::draw
void(* draw)(void)
Definition: menu.c:68
CDAudio_Init
int CDAudio_Init(void)
name
cvar_t * name
Definition: cl_main.c:94
SaveGame_MenuDraw
void SaveGame_MenuDraw(void)
Definition: menu.c:2201
mapnames
static char ** mapnames
Definition: menu.c:2438
StartServer_MenuDraw
void StartServer_MenuDraw(void)
Definition: menu.c:2770
ERR_FATAL
#define ERR_FATAL
Definition: qcommon.h:735
_tag_menuframework::nitems
int nitems
Definition: qmenu.h:54
bindnames
char * bindnames[][2]
Definition: menu.c:587
LoadGameFunc
static void LoadGameFunc(void *unused)
Definition: menu.c:1984
playermodelinfo_s::displayname
char displayname[MAX_DISPLAYNAME]
Definition: menu.c:3433
s_player_model_title
static menuseparator_s s_player_model_title
Definition: menu.c:3421
K_AUX19
@ K_AUX19
Definition: keys.h:115
menulist_s::curvalue
int curvalue
Definition: qmenu.h:108
s_options_crosshair_box
static menulist_s s_options_crosshair_box
Definition: menu.c:1042
K_KP_DEL
@ K_KP_DEL
Definition: keys.h:71
s_options_noalttab_box
static menulist_s s_options_noalttab_box
Definition: menu.c:1037
s_options_sfxvolume_slider
static menuslider_s s_options_sfxvolume_slider
Definition: menu.c:1043
s_keys_inv_use_action
static menuaction_s s_keys_inv_use_action
Definition: menu.c:640
y
GLint y
Definition: qgl_win.c:115
K_MOUSE2
@ K_MOUSE2
Definition: keys.h:80
re
refexport_t re
Definition: vid_dll.c:31
VID_MenuInit
void VID_MenuInit(void)
Definition: vid_menu.c:209
MouseSpeedFunc
static void MouseSpeedFunc(void *unused)
Definition: menu.c:1076
ystart
static int ystart
Definition: r_polyse.c:93
M_Menu_LoadGame_f
void M_Menu_LoadGame_f(void)
Definition: menu.c:2176
s_keys_step_left_action
static menuaction_s s_keys_step_left_action
Definition: menu.c:629
MTYPE_SLIDER
#define MTYPE_SLIDER
Definition: qmenu.h:25
s_keys_sidestep_action
static menuaction_s s_keys_sidestep_action
Definition: menu.c:631
s_maxclients_field
static menufield_s s_maxclients_field
Definition: menu.c:2445
entity_s::frame
int frame
Definition: ref.h:58
DrawKeyBindingFunc
static void DrawKeyBindingFunc(void *self)
Definition: menu.c:706
s_keys_help_computer_action
static menuaction_s s_keys_help_computer_action
Definition: menu.c:645
AddressBook_MenuInit
void AddressBook_MenuInit(void)
Definition: menu.c:3346
bind_grab
static int bind_grab
Definition: menu.c:619
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
K_JOY2
@ K_JOY2
Definition: keys.h:89
s_keys_run_action
static menuaction_s s_keys_run_action
Definition: menu.c:628
Menu_SetStatusBar
void Menu_SetStatusBar(menuframework_s *m, const char *string)
Definition: qmenu.c:510
s_download_title
static menuseparator_s s_download_title
Definition: menu.c:3212
Key_ClearTyping
void Key_ClearTyping(void)
Definition: console.c:64
refdef_t::lightstyles
lightstyle_t * lightstyles
Definition: ref.h:132
s_allow_download_maps_box
static menulist_s s_allow_download_maps_box
Definition: menu.c:3214
s_force_respawn_box
static menulist_s s_force_respawn_box
Definition: menu.c:2820
FreeFileList
static void FreeFileList(char **list, int n)
Definition: menu.c:3467
M_FindKeysForCommand
static void M_FindKeysForCommand(char *command, int *twokeys)
Definition: menu.c:665
DownloadCallback
static void DownloadCallback(void *self)
Definition: menu.c:3219
CDShuffleFunc
static void CDShuffleFunc(void *unused)
Definition: menu.c:1156
s_player_hand_title
static menuseparator_s s_player_hand_title
Definition: menu.c:3422
DF_NO_STACK_DOUBLE
#define DF_NO_STACK_DOUBLE
Definition: q_shared.h:1070
playermodelinfo_s::skindisplaynames
char ** skindisplaynames
Definition: menu.c:3432
_tag_menuframework::x
int x
Definition: qmenu.h:51
m_pitch
cvar_t * m_pitch
Definition: cl_main.c:82
s_joinserver_search_action
static menuaction_s s_joinserver_search_action
Definition: menu.c:2268
MAX_SAVEGAMES
#define MAX_SAVEGAMES
Definition: menu.c:2087
menucommon_s::statusbar
const char * statusbar
Definition: qmenu.h:74
menuslider_s::curvalue
float curvalue
Definition: qmenu.h:99
refdef_t::num_entities
int num_entities
Definition: ref.h:134
DMOptions_MenuKey
const char * DMOptions_MenuKey(int key)
Definition: menu.c:3192
playermodelinfo_s::nskins
int nskins
Definition: menu.c:3431
Cbuf_InsertText
void Cbuf_InsertText(char *text)
Definition: cmd.c:114
fs_searchpaths
searchpath_t * fs_searchpaths
Definition: files.c:83
FS_Gamedir
char * FS_Gamedir(void)
Definition: files.c:590
s_player_skin_title
static menuseparator_s s_player_skin_title
Definition: menu.c:3420
Game_MenuInit
void Game_MenuInit(void)
Definition: menu.c:1999
menucommon_s::name
const char * name
Definition: qmenu.h:67
entity_s
Definition: ref.h:49
StartNetworkServerFunc
static void StartNetworkServerFunc(void *unused)
Definition: menu.c:529
K_AUX22
@ K_AUX22
Definition: keys.h:118
edict_s::flags
int flags
Definition: g_local.h:996
menu_move_sound
static char * menu_move_sound
Definition: menu.c:32
K_TAB
@ K_TAB
Definition: keys.h:25
menufield_s
Definition: qmenu.h:82
Options_MenuDraw
void Options_MenuDraw(void)
Definition: menu.c:1422
RF_FULLBRIGHT
#define RF_FULLBRIGHT
Definition: q_shared.h:616
Field_Key
qboolean Field_Key(menufield_s *f, int key)
Definition: qmenu.c:139
K_UPARROW
@ K_UPARROW
Definition: keys.h:33
Com_ServerState
int Com_ServerState(void)
Definition: common.c:275
CVAR_USERINFO
#define CVAR_USERINFO
Definition: q_shared.h:310
StartServer_MenuInit
void StartServer_MenuInit(void)
Definition: menu.c:2565
M_PushMenu
void M_PushMenu(void(*draw)(void), const char *(*key)(int k))
Definition: menu.c:83
menulist_s::itemnames
const char ** itemnames
Definition: qmenu.h:110
K_AUX7
@ K_AUX7
Definition: keys.h:103
M_Menu_PlayerConfig_f
void M_Menu_PlayerConfig_f(void)
Definition: menu.c:3932
K_AUX10
@ K_AUX10
Definition: keys.h:106
Cbuf_Execute
void Cbuf_Execute(void)
Definition: cmd.c:194
s_infinite_ammo_box
static menulist_s s_infinite_ammo_box
Definition: menu.c:2823
MTYPE_SPINCONTROL
#define MTYPE_SPINCONTROL
Definition: qmenu.h:28
m_savestrings
char m_savestrings[MAX_SAVEGAMES][32]
Definition: menu.c:2094
M_Menu_Video_f
void M_Menu_Video_f(void)
Definition: menu.c:1448
K_AUX32
@ K_AUX32
Definition: keys.h:128
COM_Parse
char * COM_Parse(char **data_p)
Definition: q_shared.c:1072
refdef_t::fov_x
float fov_x
Definition: ref.h:123
M_Credits_MenuDraw
void M_Credits_MenuDraw(void)
Definition: menu.c:1812
M_DrawCursor
void M_DrawCursor(int x, int y, int f)
Definition: menu.c:315
SearchLocalGames
void SearchLocalGames(void)
Definition: menu.c:2335
refdef_t::fov_y
float fov_y
Definition: ref.h:123
Sys_FindClose
void Sys_FindClose(void)
Definition: q_shwin.c:206
s_keys_turn_right_action
static menuaction_s s_keys_turn_right_action
Definition: menu.c:627
s_pmi
static playermodelinfo_s s_pmi[MAX_PLAYERMODELS]
Definition: menu.c:3437
s_addressbook_menu
static menuframework_s s_addressbook_menu
Definition: menu.c:3343
client_state_t::configstrings
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
Definition: client.h:178
CrosshairFunc
static void CrosshairFunc(void *unused)
Definition: menu.c:1051
KeyBindingFunc
static void KeyBindingFunc(void *self)
Definition: menu.c:736
Menu_SlideItem
void Menu_SlideItem(menuframework_s *s, int dir)
Definition: qmenu.c:515
LookspringFunc
static void LookspringFunc(void *unused)
Definition: menu.c:1141
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
Default_MenuKey
const char * Default_MenuKey(menuframework_s *m, int key)
Definition: menu.c:142
s_downloadoptions_menu
static menuframework_s s_downloadoptions_menu
Definition: menu.c:3210
s_allow_download_sounds_box
static menulist_s s_allow_download_sounds_box
Definition: menu.c:3217
s_options_cdvolume_box
static menulist_s s_options_cdvolume_box
Definition: menu.c:1045
MTYPE_FIELD
#define MTYPE_FIELD
Definition: qmenu.h:30
DMFlagCallback
static void DMFlagCallback(void *self)
Definition: menu.c:2834
LoadGame_MenuKey
const char * LoadGame_MenuKey(int key)
Definition: menu.c:2165
Game_MenuKey
const char * Game_MenuKey(int key)
Definition: menu.c:2067
DF_MODELTEAMS
#define DF_MODELTEAMS
Definition: q_shared.h:1055
m_main_cursor
static int m_main_cursor
Definition: menu.c:27
FS_FreeFile
void FS_FreeFile(void *buffer)
Definition: files.c:433
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:225
NUM_ADDRESSBOOK_ENTRIES
#define NUM_ADDRESSBOOK_ENTRIES
Definition: menu.c:3341
m_keyfunc
const char *(* m_keyfunc)(int key)
Definition: menu.c:58
refdef_t::width
int width
Definition: ref.h:122
s_keys_turn_left_action
static menuaction_s s_keys_turn_left_action
Definition: menu.c:626
s_multiplayer_menu
static menuframework_s s_multiplayer_menu
Definition: menu.c:506
m_entersound
qboolean m_entersound
Definition: menu.c:54
refexport_t::DrawChar
void(* DrawChar)(int x, int y, int c)
Definition: ref.h:193
s_timelimit_field
static menufield_s s_timelimit_field
Definition: menu.c:2443
S_StartLocalSound
void S_StartLocalSound(char *sound)
Definition: snd_dma.c:738
s_allow_download_box
static menulist_s s_allow_download_box
Definition: menu.c:3213
s_player_config_menu
static menuframework_s s_player_config_menu
Definition: menu.c:3414
K_AUX25
@ K_AUX25
Definition: keys.h:121
DF_NO_SPHERES
#define DF_NO_SPHERES
Definition: q_shared.h:1072
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
menuseparator_s::generic
menucommon_s generic
Definition: qmenu.h:120
SaveGameFunc
static void SaveGameFunc(void *unused)
Definition: menu.c:1989
K_AUX9
@ K_AUX9
Definition: keys.h:105
JoinServer_MenuKey
const char * JoinServer_MenuKey(int key)
Definition: menu.c:2418
SFF_HIDDEN
#define SFF_HIDDEN
Definition: q_shared.h:280
CL_Quit_f
void CL_Quit_f(void)
Definition: cl_main.c:399
dmflags
cvar_t * dmflags
Definition: g_main.c:37
Sys_Milliseconds
int Sys_Milliseconds(void)
Definition: q_shwin.c:120
s_keys_inv_drop_action
static menuaction_s s_keys_inv_drop_action
Definition: menu.c:641
refdef_t::entities
entity_t * entities
Definition: ref.h:135
K_RIGHTARROW
@ K_RIGHTARROW
Definition: keys.h:36
K_AUX14
@ K_AUX14
Definition: keys.h:110
K_DEL
@ K_DEL
Definition: keys.h:54
K_AUX24
@ K_AUX24
Definition: keys.h:120
refdef_t::x
int x
Definition: ref.h:122
s_allow_download_players_box
static menulist_s s_allow_download_players_box
Definition: menu.c:3216
M_Menu_Quit_f
void M_Menu_Quit_f(void)
Definition: menu.c:4003
cls
client_static_t cls
Definition: cl_main.c:105
Key_ClearStates
void Key_ClearStates(void)
Definition: keys.c:919
IconOfSkinExists
static qboolean IconOfSkinExists(char *skin, char **pcxfiles, int npcxfiles)
Definition: menu.c:3482
fraglimit
cvar_t * fraglimit
Definition: g_main.c:39
PlayerSetupFunc
static void PlayerSetupFunc(void *unused)
Definition: menu.c:519
K_MOUSE1
@ K_MOUSE1
Definition: keys.h:79
LoadGame_MenuDraw
void LoadGame_MenuDraw(void)
Definition: menu.c:2158
Cvar_VariableString
char * Cvar_VariableString(char *var_name)
Definition: cvar.c:79
K_AUX15
@ K_AUX15
Definition: keys.h:111
hand
cvar_t * hand
Definition: cl_main.c:99
s_keys_center_view_action
static menuaction_s s_keys_center_view_action
Definition: menu.c:634
s_keys_menu
static menuframework_s s_keys_menu
Definition: menu.c:621
s_savegame_menu
static menuframework_s s_savegame_menu
Definition: menu.c:2089
menulist_s::generic
menucommon_s generic
Definition: qmenu.h:106
playermodelinfo_s
Definition: menu.c:3429
M_Menu_Game_f
void M_Menu_Game_f(void)
Definition: menu.c:2072
MTYPE_SEPARATOR
#define MTYPE_SEPARATOR
Definition: qmenu.h:29
Menu_AddItem
void Menu_AddItem(menuframework_s *menu, void *item)
Definition: qmenu.c:270
s_keys_inventory_action
static menuaction_s s_keys_inventory_action
Definition: menu.c:639
AddressBook_MenuDraw
void AddressBook_MenuDraw(void)
Definition: menu.c:3395
M_DrawCharacter
void M_DrawCharacter(int cx, int cy, int num)
Definition: menu.c:271
s_no_spheres_box
static menulist_s s_no_spheres_box
Definition: menu.c:2831
cl
client_state_t cl
Definition: cl_main.c:106
s_blankline
static menuseparator_s s_blankline
Definition: menu.c:1950
PlayerConfig_MenuInit
qboolean PlayerConfig_MenuInit(void)
Definition: menu.c:3676
s_fraglimit_field
static menufield_s s_fraglimit_field
Definition: menu.c:2444
s_player_download_action
static menuaction_s s_player_download_action
Definition: menu.c:3424
menucommon_s::parent
menuframework_s * parent
Definition: qmenu.h:69
DF_NO_ARMOR
#define DF_NO_ARMOR
Definition: q_shared.h:1059
K_BACKSPACE
@ K_BACKSPACE
Definition: keys.h:32
s_load_game_action
static menuaction_s s_load_game_action
Definition: menu.c:1947
SFF_SUBDIR
#define SFF_SUBDIR
Definition: q_shared.h:282
entity_s::oldorigin
float oldorigin[3]
Definition: ref.h:63
SaveGame_MenuKey
const char * SaveGame_MenuKey(int key)
Definition: menu.c:2235
K_KP_DOWNARROW
@ K_KP_DOWNARROW
Definition: keys.h:67
s_spawn_farthest_box
static menulist_s s_spawn_farthest_box
Definition: menu.c:2817
SearchLocalGamesFunc
void SearchLocalGamesFunc(void *self)
Definition: menu.c:2355
menufield_s::buffer
char buffer[80]
Definition: qmenu.h:86
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1236
M_Main_Key
const char * M_Main_Key(int key)
Definition: menu.c:440
Options_MenuKey
const char * Options_MenuKey(int key)
Definition: menu.c:1429
refexport_t::RenderFrame
void(* RenderFrame)(refdef_t *fd)
Definition: ref.h:182
s_addressbook_fields
static menufield_s s_addressbook_fields[NUM_ADDRESSBOOK_ENTRIES]
Definition: menu.c:3344
s_options_quality_list
static menulist_s s_options_quality_list
Definition: menu.c:1047
M_Menu_Options_f
void M_Menu_Options_f(void)
Definition: menu.c:1434
entity_s::angles
float angles[3]
Definition: ref.h:52
K_AUX16
@ K_AUX16
Definition: keys.h:112
s_keys_inv_prev_action
static menuaction_s s_keys_inv_prev_action
Definition: menu.c:642
SFF_SYSTEM
#define SFF_SYSTEM
Definition: q_shared.h:283
s_player_model_box
static menulist_s s_player_model_box
Definition: menu.c:3416
M_UnbindCommand
static void M_UnbindCommand(char *command)
Definition: menu.c:647
count
GLint GLsizei count
Definition: qgl_win.c:128
MAX_PLAYERMODELS
#define MAX_PLAYERMODELS
Definition: menu.c:3427
DF_NO_FRIENDLY_FIRE
#define DF_NO_FRIENDLY_FIRE
Definition: q_shared.h:1056
QMF_NUMBERSONLY
#define QMF_NUMBERSONLY
Definition: qmenu.h:47
JoinServer_MenuInit
void JoinServer_MenuInit(void)
Definition: menu.c:2360
s_easy_game_action
static menuaction_s s_easy_game_action
Definition: menu.c:1944
s_player_rate_box
static menulist_s s_player_rate_box
Definition: menu.c:3419
local_server_names
static char local_server_names[MAX_LOCAL_SERVERS][80]
Definition: menu.c:2276
client_static_t::realtime
int realtime
Definition: client.h:228
Cvar_VariableValue
float Cvar_VariableValue(char *var_name)
Definition: cvar.c:63
VID_MenuKey
const char * VID_MenuKey(int key)
Definition: vid_menu.c:436