#define TYPE_BOTH 3
static cvar_t forceqmenu = { 0, "forceqmenu", "0", "enables the quake menu instead of the quakec menu.dat (if present)" };
+static cvar_t menu_progs = { 0, "menu_progs", "menu.dat", "name of quakec menu.dat file" };
static int NehGameType;
prog->ExecuteProgram = MVM_ExecuteProgram;
// allocate the mempools
- prog->progs_mempool = Mem_AllocPool(M_PROG_FILENAME, 0, NULL);
+ prog->progs_mempool = Mem_AllocPool(menu_progs.string, 0, NULL);
- PRVM_Prog_Load(prog, M_PROG_FILENAME, NULL, 0, m_numrequiredfunc, m_required_func, m_numrequiredfields, m_required_fields, m_numrequiredglobals, m_required_globals);
+ PRVM_Prog_Load(prog, menu_progs.string, NULL, 0, m_numrequiredfunc, m_required_func, m_numrequiredfields, m_required_fields, m_numrequiredglobals, m_required_globals);
// note: OP_STATE is not supported by menu qc, we don't even try to detect
// it here
void MR_SetRouting(qboolean forceold)
{
// if the menu prog isnt available or forceqmenu ist set, use the old menu
- if(!FS_FileExists(M_PROG_FILENAME) || forceqmenu.integer || forceold)
+ if(!FS_FileExists(menu_progs.string) || forceqmenu.integer || forceold)
{
// set menu router function pointers
MR_KeyEvent = M_KeyEvent;
// set router console commands
Cvar_RegisterVariable (&forceqmenu);
Cvar_RegisterVariable (&menu_options_colorcontrol_correctionvalue);
+ Cvar_RegisterVariable (&menu_progs);
Cmd_AddCommand ("menu_restart",MR_Restart, "restart menu system (reloads menu.dat)");
Cmd_AddCommand ("togglemenu", Call_MR_ToggleMenu_f, "opens or closes menu");
}