added two more usable interfaces to the sample extension
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401022
This commit is contained in:
parent
25dc806a2e
commit
1d2f3a9cd5
@ -52,5 +52,7 @@
|
|||||||
//#define SMEXT_ENABLE_DBMANAGER
|
//#define SMEXT_ENABLE_DBMANAGER
|
||||||
//#define SMEXT_ENABLE_GAMECONF
|
//#define SMEXT_ENABLE_GAMECONF
|
||||||
//#define SMEXT_ENABLE_MEMUTILS
|
//#define SMEXT_ENABLE_MEMUTILS
|
||||||
|
//#define SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
//#define SMEXT_ENABLE_TIMERSYS
|
||||||
|
|
||||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||||
|
@ -50,6 +50,12 @@ IGameConfigManager *gameconfs = NULL; /**< Game config manager */
|
|||||||
#endif //SMEXT_ENABLE_DBMANAGER
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
#if defined SMEXT_ENABLE_MEMUTILS
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
IMemoryUtils *memutils = NULL;
|
IMemoryUtils *memutils = NULL;
|
||||||
|
#endif //SMEXT_ENABLE_DBMANAGER
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
IGameHelpers *gamehelpers = NULL;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
ITimerSystem *timersys = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Exports the main interface */
|
/** Exports the main interface */
|
||||||
@ -106,6 +112,12 @@ bool SDKExtension::OnExtensionLoad(IExtension *me, IShareSys *sys, char *error,
|
|||||||
#if defined SMEXT_ENABLE_MEMUTILS
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
SM_GET_IFACE(MEMORYUTILS, memutils);
|
SM_GET_IFACE(MEMORYUTILS, memutils);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
SM_GET_IFACE(GAMEHELPERS, gamehelpers);
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
SM_GET_IFACE(TIMERSYS, timersys);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (SDK_OnLoad(error, maxlength, late))
|
if (SDK_OnLoad(error, maxlength, late))
|
||||||
{
|
{
|
||||||
|
@ -45,6 +45,12 @@
|
|||||||
#if defined SMEXT_ENABLE_MEMUTILS
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
#include <IMemoryUtils.h>
|
#include <IMemoryUtils.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
#include <IGameHelpers.h>
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
#include <ITimerSystem.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
#if defined SMEXT_CONF_METAMOD
|
||||||
#include <ISmmPlugin.h>
|
#include <ISmmPlugin.h>
|
||||||
@ -213,6 +219,12 @@ extern IGameConfigManager *gameconfs;
|
|||||||
#if defined SMEXT_ENABLE_MEMUTILS
|
#if defined SMEXT_ENABLE_MEMUTILS
|
||||||
extern IMemoryUtils *memutils;
|
extern IMemoryUtils *memutils;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_GAMEHELPERS
|
||||||
|
extern IGameHelpers *gamehelpers;
|
||||||
|
#endif
|
||||||
|
#if defined SMEXT_ENABLE_TIMERSYS
|
||||||
|
extern ITimerSystem *timersys;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined SMEXT_CONF_METAMOD
|
#if defined SMEXT_CONF_METAMOD
|
||||||
PLUGIN_GLOBALVARS();
|
PLUGIN_GLOBALVARS();
|
||||||
|
Loading…
Reference in New Issue
Block a user