extensions/bintools/CallMaker.h
changeset 2504 74fea7db93e4
parent 2289 44045ead61cd
     1.1 --- a/extensions/bintools/CallMaker.h	Wed Jan 07 22:55:40 2009 -0500
     1.2 +++ b/extensions/bintools/CallMaker.h	Thu Jan 08 18:17:17 2009 +1300
     1.3 @@ -32,16 +32,12 @@
     1.4  #ifndef _INCLUDE_SOURCEMOD_CALLMAKER_H_
     1.5  #define _INCLUDE_SOURCEMOD_CALLMAKER_H_
     1.6  
     1.7 -#include <IBinTools.h>
     1.8 +
     1.9 +#include "CallWrapper.h"
    1.10 +#include "HookWrapper.h"
    1.11  
    1.12  using namespace SourceMod;
    1.13  
    1.14 -enum FuncAddrMethod
    1.15 -{
    1.16 -	FuncAddr_Direct,
    1.17 -	FuncAddr_VTable
    1.18 -};
    1.19 -
    1.20  class CallMaker : public IBinTools
    1.21  {
    1.22  public: //IBinTools
    1.23 @@ -58,4 +54,32 @@
    1.24  		unsigned int numParams);
    1.25  };
    1.26  
    1.27 +class CallMaker2 
    1.28 +#if defined HOOKING_ENABLED
    1.29 +	: public IBinTools2
    1.30 +#endif
    1.31 +{
    1.32 +public: //IBinTools2
    1.33 +	virtual ICallWrapper *CreateCall(void *address,
    1.34 +		const SourceHook::ProtoInfo *protoInfo);
    1.35 +	virtual ICallWrapper *CreateVirtualCall(const SourceHook::ProtoInfo *protoInfo,
    1.36 +		const SourceHook::MemFuncInfo *info);
    1.37 +#if defined HOOKING_ENABLED
    1.38 +	virtual IHookWrapper *CreateVirtualHook(SourceHook::ISourceHook *pSH, 
    1.39 +		const SourceHook::ProtoInfo *protoInfo, 
    1.40 +		const SourceHook::MemFuncInfo *info, 
    1.41 +		VIRTUAL_HOOK_PROTO f);
    1.42 +#endif
    1.43 +};
    1.44 +
    1.45 +extern CallMaker2 g_CallMaker2;
    1.46 +
    1.47 +SourceHook::ProtoInfo::CallConvention GetSHCallConvention(SourceMod::CallConvention cv);
    1.48 +SourceMod::CallConvention GetSMCallConvention(SourceHook::ProtoInfo::CallConvention cv);
    1.49 +SourceHook::PassInfo::PassType GetSHPassType(SourceMod::PassType type);
    1.50 +SourceMod::PassType GetSMPassType(int type);
    1.51 +void GetSMPassInfo(SourceMod::PassInfo *out, const SourceHook::PassInfo *in);
    1.52 +
    1.53 +
    1.54 +
    1.55  #endif //_INCLUDE_SOURCEMOD_CALLMAKER_H_