From 6617ef3ad86da7ff69687fa59b14fdb3c3acf0a1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 16 Sep 2007 03:32:00 +0000 Subject: [PATCH] added two more interfaces to sample sdk --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401437 --- public/sample_ext/sdk/smsdk_config.h | 2 ++ public/sample_ext/sdk/smsdk_ext.cpp | 6 ++++++ public/sample_ext/sdk/smsdk_ext.h | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/public/sample_ext/sdk/smsdk_config.h b/public/sample_ext/sdk/smsdk_config.h index fe44ccf3..0acb3b71 100644 --- a/public/sample_ext/sdk/smsdk_config.h +++ b/public/sample_ext/sdk/smsdk_config.h @@ -69,5 +69,7 @@ //#define SMEXT_ENABLE_TIMERSYS //#define SMEXT_ENABLE_THREADER //#define SMEXT_ENABLE_LIBSYS +//#define SMEXT_ENABLE_ADTFACTORY +//#define SMEXT_ENABLE_PLUGINSYS #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ diff --git a/public/sample_ext/sdk/smsdk_ext.cpp b/public/sample_ext/sdk/smsdk_ext.cpp index a4b80a10..344f319a 100644 --- a/public/sample_ext/sdk/smsdk_ext.cpp +++ b/public/sample_ext/sdk/smsdk_ext.cpp @@ -79,6 +79,9 @@ IThreader *threader = NULL; #if defined SMEXT_ENABLE_LIBSYS ILibrarySys *libsys = NULL; #endif +#if defined SMEXT_ENABLE_PLUGINSYS +SourceMod::IPluginManager *plsys; +#endif /** Exports the main interface */ PLATFORM_EXTERN_C IExtensionInterface *GetSMExtAPI() @@ -149,6 +152,9 @@ bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error, #if defined SMEXT_ENABLE_LIBSYS SM_GET_IFACE(LIBRARYSYS, libsys); #endif +#if defined SMEXT_ENABLE_PLUGINSYS + SM_GET_IFACE(PLUGINSYSTEM, plsys); +#endif if (SDK_OnLoad(error, maxlength, late)) { diff --git a/public/sample_ext/sdk/smsdk_ext.h b/public/sample_ext/sdk/smsdk_ext.h index f75071ac..5758d54b 100644 --- a/public/sample_ext/sdk/smsdk_ext.h +++ b/public/sample_ext/sdk/smsdk_ext.h @@ -73,6 +73,9 @@ #if defined SMEXT_ENABLE_LIBSYS #include #endif +#if defined SMEXT_ENABLE_PLUGINSYS +#include +#endif #if defined SMEXT_CONF_METAMOD #include @@ -256,6 +259,9 @@ extern IThreader *threader; #if defined SMEXT_ENABLE_LIBSYS extern ILibrarySys *libsys; #endif +#if defined SMEXT_ENABLE_PLUGINSYS +extern SourceMod::IPluginManager *plsys; +#endif #if defined SMEXT_CONF_METAMOD PLUGIN_GLOBALVARS();