mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Added requestfunction
This commit is contained in:
parent
611ad2be94
commit
943a75d7e1
@ -2421,9 +2421,6 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
|
|||||||
|
|
||||||
/************* AMXX Stuff *************/
|
/************* AMXX Stuff *************/
|
||||||
|
|
||||||
// *** Types ***
|
|
||||||
typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/);
|
|
||||||
|
|
||||||
// *** Globals ***
|
// *** Globals ***
|
||||||
// Module info
|
// Module info
|
||||||
static amxx_module_info_s g_ModuleInfo =
|
static amxx_module_info_s g_ModuleInfo =
|
||||||
@ -2502,6 +2499,7 @@ PFN_GETPLAYERFLAGS g_fn_GetPlayerFlags;
|
|||||||
PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict;
|
PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict;
|
||||||
PFN_FORMAT g_fn_Format;
|
PFN_FORMAT g_fn_Format;
|
||||||
PFN_REGISTERFUNCTION g_fn_RegisterFunction;
|
PFN_REGISTERFUNCTION g_fn_RegisterFunction;
|
||||||
|
PFN_REQ_FNPTR g_fn_RequestFunction;
|
||||||
|
|
||||||
// *** Exports ***
|
// *** Exports ***
|
||||||
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
|
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
|
||||||
@ -2539,6 +2537,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
|
|||||||
if (!reqFnptrFunc)
|
if (!reqFnptrFunc)
|
||||||
return AMXX_PARAM;
|
return AMXX_PARAM;
|
||||||
|
|
||||||
|
g_fn_RequestFunction = reqFnptrFunc;
|
||||||
|
|
||||||
// Req all known functions
|
// Req all known functions
|
||||||
// Misc
|
// Misc
|
||||||
REQFUNC("BuildPathname", g_fn_BuildPathname, PFN_BUILD_PATHNAME);
|
REQFUNC("BuildPathname", g_fn_BuildPathname, PFN_BUILD_PATHNAME);
|
||||||
|
@ -1883,6 +1883,9 @@ void FN_AMXX_DETACH(void);
|
|||||||
void FN_AMXX_PLUGINSLOADED(void);
|
void FN_AMXX_PLUGINSLOADED(void);
|
||||||
#endif // FN_AMXX_PLUGINSLOADED
|
#endif // FN_AMXX_PLUGINSLOADED
|
||||||
|
|
||||||
|
// *** Types ***
|
||||||
|
typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/);
|
||||||
|
|
||||||
// ***** Module funcs stuff *****
|
// ***** Module funcs stuff *****
|
||||||
enum ForwardExecType
|
enum ForwardExecType
|
||||||
{
|
{
|
||||||
@ -2036,6 +2039,7 @@ extern PFN_GET_PLAYER_EDICT g_fn_GetPlayerEdict;
|
|||||||
extern PFN_FORMAT g_fn_Format;
|
extern PFN_FORMAT g_fn_Format;
|
||||||
extern PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam;
|
extern PFN_GET_PLAYER_TEAM g_fn_GetPlayerTeam;
|
||||||
extern PFN_REGISTERFUNCTION g_fn_RegisterFunction;
|
extern PFN_REGISTERFUNCTION g_fn_RegisterFunction;
|
||||||
|
extern PFN_REQ_FNPTR g_fn_RequestFunction;
|
||||||
|
|
||||||
#ifdef MAY_NEVER_BE_DEFINED
|
#ifdef MAY_NEVER_BE_DEFINED
|
||||||
// Function prototypes for intellisense and similar systems
|
// Function prototypes for intellisense and similar systems
|
||||||
@ -2092,6 +2096,7 @@ int MF_GetPlayerFlags (int id) { }
|
|||||||
edict_t* MF_GetPlayerEdict (int id) { }
|
edict_t* MF_GetPlayerEdict (int id) { }
|
||||||
const char * MF_Format (const char *fmt, ...) { }
|
const char * MF_Format (const char *fmt, ...) { }
|
||||||
void MF_RegisterFunction (void *pfn, const char *description) { }
|
void MF_RegisterFunction (void *pfn, const char *description) { }
|
||||||
|
void * MF_RequestFunction (const char *description) { }
|
||||||
#endif // MAY_NEVER_BE_DEFINED
|
#endif // MAY_NEVER_BE_DEFINED
|
||||||
|
|
||||||
#define MF_AddNatives g_fn_AddNatives
|
#define MF_AddNatives g_fn_AddNatives
|
||||||
@ -2154,6 +2159,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
|
|||||||
#define MF_GetPlayerEdict g_fn_GetPlayerEdict
|
#define MF_GetPlayerEdict g_fn_GetPlayerEdict
|
||||||
#define MF_Format g_fn_Format
|
#define MF_Format g_fn_Format
|
||||||
#define MF_RegisterFunction g_fn_RegisterFunction
|
#define MF_RegisterFunction g_fn_RegisterFunction
|
||||||
|
#define MF_RequestFunction g_fn_RequestFunction;
|
||||||
|
|
||||||
/*** Memory ***/
|
/*** Memory ***/
|
||||||
void *operator new(size_t reportedSize);
|
void *operator new(size_t reportedSize);
|
||||||
|
Loading…
Reference in New Issue
Block a user