aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirrel.h
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-09-04 22:47:02 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 00:43:59 +0200
commitb80d330ac865aa97177825d09c7b1edc09114d11 (patch)
tree7402fd0f1603b6b74d6341a0abd2150d622435e8 /NorthstarDLL/squirrel.h
parent4d6452865eb3e2b2abec3f5afe9de66ca7f1855b (diff)
downloadNorthstarLauncher-b80d330ac865aa97177825d09c7b1edc09114d11.tar.gz
NorthstarLauncher-b80d330ac865aa97177825d09c7b1edc09114d11.zip
Get rid of context filerefactor-remove-context-file
This is basically 77a1195d77034c00959dfd030e2eb7a57d58a88d from refactor PR redone on top of main
Diffstat (limited to 'NorthstarDLL/squirrel.h')
-rw-r--r--NorthstarDLL/squirrel.h11
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();