From d9b768e2cfad643e882599e7a35cfef97d7c501a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 29 Aug 2004 19:39:18 +0000 Subject: [PATCH] Added new SDK version --- dlls/cstrike/amxxmodule.cpp | 4 ++++ dlls/cstrike/amxxmodule.h | 27 +++++++++++++++++++++------ dlls/fun/amxxmodule.cpp | 4 ++++ dlls/fun/amxxmodule.h | 27 +++++++++++++++++++++------ 4 files changed, 50 insertions(+), 12 deletions(-) diff --git a/dlls/cstrike/amxxmodule.cpp b/dlls/cstrike/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/cstrike/amxxmodule.cpp +++ b/dlls/cstrike/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/cstrike/amxxmodule.h b/dlls/cstrike/amxxmodule.h index b548edf1..35534730 100755 --- a/dlls/cstrike/amxxmodule.h +++ b/dlls/cstrike/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/fun/amxxmodule.cpp b/dlls/fun/amxxmodule.cpp index b021ab49..a11e5052 100755 --- a/dlls/fun/amxxmodule.cpp +++ b/dlls/fun/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/fun/amxxmodule.h b/dlls/fun/amxxmodule.h index b548edf1..35534730 100755 --- a/dlls/fun/amxxmodule.h +++ b/dlls/fun/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__