From 4e9de62da69513ee8b9e73bd37a4db159331f1a8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 29 Aug 2004 19:51:38 +0000 Subject: [PATCH] Added new SDK version --- dlls/csstats2/csstats/amxxmodule.cpp | 4 ++++ dlls/csstats2/csstats/amxxmodule.h | 15 +++++++++++++++ dlls/dod2/dodfun/amxxmodule.cpp | 4 ++++ dlls/dod2/dodfun/amxxmodule.h | 15 +++++++++++++++ dlls/dod2/dodx/amxxmodule.cpp | 4 ++++ dlls/dod2/dodx/amxxmodule.h | 15 +++++++++++++++ dlls/fakemeta/sdk/amxxmodule.h | 18 ++++++++++++++++++ dlls/geoip/amxxmodule.cpp | 4 ++++ dlls/geoip/amxxmodule.h | 27 +++++++++++++++++++++------ dlls/mssql/amxxmodule.cpp | 4 ++++ dlls/mssql/amxxmodule.h | 27 +++++++++++++++++++++------ dlls/ns/ns/amxxmodule.h | 27 +++++++++++++++++++++------ dlls/pgsql/amxxmodule.cpp | 4 ++++ dlls/pgsql/amxxmodule.h | 27 +++++++++++++++++++++------ dlls/sockets/amxxmodule.cpp | 4 ++++ dlls/sockets/amxxmodule.h | 15 +++++++++++++++ dlls/tfc/tfcx/amxxmodule.cpp | 4 ++++ dlls/tfc/tfcx/amxxmodule.h | 15 +++++++++++++++ dlls/ts/tsx/amxxmodule.cpp | 4 ++++ dlls/ts/tsx/amxxmodule.h | 15 +++++++++++++++ 20 files changed, 228 insertions(+), 24 deletions(-) diff --git a/dlls/csstats2/csstats/amxxmodule.cpp b/dlls/csstats2/csstats/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/csstats2/csstats/amxxmodule.cpp +++ b/dlls/csstats2/csstats/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/csstats2/csstats/amxxmodule.h b/dlls/csstats2/csstats/amxxmodule.h index 0d41cab2..35534730 100755 --- a/dlls/csstats2/csstats/amxxmodule.h +++ b/dlls/csstats2/csstats/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/dod2/dodfun/amxxmodule.cpp b/dlls/dod2/dodfun/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/dod2/dodfun/amxxmodule.cpp +++ b/dlls/dod2/dodfun/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/dod2/dodfun/amxxmodule.h b/dlls/dod2/dodfun/amxxmodule.h index 0d41cab2..35534730 100755 --- a/dlls/dod2/dodfun/amxxmodule.h +++ b/dlls/dod2/dodfun/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/dod2/dodx/amxxmodule.cpp b/dlls/dod2/dodx/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/dod2/dodx/amxxmodule.cpp +++ b/dlls/dod2/dodx/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/dod2/dodx/amxxmodule.h b/dlls/dod2/dodx/amxxmodule.h index 0d41cab2..35534730 100755 --- a/dlls/dod2/dodx/amxxmodule.h +++ b/dlls/dod2/dodx/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/fakemeta/sdk/amxxmodule.h b/dlls/fakemeta/sdk/amxxmodule.h index 3b861b6e..35534730 100755 --- a/dlls/fakemeta/sdk/amxxmodule.h +++ b/dlls/fakemeta/sdk/amxxmodule.h @@ -240,11 +240,22 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** #ifdef USE_METAMOD void UTIL_LogPrintf( char *fmt, ... ); +void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage); +short FixedSigned16( float value, float scale ); +unsigned short FixedUnsigned16( float value, float scale ); #ifdef FN_META_QUERY void FN_META_QUERY(void); @@ -1944,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1951,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2002,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2095,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2146,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/geoip/amxxmodule.cpp b/dlls/geoip/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/geoip/amxxmodule.cpp +++ b/dlls/geoip/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/geoip/amxxmodule.h b/dlls/geoip/amxxmodule.h index b548edf1..35534730 100755 --- a/dlls/geoip/amxxmodule.h +++ b/dlls/geoip/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -257,9 +265,9 @@ void FN_META_QUERY(void); void FN_META_ATTACH(void); #endif // FN_META_ATTACH -#ifdef FN_META_DETTACH -void FN_META_DETTACH(void); -#endif // FN_META_DETTACH +#ifdef FN_META_DETACH +void FN_META_DETACH(void); +#endif // FN_META_DETACH @@ -1869,9 +1877,9 @@ void FN_AMXX_QUERY(void); void FN_AMXX_ATTACH(void); #endif // FN_AMXX_ATTACH -#ifdef FN_AMXX_DETTACH -void FN_AMXX_DETTACH(void); -#endif // FN_AMXX_DETTACH +#ifdef FN_AMXX_DETACH +void FN_AMXX_DETACH(void); +#endif // FN_AMXX_DETACH #ifdef FN_AMXX_PLUGINSLOADED void FN_AMXX_PLUGINSLOADED(void); @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/mssql/amxxmodule.cpp b/dlls/mssql/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/mssql/amxxmodule.cpp +++ b/dlls/mssql/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/mssql/amxxmodule.h b/dlls/mssql/amxxmodule.h index b548edf1..35534730 100755 --- a/dlls/mssql/amxxmodule.h +++ b/dlls/mssql/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -257,9 +265,9 @@ void FN_META_QUERY(void); void FN_META_ATTACH(void); #endif // FN_META_ATTACH -#ifdef FN_META_DETTACH -void FN_META_DETTACH(void); -#endif // FN_META_DETTACH +#ifdef FN_META_DETACH +void FN_META_DETACH(void); +#endif // FN_META_DETACH @@ -1869,9 +1877,9 @@ void FN_AMXX_QUERY(void); void FN_AMXX_ATTACH(void); #endif // FN_AMXX_ATTACH -#ifdef FN_AMXX_DETTACH -void FN_AMXX_DETTACH(void); -#endif // FN_AMXX_DETTACH +#ifdef FN_AMXX_DETACH +void FN_AMXX_DETACH(void); +#endif // FN_AMXX_DETACH #ifdef FN_AMXX_PLUGINSLOADED void FN_AMXX_PLUGINSLOADED(void); @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/ns/ns/amxxmodule.h b/dlls/ns/ns/amxxmodule.h index b548edf1..35534730 100755 --- a/dlls/ns/ns/amxxmodule.h +++ b/dlls/ns/ns/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -257,9 +265,9 @@ void FN_META_QUERY(void); void FN_META_ATTACH(void); #endif // FN_META_ATTACH -#ifdef FN_META_DETTACH -void FN_META_DETTACH(void); -#endif // FN_META_DETTACH +#ifdef FN_META_DETACH +void FN_META_DETACH(void); +#endif // FN_META_DETACH @@ -1869,9 +1877,9 @@ void FN_AMXX_QUERY(void); void FN_AMXX_ATTACH(void); #endif // FN_AMXX_ATTACH -#ifdef FN_AMXX_DETTACH -void FN_AMXX_DETTACH(void); -#endif // FN_AMXX_DETTACH +#ifdef FN_AMXX_DETACH +void FN_AMXX_DETACH(void); +#endif // FN_AMXX_DETACH #ifdef FN_AMXX_PLUGINSLOADED void FN_AMXX_PLUGINSLOADED(void); @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/pgsql/amxxmodule.cpp b/dlls/pgsql/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/pgsql/amxxmodule.cpp +++ b/dlls/pgsql/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/pgsql/amxxmodule.h b/dlls/pgsql/amxxmodule.h index b548edf1..35534730 100755 --- a/dlls/pgsql/amxxmodule.h +++ b/dlls/pgsql/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -257,9 +265,9 @@ void FN_META_QUERY(void); void FN_META_ATTACH(void); #endif // FN_META_ATTACH -#ifdef FN_META_DETTACH -void FN_META_DETTACH(void); -#endif // FN_META_DETTACH +#ifdef FN_META_DETACH +void FN_META_DETACH(void); +#endif // FN_META_DETACH @@ -1869,9 +1877,9 @@ void FN_AMXX_QUERY(void); void FN_AMXX_ATTACH(void); #endif // FN_AMXX_ATTACH -#ifdef FN_AMXX_DETTACH -void FN_AMXX_DETTACH(void); -#endif // FN_AMXX_DETTACH +#ifdef FN_AMXX_DETACH +void FN_AMXX_DETACH(void); +#endif // FN_AMXX_DETACH #ifdef FN_AMXX_PLUGINSLOADED void FN_AMXX_PLUGINSLOADED(void); @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/sockets/amxxmodule.cpp b/dlls/sockets/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/sockets/amxxmodule.cpp +++ b/dlls/sockets/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/sockets/amxxmodule.h b/dlls/sockets/amxxmodule.h index 0d41cab2..35534730 100755 --- a/dlls/sockets/amxxmodule.h +++ b/dlls/sockets/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/tfc/tfcx/amxxmodule.cpp b/dlls/tfc/tfcx/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/tfc/tfcx/amxxmodule.cpp +++ b/dlls/tfc/tfcx/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/tfc/tfcx/amxxmodule.h b/dlls/tfc/tfcx/amxxmodule.h index 0d41cab2..35534730 100755 --- a/dlls/tfc/tfcx/amxxmodule.h +++ b/dlls/tfc/tfcx/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__ diff --git a/dlls/ts/tsx/amxxmodule.cpp b/dlls/ts/tsx/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/ts/tsx/amxxmodule.cpp +++ b/dlls/ts/tsx/amxxmodule.cpp @@ -2477,6 +2477,8 @@ PFN_CELL_TO_REAL g_fn_CellToReal; PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +PFN_AMX_FINDNATIVE g_fn_AmxFindNative; // *** Exports *** C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo) @@ -2520,6 +2522,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("PrintSrvConsole", g_fn_PrintSrvConsole, PFN_PRINT_SRVCONSOLE); REQFUNC("GetModname", g_fn_GetModname, PFN_GET_MODNAME); REQFUNC("Log", g_fn_Log, PFN_LOG); + REQFUNC("MergeDefinitionFile", g_fn_MergeDefinition_File, PFN_MERGEDEFINITION_FILE); // Amx scripts REQFUNC("GetAmxScript", g_fn_GetAmxScript, PFN_GET_AMXSCRIPT); @@ -2540,6 +2543,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc) REQFUNC("amx_Execv", g_fn_AmxExecv, PFN_AMX_EXECV); REQFUNC("amx_FindPublic", g_fn_AmxFindPublic, PFN_AMX_FINDPUBLIC); REQFUNC("amx_Allot", g_fn_AmxAllot, PFN_AMX_ALLOT); + REQFUNC("amx_FindNative", g_fn_AmxFindNative, PFN_AMX_FINDNATIVE); // Natives / Forwards REQFUNC("AddNatives", g_fn_AddNatives, PFN_ADD_NATIVES); diff --git a/dlls/ts/tsx/amxxmodule.h b/dlls/ts/tsx/amxxmodule.h index 0d41cab2..35534730 100755 --- a/dlls/ts/tsx/amxxmodule.h +++ b/dlls/ts/tsx/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -1947,6 +1955,7 @@ typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*in typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -1954,6 +1963,7 @@ typedef REAL (*PFN_CELL_TO_REAL) (cell /*x*/); typedef int (*PFN_REGISTER_SPFORWARD) (AMX * /*amx*/, int /*func*/, ... /*params*/); typedef int (*PFN_REGISTER_SPFORWARD_BYNAME) (AMX * /*amx*/, const char * /*funcName*/, ... /*params*/); typedef void (*PFN_UNREGISTER_SPFORWARD) (int /*id*/); +typedef void (*PFN_MERGEDEFINITION_FILE) (const char * /*filename*/); extern PFN_ADD_NATIVES g_fn_AddNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; @@ -2005,6 +2015,8 @@ extern PFN_CELL_TO_REAL g_fn_CellToReal; extern PFN_REGISTER_SPFORWARD g_fn_RegisterSPForward; extern PFN_REGISTER_SPFORWARD_BYNAME g_fn_RegisterSPForwardByName; extern PFN_UNREGISTER_SPFORWARD g_fn_UnregisterSPForward; +extern PFN_MERGEDEFINITION_FILE g_fn_MergeDefinition_File; +extern PFN_AMX_FINDNATIVE g_fn_AmxFindNative; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems @@ -2098,8 +2110,10 @@ void MF_Log(const char *fmt, ...); #define MF_AmxExecv g_fn_AmxExecv #define MF_AmxFindPublic g_fn_AmxFindPublic #define MF_AmxAllot g_fn_AmxAllot +#define MF_AmxFindNative g_fn_AmxFindNative #define MF_LoadAmxScript g_fn_LoadAmxScript #define MF_UnloadAmxScript g_fn_UnloadAmxScript +#define MF_MergeDefinitionFile g_fn_MergeDefinition_File #define amx_ctof g_fn_CellToReal #define amx_ftoc g_fn_RealToCell #define MF_RegisterSPForwardByName g_fn_RegisterSPForwardByName @@ -2149,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__