Synced Module SDK files with most recent fixes

- Fixed potential issue with Meta_Query
 - Removed debug message from GiveFnptrsToDll that has been present for a long long time

Again I ask why?
This commit is contained in:
Scott Ehlert 2007-03-21 20:22:20 +00:00
parent a004e906dd
commit 118b002ee8
39 changed files with 6271 additions and 5831 deletions

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2774,6 +2785,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2515,6 +2516,7 @@ PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2591,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2638,6 +2641,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR);
@ -2780,6 +2785,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2512,6 +2513,10 @@ PFN_FINDLIBRARY g_fn_FindLibrary;
PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2562,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2587,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2626,10 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2764,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2771,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2512,6 +2513,10 @@ PFN_FINDLIBRARY g_fn_FindLibrary;
PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2562,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2587,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2626,10 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2764,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2771,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2515,6 +2516,7 @@ PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2591,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2638,6 +2641,8 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
REQFUNC_OPT("Allocator", g_fn_Allocator, PFN_ALLOCATOR);
@ -2780,6 +2785,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2513,6 +2514,9 @@ PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2563,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2588,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2627,11 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2766,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2773,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2512,6 +2513,10 @@ PFN_FINDLIBRARY g_fn_FindLibrary;
PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2562,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2587,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2626,10 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2764,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2771,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2512,6 +2513,10 @@ PFN_FINDLIBRARY g_fn_FindLibrary;
PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2562,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2587,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2626,10 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2764,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2771,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/

View File

@ -2284,7 +2284,7 @@ C_DLLEXPORT int Meta_Query(char *ifvers, plugin_info_t **pPlugInfo, mutil_funcs_
}
#ifdef FN_META_QUERY
return FN_META_QUERY();
FN_META_QUERY();
#endif // FN_META_QUERY
return 1;
@ -2327,7 +2327,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
}
#ifdef FN_META_DETACH
return FN_META_DETACH();
FN_META_DETACH();
#endif // FN_META_DETACH
return TRUE;
}
@ -2374,7 +2374,7 @@ C_DLLEXPORT void __stdcall GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine,
gpGlobals = pGlobals;
// NOTE! Have to call logging function _after_ copying into g_engfuncs, so
// that g_engfuncs.pfnAlertMessage() can be resolved properly, heh. :)
UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// UTIL_LogPrintf("[%s] dev: called: GiveFnptrsToDll\n", Plugin_info.logtag);
// --> ** Function core
#ifdef _MSC_VER
@ -2437,6 +2437,7 @@ static amxx_module_info_s g_ModuleInfo =
// Storage for the requested functions
PFN_ADD_NATIVES g_fn_AddNatives;
PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
PFN_BUILD_PATHNAME g_fn_BuildPathname;
PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2512,6 +2513,10 @@ PFN_FINDLIBRARY g_fn_FindLibrary;
PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
PFN_AMX_REREGISTER g_fn_AmxReRegister;
PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
PFN_MESSAGE_BLOCK g_fn_MessageBlock;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2562,6 +2567,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE);
REQFUNC("Format", g_fn_Format, PFN_FORMAT);
REQFUNC("RegisterFunction", g_fn_RegisterFunction, PFN_REGISTERFUNCTION);
REQFUNC("RegisterFunctionEx", g_fn_RegisterFunctionEx, PFN_REGISTERFUNCTIONEX);
// Amx scripts
REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT);
@ -2587,6 +2593,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
// Natives / Forwards
REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES);
REQFUNC("AddNewNatives", g_fn_AddNewNatives, PFN_ADD_NEW_NATIVES);
REQFUNC("RaiseAmxError", g_fn_RaiseAmxError, PFN_RAISE_AMXERROR);
REQFUNC("RegisterForward", g_fn_RegisterForward, PFN_REGISTER_FORWARD);
REQFUNC("RegisterSPForward", g_fn_RegisterSPForward, PFN_REGISTER_SPFORWARD);
@ -2626,10 +2633,15 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("RegAuthFunc", g_fn_RegAuthFunc, PFN_REG_AUTH_FUNC);
REQFUNC("UnregAuthFunc", g_fn_UnregAuthFunc, PFN_UNREG_AUTH_FUNC);
//Added in 1.75
REQFUNC("FindLibrary", g_fn_FindLibrary, PFN_FINDLIBRARY);
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
REQFUNC("AmxReregister", g_fn_AmxReRegister, PFN_AMX_REREGISTER);
REQFUNC("MessageBlock", g_fn_MessageBlock, PFN_MESSAGE_BLOCK);
#ifdef MEMORY_TEST
// Memory
@ -2764,6 +2776,7 @@ void ValidateMacros_DontCallThis_Smiley()
MF_GetPlayerEdict(0);
MF_Format("", 4, "str");
MF_RegisterFunction(NULL, "");
MF_RegisterFunctionEx(NULL, "");
MF_SetPlayerTeamInfo(0, 0, "");
MF_PlayerPropAddr(0, 0);
MF_RegAuthFunc(NULL);
@ -2771,7 +2784,8 @@ void ValidateMacros_DontCallThis_Smiley()
MF_FindLibrary(NULL, LibType_Class);
MF_AddLibraries(NULL, LibType_Class, NULL);
MF_RemoveLibraries(NULL);
MF_OverrideNatives(NULL, "");
MF_OverrideNatives(NULL, NULL);
MF_MessageBlock(0, 0, NULL);
}
#endif

View File

@ -1077,7 +1077,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage
#ifdef FN_EngineFprintf
void FN_EngineFprintf(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf
#ifdef FN_PvAllocEntPrivateData
@ -1141,11 +1141,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo
#endif // FN_GetBonePosition
#ifdef FN_FunctionFromName
unsigned long FN_FunctionFromName(const char *pName);
uint32 FN_FunctionFromName(const char *pName);
#endif // FN_FunctionFromName
#ifdef FN_NameForFunction
const char *FN_NameForFunction(unsigned long function);
const char *FN_NameForFunction(uint32);
#endif // FN_NameForFunction
#ifdef FN_ClientPrintf
@ -1189,7 +1189,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC);
#endif // FN_CRC32_Final
#ifdef FN_RandomLong
long FN_RandomLong(long lLow, long lHigh);
int32 FN_RandomLong(int32 lLow, int32 lHigh);
#endif // FN_RandomLong
#ifdef FN_RandomFloat
@ -1658,11 +1658,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...);
#endif // FN_AlertMessage_Post
#ifdef FN_EngineFprintf_Post
void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...);
void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...);
#endif // FN_EngineFprintf_Post
#ifdef FN_PvAllocEntPrivateData_Post
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb);
void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb);
#endif // FN_PvAllocEntPrivateData_Post
#ifdef FN_PvEntPrivateData_Post
@ -1722,11 +1722,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin
#endif // FN_GetBonePosition_Post
#ifdef FN_FunctionFromName_Post
unsigned long FN_FunctionFromName_Post(const char *pName);
uint32 FN_FunctionFromName_Post(const char *pName);
#endif // FN_FunctionFromName_Post
#ifdef FN_NameForFunction_Post
const char *FN_NameForFunction_Post(unsigned long function);
const char *FN_NameForFunction_Post(uint32);
#endif // FN_NameForFunction_Post
#ifdef FN_ClientPrintf_Post
@ -1770,7 +1770,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC);
#endif // FN_CRC32_Final_Post
#ifdef FN_RandomLong_Post
long FN_RandomLong_Post(long lLow, long lHigh);
int32 FN_RandomLong_Post(int32 lLow, int32 lHigh);
#endif // FN_RandomLong_Post
#ifdef FN_RandomFloat_Post
@ -2095,9 +2095,16 @@ enum LibType
LibType_Class
};
#define MSGBLOCK_SET 0
#define MSGBLOCK_GET 1
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
typedef void (*AUTHORIZEFUNC)(int player, const char *authstring);
typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/);
typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...);
typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...);
typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/);
@ -2183,8 +2190,10 @@ typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const ch
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/);
typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/);
typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR;
extern PFN_GET_AMXADDR g_fn_GetAmxAddr;
@ -2257,11 +2266,13 @@ extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
extern PFN_AMX_REREGISTER g_fn_AmxReRegister;
extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx;
extern PFN_MESSAGE_BLOCK g_fn_MessageBlock;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
// They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED
int MF_AddNatives (const AMX_NATIVE_INFO *list) { }
int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { }
char * MF_BuildPathname (const char * format, ...) { }
char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { }
cell * MF_GetAmxAddr (AMX * amx, cell offset) { }
@ -2328,9 +2339,11 @@ void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; }
void * MF_RegisterFunctionEx (void *pfn, const char *description) { }
void * MF_MessageBlock (int mode, int msg, int *opt) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
#define MF_AddNewNatives g_fn_AddNewNatives
#define MF_BuildPathname g_fn_BuildPathname
#define MF_BuildPathnameR g_fn_BuildPathnameR
#define MF_FormatAmxString g_fn_FormatAmxString
@ -2404,6 +2417,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_GetLocalInfo g_fn_GetLocalInfo
#define MF_AmxReRegister g_fn_AmxReRegister
#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx
#define MF_MessageBlock g_fn_MessageBlock
#ifdef MEMORY_TEST
/*** Memory ***/