Added META_NO_HL2SDK define to stop MM:S headers using the HL2SDK (bug 5079, r=dvander).
authorAsher Baker <asherkin@gmail.com>
Sun May 27 02:16:08 2012 +0100 (2012-05-27)
changeset 783ba8cd35102b1
parent 777 62e002cdecdb
child 784 2d1b06329254
Added META_NO_HL2SDK define to stop MM:S headers using the HL2SDK (bug 5079, r=dvander).
core/ISmmAPI.h
core/ISmmPlugin.h
     1.1 --- a/core/ISmmAPI.h	Wed Mar 21 21:02:15 2012 -0500
     1.2 +++ b/core/ISmmAPI.h	Sun May 27 02:16:08 2012 +0100
     1.3 @@ -34,8 +34,6 @@
     1.4   */
     1.5  
     1.6  #include <stdarg.h>
     1.7 -#include <interface.h>
     1.8 -#include <eiface.h>
     1.9  #include <sourcehook.h>
    1.10  #include <IPluginManager.h>
    1.11  #include <ISmmPlugin.h>
    1.12 @@ -52,6 +50,24 @@
    1.13  #define MMIFACE_SH_HOOKMANAUTOGEN	"IHookManagerAutoGen"		/**< SourceHook::IHookManagerAutoGen Pointer */
    1.14  #define IFACE_MAXNUM			999						/**< Maximum interface version */
    1.15  
    1.16 +#if defined META_NO_HL2SDK
    1.17 +class CGlobalVars;
    1.18 +class IServerPluginCallbacks;
    1.19 +struct edict_t;
    1.20 +class ConCommandBase;
    1.21 +#else
    1.22 +#include <eiface.h>
    1.23 +#endif
    1.24 +
    1.25 +// Interface return status, binary-compatible with HL2SDK's IFACE_OK and IFACE_FAILED.
    1.26 +enum 
    1.27 +{
    1.28 +	META_IFACE_OK = 0,
    1.29 +	META_IFACE_FAILED
    1.30 +};
    1.31 +
    1.32 +typedef void* (*CreateInterfaceFn)(const char *pName, int *pReturnCode);
    1.33 +
    1.34  namespace SourceMM
    1.35  {
    1.36  	class ISmmPlugin;
     2.1 --- a/core/ISmmPlugin.h	Wed Mar 21 21:02:15 2012 -0500
     2.2 +++ b/core/ISmmPlugin.h	Sun May 27 02:16:08 2012 +0100
     2.3 @@ -34,7 +34,6 @@
     2.4   * The pure-virtual ISmmPlugin callbacks must be implemented for the load to load.
     2.5   */
     2.6  
     2.7 -#include <interface.h>
     2.8  #include <sourcehook.h>
     2.9  #include <IPluginManager.h>
    2.10  #include <ISmmAPI.h>
    2.11 @@ -268,7 +267,7 @@
    2.12  		 * wrapper.  This can be used to provide interfaces to other plugins or
    2.13  		 * the GameDLL.
    2.14  		 *
    2.15 -		 * If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
    2.16 +		 * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
    2.17  		 *
    2.18  		 * @param iface			Interface string.
    2.19  		 * @param ret			Optional pointer to store return code.
    2.20 @@ -279,7 +278,7 @@
    2.21  		{
    2.22  			if (ret)
    2.23  			{
    2.24 -				*ret = IFACE_FAILED;
    2.25 +				*ret = META_IFACE_FAILED;
    2.26  			}
    2.27  
    2.28  			return NULL; 
    2.29 @@ -290,7 +289,7 @@
    2.30  		 * Metamod:Source's wrapper. This can be used to provide interfaces to 
    2.31  		 * other plugins.
    2.32  		 *
    2.33 -		 * If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
    2.34 +		 * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
    2.35  		 *
    2.36  		 * @param iface			Interface string.
    2.37  		 * @param ret			Optional pointer to store return code.
    2.38 @@ -301,7 +300,7 @@
    2.39  		{
    2.40  			if (ret)
    2.41  			{
    2.42 -				*ret = IFACE_FAILED;
    2.43 +				*ret = META_IFACE_FAILED;
    2.44  			}
    2.45  	
    2.46  			return NULL; 
    2.47 @@ -312,7 +311,7 @@
    2.48  		 * Metamod:Source's wrapper.  This can be used to provide interfaces to 
    2.49  		 * other plugins.
    2.50  		 *
    2.51 -		 * If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
    2.52 +		 * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
    2.53  		 *
    2.54  		 * @param iface			Interface string.
    2.55  		 * @param ret			Optional pointer to store return code.
    2.56 @@ -323,7 +322,7 @@
    2.57  		{
    2.58  			if (ret)
    2.59  			{
    2.60 -				*ret = IFACE_FAILED;
    2.61 +				*ret = META_IFACE_FAILED;
    2.62  			}
    2.63  			
    2.64  			return NULL; 
    2.65 @@ -334,7 +333,7 @@
    2.66  		 * Metamod:Source's wrapper.  This can be used to provide interfaces to 
    2.67  		 * other plugins.
    2.68  		 *
    2.69 -		 * If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
    2.70 +		 * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
    2.71  		 *
    2.72  		 * @param iface			Interface string.
    2.73  		 * @param ret			Optional pointer to store return code.
    2.74 @@ -345,7 +344,7 @@
    2.75  		{
    2.76  			if (ret)
    2.77  			{
    2.78 -				*ret = IFACE_FAILED;
    2.79 +				*ret = META_IFACE_FAILED;
    2.80  			}
    2.81  	
    2.82  			return NULL; 
    2.83 @@ -355,7 +354,7 @@
    2.84  		 * @brief Called when Metamod's own factory is invoked.  
    2.85  		 * This can be used to provide interfaces to other plugins.
    2.86  		 *
    2.87 -		 * If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
    2.88 +		 * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
    2.89  		 *
    2.90  		 * @param iface			Interface string.
    2.91  		 * @param ret			Optional pointer to store return code.
    2.92 @@ -366,7 +365,7 @@
    2.93  		{
    2.94  			if (ret)
    2.95  			{
    2.96 -				*ret = IFACE_FAILED;
    2.97 +				*ret = META_IFACE_FAILED;
    2.98  			}
    2.99  	
   2.100  			return NULL;