aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/squirrel.h
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-25 04:43:11 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-25 04:43:11 +0100
commit153e7f564c4bb1d5da200f2aecdca7c8d1836997 (patch)
tree2d49d5848b57d963e2b1551d55ce336383226fad /NorthstarDedicatedTest/squirrel.h
parent844e12403400b455fe5df8c2e19145a2ed1a7d45 (diff)
downloadNorthstarLauncher-153e7f564c4bb1d5da200f2aecdca7c8d1836997.tar.gz
NorthstarLauncher-153e7f564c4bb1d5da200f2aecdca7c8d1836997.zip
wasted a day working on something that didn't end up working, rework some modloader code
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