[Script] Improve structs, add extra checks
This commit is contained in:
@ -460,7 +460,7 @@ namespace Game
|
||||
XZone* g_zones = reinterpret_cast<XZone*>(0x14C0F80);
|
||||
unsigned short* db_hashTable = reinterpret_cast<unsigned short*>(0x12412B0);
|
||||
|
||||
ScriptContainer* scriptContainer = reinterpret_cast<ScriptContainer*>(0x2040D00);
|
||||
scrVmPub_t* scrVmPub = reinterpret_cast<scrVmPub_t*>(0x2040CF0);
|
||||
|
||||
clientstate_t* clcState = reinterpret_cast<clientstate_t*>(0xB2C540);
|
||||
|
||||
|
@ -968,7 +968,7 @@ namespace Game
|
||||
extern XZone* g_zones;
|
||||
extern unsigned short* db_hashTable;
|
||||
|
||||
extern ScriptContainer* scriptContainer;
|
||||
extern scrVmPub_t* scrVmPub;
|
||||
|
||||
extern clientstate_t* clcState;
|
||||
|
||||
|
@ -4889,15 +4889,35 @@ namespace Game
|
||||
VariableType type;
|
||||
};
|
||||
|
||||
struct ScriptContainer
|
||||
struct function_stack_t
|
||||
{
|
||||
VariableValue* stack;
|
||||
char unk1;
|
||||
char unk2;
|
||||
char unk3;
|
||||
char pad;
|
||||
DWORD unk4;
|
||||
int numParam;
|
||||
const char* pos;
|
||||
unsigned int localId;
|
||||
unsigned int localVarCount;
|
||||
VariableValue* top;
|
||||
VariableValue* startTop;
|
||||
};
|
||||
|
||||
struct function_frame_t
|
||||
{
|
||||
function_stack_t fs;
|
||||
int topType;
|
||||
};
|
||||
|
||||
struct scrVmPub_t
|
||||
{
|
||||
unsigned int* localVars;
|
||||
VariableValue* maxStack;
|
||||
int function_count;
|
||||
function_frame_t* function_frame;
|
||||
VariableValue* top;
|
||||
bool debugCode;
|
||||
bool abort_on_error;
|
||||
bool terminal_error;
|
||||
unsigned int inparamcount;
|
||||
unsigned int outparamcount;
|
||||
function_frame_t function_frame_start[32];
|
||||
VariableValue stack[2048];
|
||||
};
|
||||
|
||||
enum UILocalVarType
|
||||
|
Reference in New Issue
Block a user