1.1 --- a/extensions/bintools/msvc8/bintools.vcproj Sat Jun 16 01:34:41 2007 +0000
1.2 +++ b/extensions/bintools/msvc8/bintools.vcproj Sat Jun 16 01:35:13 2007 +0000
1.3 @@ -200,6 +200,10 @@
1.4 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
1.5 UniqueIdentifier="{C06F7BFF-18EE-4994-8572-D6383011354B}"
1.6 >
1.7 + <File
1.8 + RelativePath="..\version.rc"
1.9 + >
1.10 + </File>
1.11 </Filter>
1.12 <Filter
1.13 Name="BinTools"
2.1 --- a/extensions/bintools/sdk/smsdk_config.h Sat Jun 16 01:34:41 2007 +0000
2.2 +++ b/extensions/bintools/sdk/smsdk_config.h Sat Jun 16 01:35:13 2007 +0000
2.3 @@ -18,6 +18,7 @@
2.4
2.5 #ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
2.6 #define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
2.7 +#include "svn_version.h"
2.8
2.9 /**
2.10 * @file smsdk_config.h
2.11 @@ -25,9 +26,9 @@
2.12 */
2.13
2.14 /* Basic information exposed publicly */
2.15 -#define SMEXT_CONF_NAME "Sample Extension"
2.16 -#define SMEXT_CONF_DESCRIPTION "Sample extension to help developers"
2.17 -#define SMEXT_CONF_VERSION "0.0.0.0"
2.18 +#define SMEXT_CONF_NAME "BinTools"
2.19 +#define SMEXT_CONF_DESCRIPTION "Low-level C/C++ Calling API"
2.20 +#define SMEXT_CONF_VERSION SVN_FULL_VERSION
2.21 #define SMEXT_CONF_AUTHOR "AlliedModders"
2.22 #define SMEXT_CONF_URL "http://www.sourcemod.net/"
2.23 #define SMEXT_CONF_LOGTAG "SAMPLE"
2.24 @@ -45,4 +46,11 @@
2.25 */
2.26 //#define SMEXT_CONF_METAMOD
2.27
2.28 +/** Enable interfaces you want to use here by uncommenting lines */
2.29 +//#define SMEXT_ENABLE_FORWARDSYS
2.30 +//#define SMEXT_ENABLE_HANDLESYS
2.31 +//#define SMEXT_ENABLE_PLAYERHELPERS
2.32 +//#define SMEXT_ENABLE_DBMANAGER
2.33 +//#define SMEXT_ENABLE_GAMECONF
2.34 +
2.35 #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
3.1 --- a/extensions/bintools/sdk/smsdk_ext.cpp Sat Jun 16 01:34:41 2007 +0000
3.2 +++ b/extensions/bintools/sdk/smsdk_ext.cpp Sat Jun 16 01:35:13 2007 +0000
3.3 @@ -25,11 +25,29 @@
3.4 * @brief Contains wrappers for making Extensions easier to write.
3.5 */
3.6
3.7 +IExtension *myself = NULL; /**< Ourself */
3.8 IShareSys *g_pShareSys = NULL; /**< Share system */
3.9 -IExtension *myself = NULL; /**< Ourself */
3.10 +IShareSys *sharesys = NULL; /**< Share system */
3.11 +ISourceMod *g_pSM = NULL; /**< SourceMod helpers */
3.12 +ISourceMod *smutils = NULL; /**< SourceMod helpers */
3.13 +
3.14 +#if defined SMEXT_ENABLE_FORWARDSYS
3.15 +IForwardManager *g_pForwards = NULL; /**< Forward system */
3.16 +IForwardManager *forwards = NULL; /**< Forward system */
3.17 +#endif
3.18 +#if defined SMEXT_ENABLE_HANDLESYS
3.19 IHandleSys *g_pHandleSys = NULL; /**< Handle system */
3.20 -ISourceMod *g_pSM = NULL; /**< SourceMod helpers */
3.21 -IForwardManager *g_pForwards = NULL; /**< Forward system */
3.22 +IHandleSys *handlesys = NULL; /**< Handle system */
3.23 +#endif
3.24 +#if defined SMEXT_ENABLE_PLAYERHELPERS
3.25 +IPlayerManager *playerhelpers = NULL; /**< Player helpers */
3.26 +#endif //SMEXT_ENABLE_PLAYERHELPERS
3.27 +#if defined SMEXT_ENABLE_DBMANAGER
3.28 +IDBManager *dbi = NULL; /**< DB Manager */
3.29 +#endif //SMEXT_ENABLE_DBMANAGER
3.30 +#if defined SMEXT_ENABLE_GAMECONF
3.31 +IGameConfigManager *gameconfs = NULL; /**< Game config manager */
3.32 +#endif //SMEXT_ENABLE_DBMANAGER
3.33
3.34 /** Exports the main interface */
3.35 PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI()
3.36 @@ -48,7 +66,7 @@
3.37
3.38 bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late)
3.39 {
3.40 - g_pShareSys = sys;
3.41 + g_pShareSys = sharesys = sys;
3.42 myself = me;
3.43
3.44 #if defined SMEXT_CONF_METAMOD
3.45 @@ -63,10 +81,25 @@
3.46 return false;
3.47 }
3.48 #endif
3.49 -
3.50 + SM_GET_IFACE(SOURCEMOD, g_pSM);
3.51 + smutils = g_pSM;
3.52 +#if defined SMEXT_ENABLE_HANDLESYS
3.53 SM_GET_IFACE(HANDLESYSTEM, g_pHandleSys);
3.54 - SM_GET_IFACE(SOURCEMOD, g_pSM);
3.55 + handlesys = g_pHandleSys;
3.56 +#endif
3.57 +#if defined SMEXT_ENABLE_FORWARDSYS
3.58 SM_GET_IFACE(FORWARDMANAGER, g_pForwards);
3.59 + forwards = g_pForwards;
3.60 +#endif
3.61 +#if defined SMEXT_ENABLE_PLAYERHELPERS
3.62 + SM_GET_IFACE(PLAYERMANAGER, playerhelpers);
3.63 +#endif
3.64 +#if defined SMEXT_ENABLE_DBMANAGER
3.65 + SM_GET_IFACE(DBI, dbi);
3.66 +#endif
3.67 +#if defined SMEXT_ENABLE_GAMECONF
3.68 + SM_GET_IFACE(GAMECONFIG, gameconfs);
3.69 +#endif
3.70
3.71 if (SDK_OnLoad(error, maxlength, late))
3.72 {
4.1 --- a/extensions/bintools/sdk/smsdk_ext.h Sat Jun 16 01:34:41 2007 +0000
4.2 +++ b/extensions/bintools/sdk/smsdk_ext.h Sat Jun 16 01:35:13 2007 +0000
4.3 @@ -30,7 +30,18 @@
4.4 #include <sp_vm_api.h>
4.5 #include <sm_platform.h>
4.6 #include <ISourceMod.h>
4.7 +#if defined SMEXT_ENABLE_FORWARDSYS
4.8 #include <IForwardSys.h>
4.9 +#endif //SMEXT_ENABLE_FORWARDSYS
4.10 +#if defined SMEXT_ENABLE_PLAYERHELPERS
4.11 +#include <IPlayerHelpers.h>
4.12 +#endif //SMEXT_ENABLE_PlAYERHELPERS
4.13 +#if defined SMEXT_ENABLE_DBMANAGER
4.14 +#include <IDBDriver.h>
4.15 +#endif //SMEXT_ENABLE_DBMANAGER
4.16 +#if defined SMEXT_ENABLE_GAMECONF
4.17 +#include <IGameConfigs.h>
4.18 +#endif
4.19
4.20 #if defined SMEXT_CONF_METAMOD
4.21 #include <ISmmPlugin.h>
4.22 @@ -108,7 +119,7 @@
4.23 virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
4.24 #endif
4.25
4.26 -public: // IExtensionInterface
4.27 +public: //IExtensionInterface
4.28 virtual bool OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late);
4.29 virtual void OnExtensionUnload();
4.30 virtual void OnExtensionsAllLoaded();
4.31 @@ -138,9 +149,9 @@
4.32 /** Returns date string */
4.33 virtual const char *GetExtensionDateString();
4.34 #if defined SMEXT_CONF_METAMOD
4.35 -public: // ISmmPlugin
4.36 +public: //ISmmPlugin
4.37 /** Called when the extension is attached to Metamod. */
4.38 - virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
4.39 + virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late);
4.40 /** Returns the author to MM */
4.41 virtual const char *GetAuthor();
4.42 /** Returns the name to MM */
4.43 @@ -158,11 +169,11 @@
4.44 /** Returns the logtag to MM */
4.45 virtual const char *GetLogTag();
4.46 /** Called on unload */
4.47 - virtual bool Unload(char *error, size_t maxlen);
4.48 + virtual bool Unload(char *error, size_t maxlength);
4.49 /** Called on pause */
4.50 - virtual bool Pause(char *error, size_t maxlen);
4.51 + virtual bool Pause(char *error, size_t maxlength);
4.52 /** Called on unpause */
4.53 - virtual bool Unpause(char *error, size_t maxlen);
4.54 + virtual bool Unpause(char *error, size_t maxlength);
4.55 private:
4.56 bool m_SourceMMLoaded;
4.57 bool m_WeAreUnloaded;
4.58 @@ -171,12 +182,31 @@
4.59 };
4.60
4.61 extern SDKExtension *g_pExtensionIface;
4.62 +extern IExtension *myself;
4.63
4.64 extern IShareSys *g_pShareSys;
4.65 -extern IExtension *myself;
4.66 +extern IShareSys *sharesys; /* Note: Newer name */
4.67 +extern ISourceMod *g_pSM;
4.68 +extern ISourceMod *smutils; /* Note: Newer name */
4.69 +
4.70 +/* Optional interfaces are below */
4.71 +#if defined SMEXT_ENABLE_FORWARDSYS
4.72 +extern IForwardManager *g_pForwards;
4.73 +extern IForwardManager *forwards; /* Note: Newer name */
4.74 +#endif //SMEXT_ENABLE_FORWARDSYS
4.75 +#if defined SMEXT_ENABLE_HANDLESYS
4.76 extern IHandleSys *g_pHandleSys;
4.77 -extern ISourceMod *g_pSM;
4.78 -extern IForwardManager *g_pForwards;
4.79 +extern IHandleSys *handlesys; /* Note: Newer name */
4.80 +#endif //SMEXT_ENABLE_HANDLESYS
4.81 +#if defined SMEXT_ENABLE_PLAYERHELPERS
4.82 +extern IPlayerManager *playerhelpers;
4.83 +#endif //SMEXT_ENABLE_PLAYERHELPERS
4.84 +#if defined SMEXT_ENABLE_DBMANAGER
4.85 +extern IDBManager *dbi;
4.86 +#endif //SMEXT_ENABLE_DBMANAGER
4.87 +#if defined SMEXT_ENABLE_GAMECONF
4.88 +extern IGameConfigManager *gameconfs;
4.89 +#endif //SMEXT_ENABLE_DBMANAGER
4.90
4.91 #if defined SMEXT_CONF_METAMOD
4.92 PLUGIN_GLOBALVARS();
4.93 @@ -192,7 +222,7 @@
4.94 { \
4.95 if (error) \
4.96 { \
4.97 - snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
4.98 + snprintf(error, maxlength, "Could not find interface: %s (version: %d)", SMINTERFACE_##prefix##_NAME, SMINTERFACE_##prefix##_VERSION); \
4.99 return false; \
4.100 } \
4.101 }
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/extensions/bintools/svn_version.h Sat Jun 16 01:35:13 2007 +0000
5.3 @@ -0,0 +1,12 @@
5.4 +/**
5.5 + * Autogenerated by build scripts
5.6 + */
5.7 +
5.8 +#ifndef _INCLUDE_BINTOOLS_VERSION_H_
5.9 +#define _INCLUDE_BINTOOLS_VERSION_H_
5.10 +
5.11 +
5.12 +#define SVN_FULL_VERSION "1.0.0.431"
5.13 +#define SVN_FILE_VERSION 1,0,0,431
5.14 +
5.15 +#endif //_INCLUDE_BINTOOLS_VERSION_H_
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/extensions/bintools/svn_version.tpl Sat Jun 16 01:35:13 2007 +0000
6.3 @@ -0,0 +1,12 @@
6.4 +/**
6.5 + * Autogenerated by build scripts
6.6 + */
6.7 +
6.8 +#ifndef _INCLUDE_BINTOOLS_VERSION_H_
6.9 +#define _INCLUDE_BINTOOLS_VERSION_H_
6.10 +
6.11 +
6.12 +#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$LOCAL_BUILD$"
6.13 +#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$LOCAL_BUILD$
6.14 +
6.15 +#endif //_INCLUDE_BINTOOLS_VERSION_H_
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/extensions/bintools/version.rc Sat Jun 16 01:35:13 2007 +0000
7.3 @@ -0,0 +1,104 @@
7.4 +// Microsoft Visual C++ generated resource script.
7.5 +//
7.6 +//#include "resource.h"
7.7 +
7.8 +#define APSTUDIO_READONLY_SYMBOLS
7.9 +/////////////////////////////////////////////////////////////////////////////
7.10 +//
7.11 +// Generated from the TEXTINCLUDE 2 resource.
7.12 +//
7.13 +#include "winres.h"
7.14 +
7.15 +#include "svn_version.h"
7.16 +
7.17 +/////////////////////////////////////////////////////////////////////////////
7.18 +#undef APSTUDIO_READONLY_SYMBOLS
7.19 +
7.20 +/////////////////////////////////////////////////////////////////////////////
7.21 +// English (U.S.) resources
7.22 +
7.23 +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
7.24 +#ifdef _WIN32
7.25 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
7.26 +#pragma code_page(1252)
7.27 +#endif //_WIN32
7.28 +
7.29 +/////////////////////////////////////////////////////////////////////////////
7.30 +//
7.31 +// Version
7.32 +//
7.33 +
7.34 +VS_VERSION_INFO VERSIONINFO
7.35 + FILEVERSION SVN_FILE_VERSION
7.36 + PRODUCTVERSION SVN_FILE_VERSION
7.37 + FILEFLAGSMASK 0x17L
7.38 +#ifdef _DEBUG
7.39 + FILEFLAGS 0x1L
7.40 +#else
7.41 + FILEFLAGS 0x0L
7.42 +#endif
7.43 + FILEOS 0x4L
7.44 + FILETYPE 0x2L
7.45 + FILESUBTYPE 0x0L
7.46 +BEGIN
7.47 + BLOCK "StringFileInfo"
7.48 + BEGIN
7.49 + BLOCK "000004b0"
7.50 + BEGIN
7.51 + VALUE "Comments", "BinTools Extension"
7.52 + VALUE "FileDescription", "SourceMod BinTools Extension"
7.53 + VALUE "FileVersion", SVN_FULL_VERSION
7.54 + VALUE "InternalName", "SourceMod BinTools Extension"
7.55 + VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC"
7.56 + VALUE "OriginalFilename", "bintools.ext.dll"
7.57 + VALUE "ProductName", "SourceMod BinTools Extension"
7.58 + VALUE "ProductVersion", SVN_FULL_VERSION
7.59 + END
7.60 + END
7.61 + BLOCK "VarFileInfo"
7.62 + BEGIN
7.63 + VALUE "Translation", 0x0, 1200
7.64 + END
7.65 +END
7.66 +
7.67 +
7.68 +#ifdef APSTUDIO_INVOKED
7.69 +/////////////////////////////////////////////////////////////////////////////
7.70 +//
7.71 +// TEXTINCLUDE
7.72 +//
7.73 +
7.74 +1 TEXTINCLUDE
7.75 +BEGIN
7.76 + "resource.h\0"
7.77 +END
7.78 +
7.79 +2 TEXTINCLUDE
7.80 +BEGIN
7.81 + "#include ""winres.h""\r\n"
7.82 + "\0"
7.83 +END
7.84 +
7.85 +3 TEXTINCLUDE
7.86 +BEGIN
7.87 + "\r\n"
7.88 + "\0"
7.89 +END
7.90 +
7.91 +#endif // APSTUDIO_INVOKED
7.92 +
7.93 +#endif // English (U.S.) resources
7.94 +/////////////////////////////////////////////////////////////////////////////
7.95 +
7.96 +
7.97 +
7.98 +#ifndef APSTUDIO_INVOKED
7.99 +/////////////////////////////////////////////////////////////////////////////
7.100 +//
7.101 +// Generated from the TEXTINCLUDE 3 resource.
7.102 +//
7.103 +
7.104 +
7.105 +/////////////////////////////////////////////////////////////////////////////
7.106 +#endif // not APSTUDIO_INVOKED
7.107 +
8.1 --- a/extensions/geoip/sdk/smsdk_config.h Sat Jun 16 01:34:41 2007 +0000
8.2 +++ b/extensions/geoip/sdk/smsdk_config.h Sat Jun 16 01:35:13 2007 +0000
8.3 @@ -27,7 +27,7 @@
8.4
8.5 /* Basic information exposed publicly */
8.6 #define SMEXT_CONF_NAME "GeoIP"
8.7 -#define SMEXT_CONF_DESCRIPTION "NO IDEA WHAT THIS MODULE DOES" //:TODO:
8.8 +#define SMEXT_CONF_DESCRIPTION "Geographical IP information"
8.9 #define SMEXT_CONF_VERSION SVN_FULL_VERSION
8.10 #define SMEXT_CONF_AUTHOR "AlliedModders"
8.11 #define SMEXT_CONF_URL "http://www.sourcemod.net/"
8.12 @@ -46,4 +46,11 @@
8.13 */
8.14 //#define SMEXT_CONF_METAMOD
8.15
8.16 +/** Enable interfaces you want to use here by uncommenting lines */
8.17 +//#define SMEXT_ENABLE_FORWARDSYS
8.18 +//#define SMEXT_ENABLE_HANDLESYS
8.19 +//#define SMEXT_ENABLE_PLAYERHELPERS
8.20 +//#define SMEXT_ENABLE_DBMANAGER
8.21 +//#define SMEXT_ENABLE_GAMECONF
8.22 +
8.23 #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
9.1 --- a/extensions/geoip/sdk/smsdk_ext.cpp Sat Jun 16 01:34:41 2007 +0000
9.2 +++ b/extensions/geoip/sdk/smsdk_ext.cpp Sat Jun 16 01:35:13 2007 +0000
9.3 @@ -25,11 +25,29 @@
9.4 * @brief Contains wrappers for making Extensions easier to write.
9.5 */
9.6
9.7 +IExtension *myself = NULL; /**< Ourself */
9.8 IShareSys *g_pShareSys = NULL; /**< Share system */
9.9 -IExtension *myself = NULL; /**< Ourself */
9.10 +IShareSys *sharesys = NULL; /**< Share system */
9.11 +ISourceMod *g_pSM = NULL; /**< SourceMod helpers */
9.12 +ISourceMod *smutils = NULL; /**< SourceMod helpers */
9.13 +
9.14 +#if defined SMEXT_ENABLE_FORWARDSYS
9.15 +IForwardManager *g_pForwards = NULL; /**< Forward system */
9.16 +IForwardManager *forwards = NULL; /**< Forward system */
9.17 +#endif
9.18 +#if defined SMEXT_ENABLE_HANDLESYS
9.19 IHandleSys *g_pHandleSys = NULL; /**< Handle system */
9.20 -ISourceMod *g_pSM = NULL; /**< SourceMod helpers */
9.21 -IForwardManager *g_pForwards = NULL; /**< Forward system */
9.22 +IHandleSys *handlesys = NULL; /**< Handle system */
9.23 +#endif
9.24 +#if defined SMEXT_ENABLE_PLAYERHELPERS
9.25 +IPlayerManager *playerhelpers = NULL; /**< Player helpers */
9.26 +#endif //SMEXT_ENABLE_PLAYERHELPERS
9.27 +#if defined SMEXT_ENABLE_DBMANAGER
9.28 +IDBManager *dbi = NULL; /**< DB Manager */
9.29 +#endif //SMEXT_ENABLE_DBMANAGER
9.30 +#if defined SMEXT_ENABLE_GAMECONF
9.31 +IGameConfigManager *gameconfs = NULL; /**< Game config manager */
9.32 +#endif //SMEXT_ENABLE_DBMANAGER
9.33
9.34 /** Exports the main interface */
9.35 PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI()
9.36 @@ -48,7 +66,7 @@
9.37
9.38 bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late)
9.39 {
9.40 - g_pShareSys = sys;
9.41 + g_pShareSys = sharesys = sys;
9.42 myself = me;
9.43
9.44 #if defined SMEXT_CONF_METAMOD
9.45 @@ -63,10 +81,25 @@
9.46 return false;
9.47 }
9.48 #endif
9.49 -
9.50 + SM_GET_IFACE(SOURCEMOD, g_pSM);
9.51 + smutils = g_pSM;
9.52 +#if defined SMEXT_ENABLE_HANDLESYS
9.53 SM_GET_IFACE(HANDLESYSTEM, g_pHandleSys);
9.54 - SM_GET_IFACE(SOURCEMOD, g_pSM);
9.55 + handlesys = g_pHandleSys;
9.56 +#endif
9.57 +#if defined SMEXT_ENABLE_FORWARDSYS
9.58 SM_GET_IFACE(FORWARDMANAGER, g_pForwards);
9.59 + forwards = g_pForwards;
9.60 +#endif
9.61 +#if defined SMEXT_ENABLE_PLAYERHELPERS
9.62 + SM_GET_IFACE(PLAYERMANAGER, playerhelpers);
9.63 +#endif
9.64 +#if defined SMEXT_ENABLE_DBMANAGER
9.65 + SM_GET_IFACE(DBI, dbi);
9.66 +#endif
9.67 +#if defined SMEXT_ENABLE_GAMECONF
9.68 + SM_GET_IFACE(GAMECONFIG, gameconfs);
9.69 +#endif
9.70
9.71 if (SDK_OnLoad(error, maxlength, late))
9.72 {
9.73 @@ -217,7 +250,7 @@
9.74 return SDK_OnMetamodUnload(error, maxlen);
9.75 }
9.76
9.77 -bool SDKExtension::Pause(char *error, size_t maxlength)
9.78 +bool SDKExtension::Pause(char *error, size_t maxlen)
9.79 {
9.80 if (!m_WeGotPauseChange)
9.81 {
10.1 --- a/extensions/geoip/sdk/smsdk_ext.h Sat Jun 16 01:34:41 2007 +0000
10.2 +++ b/extensions/geoip/sdk/smsdk_ext.h Sat Jun 16 01:35:13 2007 +0000
10.3 @@ -30,7 +30,18 @@
10.4 #include <sp_vm_api.h>
10.5 #include <sm_platform.h>
10.6 #include <ISourceMod.h>
10.7 +#if defined SMEXT_ENABLE_FORWARDSYS
10.8 #include <IForwardSys.h>
10.9 +#endif //SMEXT_ENABLE_FORWARDSYS
10.10 +#if defined SMEXT_ENABLE_PLAYERHELPERS
10.11 +#include <IPlayerHelpers.h>
10.12 +#endif //SMEXT_ENABLE_PlAYERHELPERS
10.13 +#if defined SMEXT_ENABLE_DBMANAGER
10.14 +#include <IDBDriver.h>
10.15 +#endif //SMEXT_ENABLE_DBMANAGER
10.16 +#if defined SMEXT_ENABLE_GAMECONF
10.17 +#include <IGameConfigs.h>
10.18 +#endif
10.19
10.20 #if defined SMEXT_CONF_METAMOD
10.21 #include <ISmmPlugin.h>
10.22 @@ -108,7 +119,7 @@
10.23 virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t maxlength);
10.24 #endif
10.25
10.26 -public: // IExtensionInterface
10.27 +public: //IExtensionInterface
10.28 virtual bool OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, size_t maxlength, bool late);
10.29 virtual void OnExtensionUnload();
10.30 virtual void OnExtensionsAllLoaded();
10.31 @@ -138,9 +149,9 @@
10.32 /** Returns date string */
10.33 virtual const char *GetExtensionDateString();
10.34 #if defined SMEXT_CONF_METAMOD
10.35 -public: // ISmmPlugin
10.36 +public: //ISmmPlugin
10.37 /** Called when the extension is attached to Metamod. */
10.38 - virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
10.39 + virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late);
10.40 /** Returns the author to MM */
10.41 virtual const char *GetAuthor();
10.42 /** Returns the name to MM */
10.43 @@ -158,11 +169,11 @@
10.44 /** Returns the logtag to MM */
10.45 virtual const char *GetLogTag();
10.46 /** Called on unload */
10.47 - virtual bool Unload(char *error, size_t maxlen);
10.48 + virtual bool Unload(char *error, size_t maxlength);
10.49 /** Called on pause */
10.50 - virtual bool Pause(char *error, size_t maxlen);
10.51 + virtual bool Pause(char *error, size_t maxlength);
10.52 /** Called on unpause */
10.53 - virtual bool Unpause(char *error, size_t maxlen);
10.54 + virtual bool Unpause(char *error, size_t maxlength);
10.55 private:
10.56 bool m_SourceMMLoaded;
10.57 bool m_WeAreUnloaded;
10.58 @@ -171,12 +182,31 @@
10.59 };
10.60
10.61 extern SDKExtension *g_pExtensionIface;
10.62 +extern IExtension *myself;
10.63
10.64 extern IShareSys *g_pShareSys;
10.65 -extern IExtension *myself;
10.66 +extern IShareSys *sharesys; /* Note: Newer name */
10.67 +extern ISourceMod *g_pSM;
10.68 +extern ISourceMod *smutils; /* Note: Newer name */
10.69 +
10.70 +/* Optional interfaces are below */
10.71 +#if defined SMEXT_ENABLE_FORWARDSYS
10.72 +extern IForwardManager *g_pForwards;
10.73 +extern IForwardManager *forwards; /* Note: Newer name */
10.74 +#endif //SMEXT_ENABLE_FORWARDSYS
10.75 +#if defined SMEXT_ENABLE_HANDLESYS
10.76 extern IHandleSys *g_pHandleSys;
10.77 -extern ISourceMod *g_pSM;
10.78 -extern IForwardManager *g_pForwards;
10.79 +extern IHandleSys *handlesys; /* Note: Newer name */
10.80 +#endif //SMEXT_ENABLE_HANDLESYS
10.81 +#if defined SMEXT_ENABLE_PLAYERHELPERS
10.82 +extern IPlayerManager *playerhelpers;
10.83 +#endif //SMEXT_ENABLE_PLAYERHELPERS
10.84 +#if defined SMEXT_ENABLE_DBMANAGER
10.85 +extern IDBManager *dbi;
10.86 +#endif //SMEXT_ENABLE_DBMANAGER
10.87 +#if defined SMEXT_ENABLE_GAMECONF
10.88 +extern IGameConfigManager *gameconfs;
10.89 +#endif //SMEXT_ENABLE_DBMANAGER
10.90
10.91 #if defined SMEXT_CONF_METAMOD
10.92 PLUGIN_GLOBALVARS();
10.93 @@ -192,7 +222,7 @@
10.94 { \
10.95 if (error) \
10.96 { \
10.97 - snprintf(error, maxlength, "Could not find interface: %s", SMINTERFACE_##prefix##_NAME); \
10.98 + snprintf(error, maxlength, "Could not find interface: %s (version: %d)", SMINTERFACE_##prefix##_NAME, SMINTERFACE_##prefix##_VERSION); \
10.99 return false; \
10.100 } \
10.101 }