mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
VScript: map more fields out for SquirrelVM
Newly reverse engineered fields.
This commit is contained in:
parent
24bce8ee73
commit
b8550c9f32
@ -9,7 +9,7 @@ struct SQSharedState;
|
||||
|
||||
struct SQRefCounted
|
||||
{
|
||||
SQRefCounted() { _uiRef = 0; _weakref = NULL; _globalnum = NULL; unk2 = NULL; }
|
||||
SQRefCounted() { _uiRef = 0; _weakref = NULL; _context = NULL; _extraData = NULL; }
|
||||
|
||||
virtual ~SQRefCounted();
|
||||
virtual void Release() = 0;
|
||||
@ -19,10 +19,12 @@ struct SQRefCounted
|
||||
SQUnsignedInteger _uiRef;
|
||||
SQObject* _weakref; // this is not an sqobject!
|
||||
|
||||
// index into the global array; see [r5apex + B1C7DE] for assignment
|
||||
// and [r5apex + B2CAF8] for usage
|
||||
SQInteger _globalnum;
|
||||
void* unk2; // unknown
|
||||
// vm context used to track total memory usage of the vm, indexes
|
||||
// into s_perVmScriptMemUsage in SQWeakRef::Release(), see:
|
||||
// - r5apex + B1C7DE] for assignment.
|
||||
// - [r5apex + B2CAF8] for usage.
|
||||
SQInteger _context;
|
||||
void* _extraData; // unknown
|
||||
};
|
||||
|
||||
struct SQWeakRef : SQRefCounted
|
||||
|
@ -39,12 +39,12 @@ struct SQVM : public CHAINABLE_OBJ
|
||||
// ================================= //
|
||||
_BYTE gap1C[8];
|
||||
void* _callstack;
|
||||
int _unk;
|
||||
int _bottom;
|
||||
SQInteger _stacklevel;
|
||||
SQInteger _bottom;
|
||||
SQObjectPtr* _stackbase;
|
||||
SQSharedState* _sharedstate;
|
||||
char gap68[16];
|
||||
int _top;
|
||||
SQInteger _top;
|
||||
sqvector<SQObjectPtr> _stack;
|
||||
char gap_98[24];
|
||||
SQObjectPtr temp_reg;
|
||||
@ -52,11 +52,12 @@ struct SQVM : public CHAINABLE_OBJ
|
||||
SQObjectPtr _roottable;
|
||||
SQObjectPtr _lasterror;
|
||||
char gap_100[48];
|
||||
int _nnativecalls;
|
||||
SQInteger _nnativecalls;
|
||||
SQBool _suspended;
|
||||
SQBool _suspended_root;
|
||||
char gap_13C[8];
|
||||
int suspended_traps;
|
||||
SQInteger _callsstacksize;
|
||||
SQInteger _alloccallsstacksize;
|
||||
SQInteger suspended_traps;
|
||||
};
|
||||
static_assert(offsetof(SQVM, _top) == 0x78);
|
||||
static_assert(offsetof(SQVM, _nnativecalls) == 0x130);
|
||||
|
Loading…
x
Reference in New Issue
Block a user