aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirreldatatypes.h
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-11-21 00:38:42 +0100
committerGitHub <noreply@github.com>2022-11-20 23:38:42 +0000
commit9e469ac28b610ecb8bce3e6c279660fae78861cf (patch)
tree57274f3be03cb160e42af7ed939274a2a028dbf0 /NorthstarDLL/squirreldatatypes.h
parent70b71ba3d3ad7121c6aabe55271542f55abe4008 (diff)
downloadNorthstarLauncher-9e469ac28b610ecb8bce3e6c279660fae78861cf.tar.gz
NorthstarLauncher-9e469ac28b610ecb8bce3e6c279660fae78861cf.zip
Squirrel bridge v3 (#310)
* Initial * Move squirrelmanager to virtual base class * Implement changes from code review * Formatting * Update squirrel.cpp * Formatting shit * Fix filters * Fix up Use new squirrel autobind syntax Move from `std::vector` to `std::queue` for message buffer Add `NSTestMessageBuffer` * Update squirrel.cpp * Update squirrel.h * Remove inline virtual final because this is stupid I probably had a bit of a brain fart when this was written * Moved to running ProcessMessages in-engine * Remove TestMessageBuffer * Formatting * Rename pushSQObject -> pushobject * Rename some stuff * Update squirrel.h * Formattting * Remove unneeded global access * Oops
Diffstat (limited to 'NorthstarDLL/squirreldatatypes.h')
-rw-r--r--NorthstarDLL/squirreldatatypes.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/NorthstarDLL/squirreldatatypes.h b/NorthstarDLL/squirreldatatypes.h
index 818ce2a4..e9f88d08 100644
--- a/NorthstarDLL/squirreldatatypes.h
+++ b/NorthstarDLL/squirreldatatypes.h
@@ -22,6 +22,13 @@ struct SQUserData;
typedef void (*releasehookType)(void* val, int size);
+// stolen from ttf2sdk: sqvm types
+typedef float SQFloat;
+typedef long SQInteger;
+typedef unsigned long SQUnsignedInteger;
+typedef char SQChar;
+typedef SQUnsignedInteger SQBool;
+
/* 127 */
enum SQObjectType : int
{
@@ -83,6 +90,7 @@ union SQObjectValue
float asFloat;
int asInteger;
SQUserData* asUserdata;
+ SQStructInstance* asStructInstance;
};
/* 160 */
@@ -279,12 +287,15 @@ struct alignas(8) HSquirrelVM
struct SQStructInstance
{
void* vftable;
- unsigned char gap_8[16];
+ __int32 uiRef;
+ BYTE gap_C[4];
+ __int64 unknown_10;
void* pointer_18;
- unsigned char gap_20[8];
+ __int64 unknown_20;
SQSharedState* _sharedState;
- unsigned char gap[8];
- SQObject data[20];
+ unsigned int size;
+ BYTE gap_34[4];
+ SQObject data[1]; // This struct is dynamically sized, so this size is unknown
};
/* 148 */