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
|
struct SQRefCounted
|
||||||
{
|
{
|
||||||
SQRefCounted() { _uiRef = 0; _weakref = NULL; _globalnum = NULL; unk2 = NULL; }
|
SQRefCounted() { _uiRef = 0; _weakref = NULL; _context = NULL; _extraData = NULL; }
|
||||||
|
|
||||||
virtual ~SQRefCounted();
|
virtual ~SQRefCounted();
|
||||||
virtual void Release() = 0;
|
virtual void Release() = 0;
|
||||||
@ -19,10 +19,12 @@ struct SQRefCounted
|
|||||||
SQUnsignedInteger _uiRef;
|
SQUnsignedInteger _uiRef;
|
||||||
SQObject* _weakref; // this is not an sqobject!
|
SQObject* _weakref; // this is not an sqobject!
|
||||||
|
|
||||||
// index into the global array; see [r5apex + B1C7DE] for assignment
|
// vm context used to track total memory usage of the vm, indexes
|
||||||
// and [r5apex + B2CAF8] for usage
|
// into s_perVmScriptMemUsage in SQWeakRef::Release(), see:
|
||||||
SQInteger _globalnum;
|
// - r5apex + B1C7DE] for assignment.
|
||||||
void* unk2; // unknown
|
// - [r5apex + B2CAF8] for usage.
|
||||||
|
SQInteger _context;
|
||||||
|
void* _extraData; // unknown
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SQWeakRef : SQRefCounted
|
struct SQWeakRef : SQRefCounted
|
||||||
|
@ -39,12 +39,12 @@ struct SQVM : public CHAINABLE_OBJ
|
|||||||
// ================================= //
|
// ================================= //
|
||||||
_BYTE gap1C[8];
|
_BYTE gap1C[8];
|
||||||
void* _callstack;
|
void* _callstack;
|
||||||
int _unk;
|
SQInteger _stacklevel;
|
||||||
int _bottom;
|
SQInteger _bottom;
|
||||||
SQObjectPtr* _stackbase;
|
SQObjectPtr* _stackbase;
|
||||||
SQSharedState* _sharedstate;
|
SQSharedState* _sharedstate;
|
||||||
char gap68[16];
|
char gap68[16];
|
||||||
int _top;
|
SQInteger _top;
|
||||||
sqvector<SQObjectPtr> _stack;
|
sqvector<SQObjectPtr> _stack;
|
||||||
char gap_98[24];
|
char gap_98[24];
|
||||||
SQObjectPtr temp_reg;
|
SQObjectPtr temp_reg;
|
||||||
@ -52,11 +52,12 @@ struct SQVM : public CHAINABLE_OBJ
|
|||||||
SQObjectPtr _roottable;
|
SQObjectPtr _roottable;
|
||||||
SQObjectPtr _lasterror;
|
SQObjectPtr _lasterror;
|
||||||
char gap_100[48];
|
char gap_100[48];
|
||||||
int _nnativecalls;
|
SQInteger _nnativecalls;
|
||||||
SQBool _suspended;
|
SQBool _suspended;
|
||||||
SQBool _suspended_root;
|
SQBool _suspended_root;
|
||||||
char gap_13C[8];
|
SQInteger _callsstacksize;
|
||||||
int suspended_traps;
|
SQInteger _alloccallsstacksize;
|
||||||
|
SQInteger suspended_traps;
|
||||||
};
|
};
|
||||||
static_assert(offsetof(SQVM, _top) == 0x78);
|
static_assert(offsetof(SQVM, _top) == 0x78);
|
||||||
static_assert(offsetof(SQVM, _nnativecalls) == 0x130);
|
static_assert(offsetof(SQVM, _nnativecalls) == 0x130);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user