exposed the sourcepawn and JIT interfaces with pointers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40739
This commit is contained in:
Borja Ferrer 2007-05-04 01:28:08 +00:00
parent 01b0432776
commit d8c7af77a3
3 changed files with 26 additions and 0 deletions

View File

@ -630,6 +630,16 @@ const char *SourceModBase::GetGameFolderName() const
return m_ModDir;
}
ISourcePawnEngine *SourceModBase::GetScriptingEngine()
{
return g_pSourcePawn;
}
IVirtualMachine *SourceModBase::GetScriptingVM()
{
return g_pVM;
}
SMGlobalClass *SMGlobalClass::head = NULL;
SMGlobalClass::SMGlobalClass()

View File

@ -95,6 +95,8 @@ public: // ISourceMod
HandleType_t GetDataPackHandleType(bool readonly=false);
KeyValues *ReadKeyValuesHandle(Handle_t hndl, HandleError *err=NULL, bool root=false);
const char *GetGameFolderName() const;
ISourcePawnEngine *GetScriptingEngine();
IVirtualMachine *GetScriptingVM();
private:
/**
* @brief Loading plugins

View File

@ -168,6 +168,20 @@ namespace SourceMod
* @return A string containing the name of the game directory.
*/
virtual const char *GetGameFolderName() const =0;
/**
* @brief Returns the scripting engine interface.
*
* @return A pointer to the scripting engine interface.
*/
virtual SourcePawn::ISourcePawnEngine *GetScriptingEngine() =0;
/**
* @brief Returns the JIT interface.
*
* @return A pointer to the JIT interface.
*/
virtual SourcePawn::IVirtualMachine *GetScriptingVM() =0;
};
}