aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/squirrel.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.h')
-rw-r--r--NorthstarDedicatedTest/squirrel.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/squirrel.h b/NorthstarDedicatedTest/squirrel.h
index bb377604..43f6cef8 100644
--- a/NorthstarDedicatedTest/squirrel.h
+++ b/NorthstarDedicatedTest/squirrel.h
@@ -44,9 +44,6 @@ typedef SQInteger(*SQFunction)(void* sqvm);
template<Context context> class SquirrelManager
{
-private:
- //std::vector<
-
public:
void* sqvm;
@@ -54,6 +51,16 @@ public:
SquirrelManager() : sqvm(nullptr)
{}
+ void VMCreated(void* sqvm)
+ {
+ sqvm = sqvm;
+ }
+
+ void VMDestroyed()
+ {
+ sqvm = nullptr;
+ }
+
void ExecuteCode(const char* code)
{
// ttf2sdk checks ThreadIsInMainThread here, might be good to do that? doesn't seem like an issue rn tho