aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/squirrel.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.h')
-rw-r--r--NorthstarDedicatedTest/squirrel.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/squirrel.h b/NorthstarDedicatedTest/squirrel.h
index 453db83b..4dc3240c 100644
--- a/NorthstarDedicatedTest/squirrel.h
+++ b/NorthstarDedicatedTest/squirrel.h
@@ -58,6 +58,16 @@ struct SQFuncRegistration
}
};
+enum class ScriptContext : int
+{
+ SERVER,
+ CLIENT,
+ UI,
+ NONE
+};
+
+const char* GetContextName(ScriptContext context);
+
// core sqvm funcs
typedef int64_t (*RegisterSquirrelFuncType)(void* sqvm, SQFuncRegistration* funcReg, char unknown);
extern RegisterSquirrelFuncType ClientRegisterSquirrelFunc;
@@ -222,3 +232,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(); \ No newline at end of file