M_ToggleMenu
================
*/
-void M_ToggleMenu(int mode)
+static void M_ToggleMenu(int mode)
{
m_entersound = true;
}
-void M_Menu_Demos_f (void)
+static void M_Menu_Demos_f (void)
{
key_dest = key_menu;
m_state = m_demo;
static void M_Demo_Key (int k, int ascii)
{
+ char vabuf[1024];
switch (k)
{
case K_ESCAPE:
S_LocalSound ("sound/misc/menu2.wav");
m_state = m_none;
key_dest = key_game;
- Cbuf_AddText (va ("playdemo %s\n", NehahraDemos[demo_cursor].name));
+ Cbuf_AddText (va(vabuf, sizeof(vabuf), "playdemo %s\n", NehahraDemos[demo_cursor].name));
return;
case K_UPARROW:
{
int f;
cachepic_t *p;
+ char vabuf[1024];
if (m_missingdata)
{
{
if (MAIN_ITEMS == 7 && y1 == 4)
y1++;
- M_DrawPic (0, y2, va("gfx/menu/mainmenu%i", y1));
+ M_DrawPic (0, y2, va(vabuf, sizeof(vabuf), "gfx/menu/mainmenu%i", y1));
y2 += 40;
}
if (MAIN_ITEMS == 7 && m_main_cursor > 2)
y3 = m_main_cursor + 2;
else
y3 = m_main_cursor + 1;
- M_DrawPic (0, 120 + m_main_cursor * 40, va("gfx/menu/mainmenu%iselected", y3));
+ M_DrawPic (0, 120 + m_main_cursor * 40, va(vabuf, sizeof(vabuf), "gfx/menu/mainmenu%iselected", y3));
return;
}
f = (int)(realtime * 10)%6;
- M_DrawPic (54, 32 + m_main_cursor * 20, va("gfx/menudot%i", f+1));
+ M_DrawPic (54, 32 + m_main_cursor * 20, va(vabuf, sizeof(vabuf), "gfx/menudot%i", f+1));
}
static void M_SinglePlayer_Draw (void)
{
cachepic_t *p;
+ char vabuf[1024];
M_Background(320, 200);
f = (int)(realtime * 10)%6;
- M_DrawPic (54, 32 + m_singleplayer_cursor * 20, va("gfx/menudot%i", f+1));
+ M_DrawPic (54, 32 + m_singleplayer_cursor * 20, va(vabuf, sizeof(vabuf), "gfx/menudot%i", f+1));
}
}
buf[len] = 0;
t = buf;
// version
- COM_ParseToken_Simple(&t, false, false);
+ COM_ParseToken_Simple(&t, false, false, true);
//version = atoi(com_token);
// description
- COM_ParseToken_Simple(&t, false, false);
+ COM_ParseToken_Simple(&t, false, false, true);
strlcpy (m_filenames[i], com_token, sizeof (m_filenames[i]));
// change _ back to space
static void M_Load_Key (int k, int ascii)
{
+ char vabuf[1024];
switch (k)
{
case K_ESCAPE:
key_dest = key_game;
// issue the load command
- Cbuf_AddText (va ("load s%i\n", load_cursor) );
+ Cbuf_AddText (va(vabuf, sizeof(vabuf), "load s%i\n", load_cursor) );
return;
case K_UPARROW:
static void M_Save_Key (int k, int ascii)
{
+ char vabuf[1024];
switch (k)
{
case K_ESCAPE:
case K_ENTER:
m_state = m_none;
key_dest = key_game;
- Cbuf_AddText (va("save s%i\n", load_cursor));
+ Cbuf_AddText (va(vabuf, sizeof(vabuf), "save s%i\n", load_cursor));
return;
case K_UPARROW:
{
int y;
cachepic_t *p;
+ char vabuf[1024];
M_Background(640, 480);
p = Draw_CachePic ("gfx/menu/tb-episodes");
M_DrawPic (640/2 - p->width/2, 40, "gfx/menu/tb-episodes");
for (y = 0; y < EPISODE_ITEMS; y++){
- M_DrawPic (0, 160 + y * 40, va("gfx/menu/episode%i", y+1));
+ M_DrawPic (0, 160 + y * 40, va(vabuf, sizeof(vabuf), "gfx/menu/episode%i", y+1));
}
- M_DrawPic (0, 120 + (m_episode_cursor + 1) * 40, va("gfx/menu/episode%iselected", m_episode_cursor + 1));
+ M_DrawPic (0, 120 + (m_episode_cursor + 1) * 40, va(vabuf, sizeof(vabuf), "gfx/menu/episode%iselected", m_episode_cursor + 1));
}
static void M_Transfusion_Episode_Key (int key, int ascii)
{
int y;
cachepic_t *p;
+ char vabuf[1024];
M_Background(640, 480);
p = Draw_CachePic ("gfx/menu/tb-difficulty");
for (y = 0; y < SKILL_ITEMS; y++)
{
- M_DrawPic (0, 180 + y * 40, va("gfx/menu/difficulty%i", y+1));
+ M_DrawPic (0, 180 + y * 40, va(vabuf, sizeof(vabuf), "gfx/menu/difficulty%i", y+1));
}
- M_DrawPic (0, 140 + (m_skill_cursor + 1) *40, va("gfx/menu/difficulty%iselected", m_skill_cursor + 1));
+ M_DrawPic (0, 140 + (m_skill_cursor + 1) *40, va(vabuf, sizeof(vabuf), "gfx/menu/difficulty%iselected", m_skill_cursor + 1));
}
static void M_Transfusion_Skill_Key (int key, int ascii)
{
int f;
cachepic_t *p;
+ char vabuf[1024];
if (gamemode == GAME_TRANSFUSION)
{
p = Draw_CachePic ("gfx/menu/tb-online");
M_DrawPic (640/2 - p->width/2, 140, "gfx/menu/tb-online");
for (f = 1; f <= MULTIPLAYER_ITEMS; f++)
- M_DrawPic (0, 180 + f*40, va("gfx/menu/online%i", f));
- M_DrawPic (0, 220 + m_multiplayer_cursor * 40, va("gfx/menu/online%iselected", m_multiplayer_cursor + 1));
+ M_DrawPic (0, 180 + f*40, va(vabuf, sizeof(vabuf), "gfx/menu/online%i", f));
+ M_DrawPic (0, 220 + m_multiplayer_cursor * 40, va(vabuf, sizeof(vabuf), "gfx/menu/online%iselected", m_multiplayer_cursor + 1));
return;
}
M_Background(320, 200);
f = (int)(realtime * 10)%6;
- M_DrawPic (54, 32 + m_multiplayer_cursor * 20, va("gfx/menudot%i", f+1));
+ M_DrawPic (54, 32 + m_multiplayer_cursor * 20, va(vabuf, sizeof(vabuf), "gfx/menudot%i", f+1));
}
{
int i, j;
cachepic_t *p;
+ char vabuf[1024];
M_Background(320, 200);
}
M_Print(64, 124-8, "Network speed limit");
- M_Print(168, 124, va("%i (%s)", setup_rate, setup_ratetable[setup_rateindex(setup_rate)].name));
+ M_Print(168, 124, va(vabuf, sizeof(vabuf), "%i (%s)", setup_rate, setup_ratetable[setup_rateindex(setup_rate)].name));
M_DrawTextBox (64, 140-8, 14, 1);
M_Print(72, 140, "Accept Changes");
static void M_Setup_Key (int k, int ascii)
{
int l;
+ char vabuf[1024];
switch (k)
{
// setup_cursor == 4 (Accept changes)
if (strcmp(cl_name.string, setup_myname) != 0)
- Cbuf_AddText ( va ("name \"%s\"\n", setup_myname) );
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "name \"%s\"\n", setup_myname) );
if (setup_top != setup_oldtop || setup_bottom != setup_oldbottom)
- Cbuf_AddText( va ("color %i %i\n", setup_top, setup_bottom) );
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "color %i %i\n", setup_top, setup_bottom) );
if (setup_rate != setup_oldrate)
- Cbuf_AddText(va("rate %i\n", setup_rate));
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "rate %i\n", setup_rate));
m_entersound = true;
M_Menu_MultiPlayer_f ();
strlcpy(keystring, "???", sizeof(keystring));
else
{
+ char tinystr[2];
keystring[0] = 0;
for (j = 0;j < NUMKEYS;j++)
{
{
if (j > 0)
strlcat(keystring, " or ", sizeof(keystring));
- strlcat(keystring, Key_KeynumToString (keys[j]), sizeof(keystring));
+ strlcat(keystring, Key_KeynumToString (keys[j], tinystr, sizeof(tinystr)), sizeof(keystring));
}
}
}
{
char cmd[80];
int keys[NUMKEYS];
+ char tinystr[2];
if (bind_grab)
{ // defining a key
}
else //if (k != '`')
{
- dpsnprintf (cmd, sizeof(cmd), "bind \"%s\" \"%s\"\n", Key_KeynumToString (k), bindnames[keys_cursor][0]);
+ dpsnprintf (cmd, sizeof(cmd), "bind \"%s\" \"%s\"\n", Key_KeynumToString (k, tinystr, sizeof(tinystr)), bindnames[keys_cursor][0]);
Cbuf_InsertText (cmd);
}
{
int t;
cachepic_t *p;
+ char vabuf[1024];
if(!!vid_fullscreen.integer != menu_video_resolutions_forfullscreen)
{
// Current and Proposed Resolution
M_Print(16, video_cursor_table[t] - 12, " Current Resolution");
if (vid_supportrefreshrate && vid.userefreshrate && vid.fullscreen)
- M_Print(220, video_cursor_table[t] - 12, va("%dx%d %.2fhz", vid.width, vid.height, vid.refreshrate));
+ M_Print(220, video_cursor_table[t] - 12, va(vabuf, sizeof(vabuf), "%dx%d %.2fhz", vid.width, vid.height, vid.refreshrate));
else
- M_Print(220, video_cursor_table[t] - 12, va("%dx%d", vid.width, vid.height));
+ M_Print(220, video_cursor_table[t] - 12, va(vabuf, sizeof(vabuf), "%dx%d", vid.width, vid.height));
M_Print(16, video_cursor_table[t], " New Resolution");
- M_Print(220, video_cursor_table[t], va("%dx%d", menu_video_resolutions[menu_video_resolution].width, menu_video_resolutions[menu_video_resolution].height));
- M_Print(96, video_cursor_table[t] + 8, va("Type: %s", menu_video_resolutions[menu_video_resolution].type));
+ M_Print(220, video_cursor_table[t], va(vabuf, sizeof(vabuf), "%dx%d", menu_video_resolutions[menu_video_resolution].width, menu_video_resolutions[menu_video_resolution].height));
+ M_Print(96, video_cursor_table[t] + 8, va(vabuf, sizeof(vabuf), "Type: %s", menu_video_resolutions[menu_video_resolution].type));
t++;
// Bits per pixel
static void M_Help_Draw (void)
{
+ char vabuf[1024];
M_Background(320, 200);
- M_DrawPic (0, 0, va("gfx/help%i", help_page));
+ M_DrawPic (0, 0, va(vabuf, sizeof(vabuf), "gfx/help%i", help_page));
}
int basex;
const char *startJoin;
const char *protocol;
+ char vabuf[1024];
M_Background(320, 200);
else
startJoin = "Join Game";
protocol = "TCP/IP";
- M_Print(basex, 32, va ("%s - %s", startJoin, protocol));
+ M_Print(basex, 32, va(vabuf, sizeof(vabuf), "%s - %s", startJoin, protocol));
basex += 8;
M_Print(basex, lanConfig_cursor_table[0], "Port");
static void M_LanConfig_Key (int key, int ascii)
{
int l;
+ char vabuf[1024];
switch (key)
{
}
if (lanConfig_cursor == 3)
- Cbuf_AddText ( va ("connect \"%s\"\n", lanConfig_joinname) );
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "connect \"%s\"\n", lanConfig_joinname) );
break;
case K_BACKSPACE:
{
cachepic_t *p;
int x;
+ char vabuf[1024];
M_Background(320, 200);
M_Print(160, 40, "begin game");
M_Print(0, 56, " Max players");
- M_Print(160, 56, va("%i", maxplayers) );
+ M_Print(160, 56, va(vabuf, sizeof(vabuf), "%i", maxplayers) );
if (gamemode != GAME_GOODVSBAD2)
{
if (fraglimit.integer == 0)
M_Print(160, 88, "none");
else
- M_Print(160, 88, va("%i frags", fraglimit.integer));
+ M_Print(160, 88, va(vabuf, sizeof(vabuf), "%i frags", fraglimit.integer));
M_Print(0, 96, " Time Limit");
if (timelimit.integer == 0)
M_Print(160, 96, "none");
else
- M_Print(160, 96, va("%i minutes", timelimit.integer));
+ M_Print(160, 96, va(vabuf, sizeof(vabuf), "%i minutes", timelimit.integer));
}
M_Print(0, 104, " Public server");
M_Print(160, 104, (sv_public.integer == 0) ? "no" : "yes");
M_Print(0, 112, " Server maxrate");
- M_Print(160, 112, va("%i", sv_maxrate.integer));
+ M_Print(160, 112, va(vabuf, sizeof(vabuf), "%i", sv_maxrate.integer));
M_Print(0, 128, " Server name");
M_DrawTextBox (0, 132, 38, 1);
{
int l;
char hostnamebuf[128];
+ char vabuf[1024];
switch (key)
{
if (gameoptions_cursor == 0)
{
if (sv.active)
- Cbuf_AddText ("disconnect\n");
- Cbuf_AddText ( va ("maxplayers %u\n", maxplayers) );
+ Cbuf_AddText("disconnect\n");
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "maxplayers %u\n", maxplayers) );
- Cbuf_AddText ( va ("map %s\n", gameoptions_levels->levels[gameoptions_levels->episodes[startepisode].firstLevel + startlevel].name) );
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "map %s\n", gameoptions_levels->levels[gameoptions_levels->episodes[startepisode].firstLevel + startlevel].name) );
return;
}
int n, y, visible, start, end, numplayers, maxplayers;
cachepic_t *p;
const char *s;
+ char vabuf[1024];
// use as much vertical space as available
if (gamemode == GAME_TRANSFUSION)
M_Background(640, vid_conheight.integer);
// scroll the list as the cursor moves
ServerList_GetPlayerStatistics(&numplayers, &maxplayers);
- s = va("%i/%i masters %i/%i servers %i/%i players", masterreplycount, masterquerycount, serverreplycount, serverquerycount, numplayers, maxplayers);
+ s = va(vabuf, sizeof(vabuf), "%i/%i masters %i/%i servers %i/%i players", masterreplycount, masterquerycount, serverreplycount, serverquerycount, numplayers, maxplayers);
M_PrintRed((640 - strlen(s) * 8) / 2, 32, s);
if (*m_return_reason)
M_Print(16, menu_height - 8, m_return_reason);
static void M_ServerList_Key(int k, int ascii)
{
+ char vabuf[1024];
switch (k)
{
case K_ESCAPE:
case K_ENTER:
S_LocalSound ("sound/misc/menu2.wav");
if (serverlist_viewcount)
- Cbuf_AddText(va("connect \"%s\"\n", ServerList_GetViewEntry(slist_cursor)->info.cname));
+ Cbuf_AddText(va(vabuf, sizeof(vabuf), "connect \"%s\"\n", ServerList_GetViewEntry(slist_cursor)->info.cname));
break;
default:
static int modlist_count = 0;
static modlist_entry_t modlist[MODLIST_TOTALSIZE];
-void ModList_RebuildList(void)
+static void ModList_RebuildList(void)
{
int i,j;
stringlist_t list;
stringlistfreecontents(&list);
}
-void ModList_Enable (void)
+static void ModList_Enable (void)
{
int i;
int numgamedirs;
void M_ToggleMenu(int mode);
static void M_Shutdown(void);
-void M_Init (void)
+static void M_Init (void)
{
menuplyr_load = true;
menuplyr_pixels = NULL;
void M_Draw (void)
{
+ char vabuf[1024];
if (key_dest != key_menu && key_dest != key_menu_grabbed)
m_state = m_none;
g = (int)(realtime * 64)%96;
scale_y_rate = (float)(g+1) / 96;
top_offset = (g+12)/12;
- p = Draw_CachePic (va("gfx/menu/blooddrip%i", top_offset));
+ p = Draw_CachePic (va(vabuf, sizeof(vabuf), "gfx/menu/blooddrip%i", top_offset));
drop1 = Draw_CachePic ("gfx/menu/blooddrop1");
drop2 = Draw_CachePic ("gfx/menu/blooddrop2");
drop3 = Draw_CachePic ("gfx/menu/blooddrop3");
DrawQ_Pic (scale_x + 557, scale_y_repeat * .9425 + scale_y + scale_y_rate * scale_y_repeat, drop1, 0, 0, 1, 1, 1, 1, 0);
DrawQ_Pic (scale_x + 606, scale_y_repeat * .5 + scale_y + scale_y_rate * scale_y_repeat, drop2, 0, 0, 1, 1, 1, 1, 0);
}
- DrawQ_Pic (scale_x, -1, Draw_CachePic (va("gfx/menu/blooddrip%i", top_offset)), 0, 0, 1, 1, 1, 1, 0);
+ DrawQ_Pic (scale_x, -1, Draw_CachePic (va(vabuf, sizeof(vabuf), "gfx/menu/blooddrip%i", top_offset)), 0, 0, 1, 1, 1, 1, 0);
}
}
}
}
-void M_NewMap(void)
+static void M_NewMap(void)
{
}
void MR_SetRouting (qboolean forceold);
-void MP_Error(const char *format, ...) DP_FUNC_PRINTF(1);
-void MP_Error(const char *format, ...)
+void MVM_error_cmd(const char *format, ...) DP_FUNC_PRINTF(1);
+void MVM_error_cmd(const char *format, ...)
{
+ prvm_prog_t *prog = MVM_prog;
static qboolean processingError = false;
char errorstring[MAX_INPUTLINE];
va_list argptr;
if( !processingError ) {
processingError = true;
- PRVM_Crash();
+ PRVM_Crash(prog);
processingError = false;
} else {
- Con_Printf( "Menu_Error: Recursive call to MP_Error (from PRVM_Crash)!\n" );
+ Con_Printf( "Menu_Error: Recursive call to MVM_error_cmd (from PRVM_Crash)!\n" );
}
// fall back to the normal menu
Host_AbortCurrentFrame();
}
-void MP_KeyEvent (int key, int ascii, qboolean downevent)
+static void MVM_begin_increase_edicts(prvm_prog_t *prog)
+{
+}
+
+static void MVM_end_increase_edicts(prvm_prog_t *prog)
+{
+}
+
+static void MVM_init_edict(prvm_prog_t *prog, prvm_edict_t *edict)
+{
+}
+
+static void MVM_free_edict(prvm_prog_t *prog, prvm_edict_t *ed)
+{
+}
+
+static void MVM_count_edicts(prvm_prog_t *prog)
+{
+ int i;
+ prvm_edict_t *ent;
+ int active;
+
+ active = 0;
+ for (i=0 ; i<prog->num_edicts ; i++)
+ {
+ ent = PRVM_EDICT_NUM(i);
+ if (ent->priv.required->free)
+ continue;
+ active++;
+ }
+
+ Con_Printf("num_edicts:%3i\n", prog->num_edicts);
+ Con_Printf("active :%3i\n", active);
+}
+
+static qboolean MVM_load_edict(prvm_prog_t *prog, prvm_edict_t *ent)
+{
+ return true;
+}
+
+static void MP_KeyEvent (int key, int ascii, qboolean downevent)
{
- PRVM_Begin;
- PRVM_SetProg(PRVM_MENUPROG);
+ prvm_prog_t *prog = MVM_prog;
// pass key
prog->globals.generic[OFS_PARM0] = (float) key;
prog->globals.generic[OFS_PARM1] = (float) ascii;
if (downevent)
- PRVM_ExecuteProgram(PRVM_menufunction(m_keydown),"m_keydown(float key, float ascii) required");
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_keydown),"m_keydown(float key, float ascii) required");
else if (PRVM_menufunction(m_keyup))
- PRVM_ExecuteProgram(PRVM_menufunction(m_keyup),"m_keyup(float key, float ascii) required");
-
- PRVM_End;
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_keyup),"m_keyup(float key, float ascii) required");
}
-void MP_Draw (void)
+static void MP_Draw (void)
{
+ prvm_prog_t *prog = MVM_prog;
// declarations that are needed right now
float oldquality;
// TODO: this needs to be exposed to R_SetView (or something similar) ASAP [2/5/2008 Andreas]
r_refdef.scene.time = realtime;
- PRVM_Begin;
- PRVM_SetProg(PRVM_MENUPROG);
-
// FIXME: this really shouldnt error out lest we have a very broken refdef state...?
// or does it kill the server too?
- PRVM_ExecuteProgram(PRVM_menufunction(m_draw),"m_draw() required");
-
- PRVM_End;
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_draw),"m_draw() required");
// TODO: imo this should be moved into scene, too [1/27/2008 Andreas]
r_refdef.view.quality = oldquality;
R_SelectScene( RST_CLIENT );
}
-void MP_ToggleMenu(int mode)
+static void MP_ToggleMenu(int mode)
{
- PRVM_Begin;
- PRVM_SetProg(PRVM_MENUPROG);
+ prvm_prog_t *prog = MVM_prog;
prog->globals.generic[OFS_PARM0] = (float) mode;
- PRVM_ExecuteProgram(PRVM_menufunction(m_toggle),"m_toggle() required");
-
- PRVM_End;
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_toggle),"m_toggle(float mode) required");
}
-void MP_NewMap(void)
+static void MP_NewMap(void)
{
- PRVM_Begin;
- PRVM_SetProg(PRVM_MENUPROG);
+ prvm_prog_t *prog = MVM_prog;
if (PRVM_menufunction(m_newmap))
- PRVM_ExecuteProgram(PRVM_menufunction(m_newmap),"m_newmap() required");
- PRVM_End;
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_newmap),"m_newmap() required");
}
-void MP_Shutdown (void)
+static void MP_Shutdown (void)
{
- PRVM_Begin;
- PRVM_SetProg(PRVM_MENUPROG);
+ prvm_prog_t *prog = MVM_prog;
- PRVM_ExecuteProgram(PRVM_menufunction(m_shutdown),"m_shutdown() required");
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_shutdown),"m_shutdown() required");
// reset key_dest
key_dest = key_game;
// AK not using this cause Im not sure whether this is useful at all instead :
- PRVM_ResetProg();
-
- PRVM_End;
+ PRVM_Prog_Reset(prog);
}
-void MP_Init (void)
+static void MP_Init (void)
{
- PRVM_Begin;
- PRVM_InitProg(PRVM_MENUPROG);
+ prvm_prog_t *prog = MVM_prog;
+ PRVM_Prog_Init(prog);
prog->edictprivate_size = 0; // no private struct used
- prog->name = M_NAME;
+ prog->name = "menu";
prog->num_edicts = 1;
prog->limit_edicts = M_MAX_EDICTS;
prog->extensionstring = vm_m_extensions;
prog->builtins = vm_m_builtins;
prog->numbuiltins = vm_m_numbuiltins;
- prog->init_cmd = VM_M_Cmd_Init;
- prog->reset_cmd = VM_M_Cmd_Reset;
- prog->error_cmd = MP_Error;
- prog->ExecuteProgram = MVM_ExecuteProgram;
+
+ // all callbacks must be defined (pointers are not checked before calling)
+ prog->begin_increase_edicts = MVM_begin_increase_edicts;
+ prog->end_increase_edicts = MVM_end_increase_edicts;
+ prog->init_edict = MVM_init_edict;
+ prog->free_edict = MVM_free_edict;
+ prog->count_edicts = MVM_count_edicts;
+ prog->load_edict = MVM_load_edict;
+ prog->init_cmd = MVM_init_cmd;
+ prog->reset_cmd = MVM_reset_cmd;
+ prog->error_cmd = MVM_error_cmd;
+ prog->ExecuteProgram = MVM_ExecuteProgram;
// allocate the mempools
prog->progs_mempool = Mem_AllocPool(M_PROG_FILENAME, 0, NULL);
- PRVM_LoadProgs(M_PROG_FILENAME, m_numrequiredfunc, m_required_func, m_numrequiredfields, m_required_fields, m_numrequiredglobals, m_required_globals);
+ PRVM_Prog_Load(prog, M_PROG_FILENAME, 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
in_client_mouse = true;
// call the prog init
- PRVM_ExecuteProgram(PRVM_menufunction(m_init),"m_init() required");
-
- PRVM_End;
+ prog->ExecuteProgram(prog, PRVM_menufunction(m_init),"m_init() required");
}
//============================================================================
MR_SetRouting (FALSE);
}
-void Call_MR_ToggleMenu_f(void)
+static void Call_MR_ToggleMenu_f(void)
{
int m;
m = ((Cmd_Argc() < 2) ? -1 : atoi(Cmd_Argv(1)));