From: black Date: Sun, 28 Nov 2004 13:10:38 +0000 (+0000) Subject: -Removed the NG Menu part, since it isnt used anymore (the old layout X-Git-Tag: xonotic-v0.1.0preview~5339 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=783c61300adf71a38a5c9edb323d6f5ff90ac51d;p=xonotic%2Fdarkplaces.git -Removed the NG Menu part, since it isnt used anymore (the old layout works generally better) -Fixed a bug in VM_max - it used one of the old VM's macro. -Added a memory leak output of the "strzone" zone when the menu is shutdown (only displayed if developer >= 2) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4797 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/keys.c b/keys.c index 52363ee0..dd9e182e 100644 --- a/keys.c +++ b/keys.c @@ -1002,7 +1002,6 @@ Key_Event (int key, char ascii, qboolean down) case key_menu: MR_Keydown (key, ascii); break; - case key_game: Key_Console (key, ascii); break; diff --git a/menu.c b/menu.c index 081c1299..c7c08302 100644 --- a/menu.c +++ b/menu.c @@ -4171,9 +4171,6 @@ mfunction_t *PRVM_ED_FindFunction(const char *); #define M_F_INIT "m_init" #define M_F_KEYDOWN "m_keydown" #define M_F_DRAW "m_draw" -// ng_menu function names -#define M_F_DISPLAY "m_display" -#define M_F_HIDE "m_hide" // normal menu names (rest) #define M_F_TOGGLE "m_toggle" #define M_F_SHUTDOWN "m_shutdown" @@ -4182,12 +4179,7 @@ static char *m_required_func[] = { M_F_INIT, M_F_KEYDOWN, M_F_DRAW, -#ifdef NG_MENU -M_F_DISPLAY, -M_F_HIDE, -#else M_F_TOGGLE, -#endif M_F_SHUTDOWN, }; @@ -4327,7 +4319,6 @@ void MP_Init (void) void MP_Restart(void) { - MP_Init(); } diff --git a/prvm_cmds.c b/prvm_cmds.c index e9d9afe6..b6c6b16c 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1590,7 +1590,7 @@ void VM_max (void) for (i = 1;i < prog->argc;i++) if (PRVM_G_FLOAT((OFS_PARM0+i*3)) > f) f = PRVM_G_FLOAT((OFS_PARM0+i*3)); - G_FLOAT(OFS_RETURN) = f; + PRVM_G_FLOAT(OFS_RETURN) = f; } else PRVM_ERROR("VM_max: %s must supply at least 2 floats\n", PRVM_NAME); @@ -2829,6 +2829,14 @@ void VM_Cmd_Init(void) void VM_Cmd_Reset(void) { //Mem_EmptyPool(VM_STRINGS_MEMPOOL); + if( developer.integer >= 2 && VM_STRINGS_MEMPOOL ) { + memheader_t *header; + int i; + + for( i = 0, header = VM_STRINGS_MEMPOOL->chain ; header ; header = header->next, i++ ) + Con_DPrintf( "Leaked string %i (size: %i): %.*s\n", i, header->size, header->size, ((char*)header) + sizeof( memheader_t ) ); + } + Mem_FreePool(&VM_STRINGS_MEMPOOL); VM_Search_Reset(); VM_Files_CloseAll();