diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-25 04:43:11 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-25 04:43:11 +0100 |
commit | 153e7f564c4bb1d5da200f2aecdca7c8d1836997 (patch) | |
tree | 2d49d5848b57d963e2b1551d55ce336383226fad /NorthstarDedicatedTest/squirrel.h | |
parent | 844e12403400b455fe5df8c2e19145a2ed1a7d45 (diff) | |
download | NorthstarLauncher-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.h | 13 |
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 |