added two more usable interfaces to the sample extension
authorDavid Anderson <dvander@alliedmods.net>
Mon Jun 25 15:43:48 2007 +0000 (2007-06-25)
changeset 1016a1ce1f870046
parent 1015 6b27b8e57f47
child 1017 8df42b172692
added two more usable interfaces to the sample extension
public/sample_ext/sdk/smsdk_config.h
public/sample_ext/sdk/smsdk_ext.cpp
public/sample_ext/sdk/smsdk_ext.h
     1.1 --- a/public/sample_ext/sdk/smsdk_config.h	Mon Jun 25 14:58:59 2007 +0000
     1.2 +++ b/public/sample_ext/sdk/smsdk_config.h	Mon Jun 25 15:43:48 2007 +0000
     1.3 @@ -52,5 +52,7 @@
     1.4  //#define SMEXT_ENABLE_DBMANAGER
     1.5  //#define SMEXT_ENABLE_GAMECONF
     1.6  //#define SMEXT_ENABLE_MEMUTILS
     1.7 +//#define SMEXT_ENABLE_GAMEHELPERS
     1.8 +//#define SMEXT_ENABLE_TIMERSYS
     1.9  
    1.10  #endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
     2.1 --- a/public/sample_ext/sdk/smsdk_ext.cpp	Mon Jun 25 14:58:59 2007 +0000
     2.2 +++ b/public/sample_ext/sdk/smsdk_ext.cpp	Mon Jun 25 15:43:48 2007 +0000
     2.3 @@ -50,6 +50,12 @@
     2.4  #endif //SMEXT_ENABLE_DBMANAGER
     2.5  #if defined SMEXT_ENABLE_MEMUTILS
     2.6  IMemoryUtils *memutils = NULL;
     2.7 +#endif //SMEXT_ENABLE_DBMANAGER
     2.8 +#if defined SMEXT_ENABLE_GAMEHELPERS
     2.9 +IGameHelpers *gamehelpers = NULL;
    2.10 +#endif
    2.11 +#if defined SMEXT_ENABLE_TIMERSYS
    2.12 +ITimerSystem *timersys = NULL;
    2.13  #endif
    2.14  
    2.15  /** Exports the main interface */
    2.16 @@ -106,6 +112,12 @@
    2.17  #if defined SMEXT_ENABLE_MEMUTILS
    2.18  	SM_GET_IFACE(MEMORYUTILS, memutils);
    2.19  #endif
    2.20 +#if defined SMEXT_ENABLE_GAMEHELPERS
    2.21 +	SM_GET_IFACE(GAMEHELPERS, gamehelpers);
    2.22 +#endif
    2.23 +#if defined SMEXT_ENABLE_TIMERSYS
    2.24 +	SM_GET_IFACE(TIMERSYS, timersys);
    2.25 +#endif
    2.26  
    2.27  	if (SDK_OnLoad(error, maxlength, late))
    2.28  	{
     3.1 --- a/public/sample_ext/sdk/smsdk_ext.h	Mon Jun 25 14:58:59 2007 +0000
     3.2 +++ b/public/sample_ext/sdk/smsdk_ext.h	Mon Jun 25 15:43:48 2007 +0000
     3.3 @@ -45,6 +45,12 @@
     3.4  #if defined SMEXT_ENABLE_MEMUTILS
     3.5  #include <IMemoryUtils.h>
     3.6  #endif
     3.7 +#if defined SMEXT_ENABLE_GAMEHELPERS
     3.8 +#include <IGameHelpers.h>
     3.9 +#endif
    3.10 +#if defined SMEXT_ENABLE_TIMERSYS
    3.11 +#include <ITimerSystem.h>
    3.12 +#endif
    3.13  
    3.14  #if defined SMEXT_CONF_METAMOD
    3.15  #include <ISmmPlugin.h>
    3.16 @@ -213,6 +219,12 @@
    3.17  #if defined SMEXT_ENABLE_MEMUTILS
    3.18  extern IMemoryUtils *memutils;
    3.19  #endif
    3.20 +#if defined SMEXT_ENABLE_GAMEHELPERS
    3.21 +extern IGameHelpers *gamehelpers;
    3.22 +#endif
    3.23 +#if defined SMEXT_ENABLE_TIMERSYS
    3.24 +extern ITimerSystem *timersys;
    3.25 +#endif
    3.26  
    3.27  #if defined SMEXT_CONF_METAMOD
    3.28  PLUGIN_GLOBALVARS();