/*
================
-M_ToggleMenu_f
+M_ToggleMenu
================
*/
-void M_ToggleMenu_f (void)
+void M_ToggleMenu(int mode)
{
m_entersound = true;
if ((key_dest != key_menu && key_dest != key_menu_grabbed) || m_state != m_main)
{
- if(Cmd_Argc() == 2 && !strcmp(Cmd_Argv(1), "1"))
+ if(mode == 1)
return;
M_Menu_Main_f ();
}
else
{
- if(Cmd_Argc() == 2 && !strcmp(Cmd_Argv(1), "0"))
+ if(mode == 0)
return;
key_dest = key_game;
m_state = m_none;
static void M_KeyEvent(int key, int ascii, qboolean downevent);
static void M_Draw(void);
-void M_ToggleMenu_f(void);
+void M_ToggleMenu(int mode);
static void M_Shutdown(void);
void M_Init (void)
R_SelectScene( RST_CLIENT );
}
-void MP_ToggleMenu_f (void)
+void MP_ToggleMenu(int mode)
{
PRVM_Begin;
PRVM_SetProg(PRVM_MENUPROG);
+ prog->globals.generic[OFS_PARM0] = (float) mode;
PRVM_ExecuteProgram(prog->funcoffsets.m_toggle,"m_toggle() required");
PRVM_End;
void (*MR_KeyEvent) (int key, int ascii, qboolean downevent);
void (*MR_Draw) (void);
-void (*MR_ToggleMenu_f) (void);
+void (*MR_ToggleMenu) (int mode);
void (*MR_Shutdown) (void);
void MR_SetRouting(qboolean forceold)
// set menu router function pointers
MR_KeyEvent = M_KeyEvent;
MR_Draw = M_Draw;
- MR_ToggleMenu_f = M_ToggleMenu_f;
+ MR_ToggleMenu = M_ToggleMenu;
MR_Shutdown = M_Shutdown;
// init
// set menu router function pointers
MR_KeyEvent = MP_KeyEvent;
MR_Draw = MP_Draw;
- MR_ToggleMenu_f = MP_ToggleMenu_f;
+ MR_ToggleMenu = MP_ToggleMenu;
MR_Shutdown = MP_Shutdown;
if(!mp_init)
void Call_MR_ToggleMenu_f(void)
{
+ int m;
+ m = ((Cmd_Argc() < 2) ? -1 : atoi(Cmd_Argv(1)));
Host_StartVideo();
- if(MR_ToggleMenu_f)
- MR_ToggleMenu_f();
+ if(MR_ToggleMenu)
+ MR_ToggleMenu(m);
}
void MR_Init_Commands(void)
void M_Init (void);
void M_KeyEvent (int key);
void M_Draw (void);
-void M_ToggleMenu_f (void);
+void M_ToggleMenu (int mode);
//
// menu prog menu
void MP_Init (void);
void MP_KeyEvent (int key);
void MP_Draw (void);
-void MP_ToggleMenu_f (void);
+void MP_ToggleMenu (int mode);
void MP_Shutdown (void);*/
//
void MR_Restart (void);
extern void (*MR_KeyEvent) (int key, int ascii, qboolean downevent);
extern void (*MR_Draw) (void);
-extern void (*MR_ToggleMenu_f) (void);
+extern void (*MR_ToggleMenu) (int mode);
extern void (*MR_Shutdown) (void);
typedef struct video_resolution_s