#include "csprogs.h"
#include "libcurl.h"
#include "utf8lib.h"
+#include "menu.h"
char *svc_strings[128] =
{
// check memory integrity
Mem_CheckSentinelsGlobal();
+ // make menu know
+ MR_NewMap();
+
// load the csqc now
if (cl.loadcsqc)
{
// ignore binds while a video is played, let the video system handle the key event
if (cl_videoplaying)
{
- CL_Video_KeyEvent (key, ascii, keydown[key] != 0);
+ if (gamemode == GAME_BLOODOMNICIDE) // menu controls key events
+ MR_KeyEvent(key, ascii, down);
+ else
+ CL_Video_KeyEvent (key, ascii, keydown[key] != 0);
return;
}
}
+void M_NewMap(void)
+{
+}
+
void M_Shutdown(void)
{
// reset key_dest
PRVM_End;
}
+void MP_NewMap(void)
+{
+ PRVM_Begin;
+ PRVM_SetProg(PRVM_MENUPROG);
+ if (prog->funcoffsets.m_newmap)
+ PRVM_ExecuteProgram(prog->funcoffsets.m_newmap,"m_newmap() required");
+ PRVM_End;
+}
+
void MP_Shutdown (void)
{
PRVM_Begin;
void (*MR_Draw) (void);
void (*MR_ToggleMenu) (int mode);
void (*MR_Shutdown) (void);
+void (*MR_NewMap) (void);
void MR_SetRouting(qboolean forceold)
{
MR_Draw = M_Draw;
MR_ToggleMenu = M_ToggleMenu;
MR_Shutdown = M_Shutdown;
+ MR_NewMap = M_NewMap;
// init
if(!m_init)
MR_Draw = MP_Draw;
MR_ToggleMenu = MP_ToggleMenu;
MR_Shutdown = MP_Shutdown;
+ MR_NewMap = MP_NewMap;
if(!mp_init)
{
extern void (*MR_Draw) (void);
extern void (*MR_ToggleMenu) (int mode);
extern void (*MR_Shutdown) (void);
+extern void (*MR_NewMap) (void);
typedef struct video_resolution_s
{
func_t m_keyup; // mqc
func_t m_shutdown; // mqc
func_t m_toggle; // mqc
+ func_t m_newmap; // mqc
}
prvm_prog_funcoffsets_t;
prog->funcoffsets.m_keyup = PRVM_ED_FindFunctionOffset("m_keyup");
prog->funcoffsets.m_shutdown = PRVM_ED_FindFunctionOffset("m_shutdown");
prog->funcoffsets.m_toggle = PRVM_ED_FindFunctionOffset("m_toggle");
+ prog->funcoffsets.m_newmap = PRVM_ED_FindFunctionOffset("m_newmap");
}
// not used