This commit is contained in:
Pavol Marko 2004-04-24 20:05:08 +00:00
parent 3b0d52c8d3
commit 4e7209eeab
2 changed files with 18 additions and 5 deletions

View File

@ -55,7 +55,7 @@
#include "CCmd.h" #include "CCmd.h"
#include "CMenu.h" #include "CMenu.h"
#include "CEvent.h" #include "CEvent.h"
#include "FakeMeta.h" #include "fakemeta.h"
#define AMX_VERSION "0.2" #define AMX_VERSION "0.2"
@ -281,7 +281,7 @@ extern int FF_PluginPrecache;
extern int FF_PluginLog; extern int FF_PluginLog;
extern int FF_PluginEnd; extern int FF_PluginEnd;
extern int FF_InconsistentFile; extern int FF_InconsistentFile;
extern int FF_ClientAuthorized; extern int FF_ClientAuthorized;
extern CFakeMeta g_FakeMeta; extern CFakeMeta g_FakeMeta;
#endif // AMXMODX_H #endif // AMXMODX_H

View File

@ -134,8 +134,8 @@ int load_amxscript(AMX *amx, void **program, const char *filename, char error[64
#ifdef JIT #ifdef JIT
void *np = new unsigned char[ amx->code_size ]; void *np = new char[ amx->code_size ];
void *rt = new unsigned char[ amx->reloc_size ]; void *rt = new char[ amx->reloc_size ];
if ( !np || (!rt && amx->reloc_size > 0) ) if ( !np || (!rt && amx->reloc_size > 0) )
{ {
delete[] np; delete[] np;
@ -147,7 +147,7 @@ int load_amxscript(AMX *amx, void **program, const char *filename, char error[64
if (amx_InitJIT(amx, rt, np) == AMX_ERR_NONE) if (amx_InitJIT(amx, rt, np) == AMX_ERR_NONE)
{ {
//amx->base = (unsigned char FAR *)realloc( np, amx->code_size ); //amx->base = (unsigned char FAR *)realloc( np, amx->code_size );
amx->base = new unsigned char FAR[ amx->code_size ]; amx->base = new unsigned char[ amx->code_size ];
if ( amx->base ) if ( amx->base )
memcpy( amx->base , np , amx->code_size ); memcpy( amx->base , np , amx->code_size );
delete[] np; delete[] np;
@ -758,6 +758,11 @@ float MNF_GetPlayerHealth(int id)
return (GET_PLAYER_POINTER_I(id)->pEdict->v.health); return (GET_PLAYER_POINTER_I(id)->pEdict->v.health);
} }
void MNF_HiddenStuff()
{
// :TODO:
}
// Fnptr Request function for the new interface // Fnptr Request function for the new interface
const char *g_LastRequestedFunc = NULL; const char *g_LastRequestedFunc = NULL;
#define REGISTER_FUNC(name, func) { name, (void*)func }, #define REGISTER_FUNC(name, func) { name, (void*)func },
@ -792,6 +797,12 @@ void *Module_ReqFnptr(const char *funcName)
REGISTER_FUNC("CopyAmxMemory", MNF_CopyAmxMemory) REGISTER_FUNC("CopyAmxMemory", MNF_CopyAmxMemory)
REGISTER_FUNC("GetAmxAddr", get_amxaddr) REGISTER_FUNC("GetAmxAddr", get_amxaddr)
// other amx stuff
REGISTER_FUNC("amx_Exec", amx_Exec)
REGISTER_FUNC("amx_Execv", amx_Execv)
REGISTER_FUNC("amx_Allot", amx_Allot)
REGISTER_FUNC("amx_FindPublic", amx_FindPublic)
// Natives / Forwards // Natives / Forwards
REGISTER_FUNC("AddNatives", MNF_AddNatives) REGISTER_FUNC("AddNatives", MNF_AddNatives)
REGISTER_FUNC("RaiseAmxError", amx_RaiseError) REGISTER_FUNC("RaiseAmxError", amx_RaiseError)
@ -826,6 +837,8 @@ void *Module_ReqFnptr(const char *funcName)
REGISTER_FUNC("Deallocator", m_deallocator) REGISTER_FUNC("Deallocator", m_deallocator)
REGISTER_FUNC("Reallocator", m_reallocator) REGISTER_FUNC("Reallocator", m_reallocator)
#endif // MEMORY_TEST #endif // MEMORY_TEST
REGISTER_FUNC("Haha_HiddenStuff", MNF_HiddenStuff)
}; };
// code // code