diff options
Diffstat (limited to 'NorthstarDLL/squirrel.h')
-rw-r--r-- | NorthstarDLL/squirrel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/NorthstarDLL/squirrel.h b/NorthstarDLL/squirrel.h index e465ddc6..ab982736 100644 --- a/NorthstarDLL/squirrel.h +++ b/NorthstarDLL/squirrel.h @@ -544,6 +544,16 @@ struct SQArray } \ } +enum class ScriptContext : int +{ + SERVER, + CLIENT, + UI, + NONE +}; + +const char* GetContextName(ScriptContext context); + // core sqvm funcs typedef SQRESULT (*sq_compilebufferType)(void* sqvm, CompileBufferState* compileBuffer, const char* file, int a1, ScriptContext a2); extern sq_compilebufferType ClientSq_compilebuffer; @@ -811,3 +821,4 @@ template <ScriptContext context> class SquirrelManager extern SquirrelManager<ScriptContext::CLIENT>* g_ClientSquirrelManager; extern SquirrelManager<ScriptContext::SERVER>* g_ServerSquirrelManager; extern SquirrelManager<ScriptContext::UI>* g_UISquirrelManager; +template <ScriptContext context> SquirrelManager<context>* GetSquirrelManager(); |