update structs

This commit is contained in:
quaK 2024-06-29 00:20:56 +03:00
parent 089fd82be9
commit b904ffccb5
3 changed files with 754 additions and 483 deletions

View File

@ -466,6 +466,57 @@ namespace game
netadr_s address; netadr_s address;
}; };
struct GfxFont
{
const char* fontName;
int pixelHeight;
TTFDef* ttfDef;
};
enum GfxDrawSceneMethod
{
GFX_DRAW_SCENE_STANDARD = 0x1,
};
struct GfxDrawMethod
{
int drawScene;
int baseTechType;
int emissiveTechType;
int forceTechType;
};
struct directory_t
{
char path[256];
char gamedir[256];
};
struct searchpath_s
{
searchpath_s* next;
directory_t* dir;
int bLocalized;
int playersFolder;
int language;
int pad;
};
enum PLAYERCARD_CACHE_TASK_STAGE
{
PLAYERCARD_CACHE_TASK_STAGE_WAITING = 0x0,
PLAYERCARD_CACHE_TASK_STAGE_WORKING = 0x1,
PLAYERCARD_CACHE_TASK_STAGE_ALL_DONE = 0x2,
};
struct CachedPlayerProfile
{
bool has_data;
XUID userID;
char profile[2201];
int time;
};
namespace entity namespace entity
{ {
enum connstate_t : std::uint32_t enum connstate_t : std::uint32_t
@ -582,244 +633,197 @@ namespace game
}; };
static_assert(offsetof(cg_s, viewModelAxis) == 324368); static_assert(offsetof(cg_s, viewModelAxis) == 324368);
struct GfxFont namespace scripting
{ {
const char* fontName; enum VariableType
int pixelHeight; {
TTFDef* ttfDef; VAR_UNDEFINED = 0x0,
}; VAR_BEGIN_REF = 0x1,
VAR_POINTER = 0x1,
VAR_STRING = 0x2,
VAR_ISTRING = 0x3,
VAR_VECTOR = 0x4,
VAR_END_REF = 0x5,
VAR_FLOAT = 0x5,
VAR_INTEGER = 0x6,
VAR_CODEPOS = 0x7,
VAR_PRECODEPOS = 0x8,
VAR_FUNCTION = 0x9,
VAR_BUILTIN_FUNCTION = 0xA,
VAR_BUILTIN_METHOD = 0xB,
VAR_STACK = 0xC,
VAR_ANIMATION = 0xD,
VAR_PRE_ANIMATION = 0xE,
VAR_THREAD = 0xF,
VAR_NOTIFY_THREAD = 0x10,
VAR_TIME_THREAD = 0x11,
VAR_CHILD_THREAD = 0x12,
VAR_OBJECT = 0x13,
VAR_DEAD_ENTITY = 0x14,
VAR_ENTITY = 0x15,
VAR_ARRAY = 0x16,
VAR_DEAD_THREAD = 0x17,
VAR_COUNT = 0x18,
VAR_FREE = 0x18,
VAR_THREAD_LIST = 0x19,
VAR_ENDON_LIST = 0x1A,
VAR_TOTAL_COUNT = 0x1B,
};
enum GfxDrawSceneMethod struct scr_entref_t
{ {
GFX_DRAW_SCENE_STANDARD = 0x1, unsigned short entnum;
}; unsigned short classnum;
};
struct GfxDrawMethod struct VariableStackBuffer
{ {
int drawScene; const char* pos;
int baseTechType; unsigned __int16 size;
int emissiveTechType; unsigned __int16 bufLen;
int forceTechType; unsigned __int16 localId;
}; char time;
char buf[1];
};
struct directory_t union VariableUnion
{ {
char path[256]; int intValue;
char gamedir[256]; unsigned int uintValue;
}; float floatValue;
unsigned int stringValue;
const float* vectorValue;
const char* codePosValue;
unsigned int pointerValue;
VariableStackBuffer* stackValue;
unsigned int entityOffset;
};
struct searchpath_s struct VariableValue
{ {
searchpath_s* next; VariableUnion u;
directory_t* dir; int type;
int bLocalized; };
int playersFolder;
int language;
int pad;
};
enum VariableType struct function_stack_t
{ {
VAR_UNDEFINED = 0x0, const char* pos;
VAR_BEGIN_REF = 0x1, unsigned int localId;
VAR_POINTER = 0x1, unsigned int localVarCount;
VAR_STRING = 0x2, VariableValue* top;
VAR_ISTRING = 0x3, VariableValue* startTop;
VAR_VECTOR = 0x4, };
VAR_END_REF = 0x5,
VAR_FLOAT = 0x5,
VAR_INTEGER = 0x6,
VAR_CODEPOS = 0x7,
VAR_PRECODEPOS = 0x8,
VAR_FUNCTION = 0x9,
VAR_BUILTIN_FUNCTION = 0xA,
VAR_BUILTIN_METHOD = 0xB,
VAR_STACK = 0xC,
VAR_ANIMATION = 0xD,
VAR_PRE_ANIMATION = 0xE,
VAR_THREAD = 0xF,
VAR_NOTIFY_THREAD = 0x10,
VAR_TIME_THREAD = 0x11,
VAR_CHILD_THREAD = 0x12,
VAR_OBJECT = 0x13,
VAR_DEAD_ENTITY = 0x14,
VAR_ENTITY = 0x15,
VAR_ARRAY = 0x16,
VAR_DEAD_THREAD = 0x17,
VAR_COUNT = 0x18,
VAR_FREE = 0x18,
VAR_THREAD_LIST = 0x19,
VAR_ENDON_LIST = 0x1A,
VAR_TOTAL_COUNT = 0x1B,
};
struct scr_entref_t struct function_frame_t
{ {
unsigned short entnum; function_stack_t fs;
unsigned short classnum; int topType;
}; };
struct VariableStackBuffer struct scrVmPub_t
{ {
const char* pos; unsigned int* localVars;
unsigned __int16 size; VariableValue* maxstack;
unsigned __int16 bufLen; int function_count;
unsigned __int16 localId; function_frame_t* function_frame;
char time; VariableValue* top;
char buf[1]; unsigned int inparamcount;
}; unsigned int outparamcount;
function_frame_t function_frame_start[32];
VariableValue stack[2048];
};
union VariableUnion struct ObjectVariableChildren
{ {
int intValue; unsigned __int16 firstChild;
unsigned int uintValue; unsigned __int16 lastChild;
float floatValue; };
unsigned int stringValue;
const float* vectorValue;
const char* codePosValue;
unsigned int pointerValue;
VariableStackBuffer* stackValue;
unsigned int entityOffset;
};
struct VariableValue struct ObjectVariableValue_u_f
{ {
VariableUnion u; unsigned __int16 prev;
int type; unsigned __int16 next;
}; };
struct function_stack_t union ObjectVariableValue_u_o_u
{ {
const char* pos; unsigned __int16 size;
unsigned int localId; unsigned __int16 entnum;
unsigned int localVarCount; unsigned __int16 nextEntId;
VariableValue* top; unsigned __int16 self;
VariableValue* startTop; };
};
struct function_frame_t struct ObjectVariableValue_u_o
{ {
function_stack_t fs; unsigned __int16 refCount;
int topType; ObjectVariableValue_u_o_u u;
}; };
struct scrVmPub_t union ObjectVariableValue_w
{ {
unsigned int* localVars; unsigned int type;
VariableValue* maxstack; unsigned int classnum;
int function_count; unsigned int notifyName;
function_frame_t* function_frame; unsigned int waitTime;
VariableValue* top; unsigned int parentLocalId;
unsigned int inparamcount; };
unsigned int outparamcount;
function_frame_t function_frame_start[32];
VariableValue stack[2048];
};
struct ObjectVariableChildren struct ChildVariableValue_u_f
{ {
unsigned __int16 firstChild; unsigned __int16 prev;
unsigned __int16 lastChild; unsigned __int16 next;
}; };
struct ObjectVariableValue_u_f union ChildVariableValue_u
{ {
unsigned __int16 prev; ChildVariableValue_u_f f;
unsigned __int16 next; VariableUnion u;
}; };
union ObjectVariableValue_u_o_u struct ChildBucketMatchKeys_keys
{ {
unsigned __int16 size; unsigned __int16 name_hi;
unsigned __int16 entnum; unsigned __int16 parentId;
unsigned __int16 nextEntId; };
unsigned __int16 self;
};
struct ObjectVariableValue_u_o union ChildBucketMatchKeys
{ {
unsigned __int16 refCount; ChildBucketMatchKeys_keys keys;
ObjectVariableValue_u_o_u u; unsigned int match;
}; };
union ObjectVariableValue_w struct ChildVariableValue
{ {
unsigned int type; ChildVariableValue_u u;
unsigned int classnum; unsigned __int16 next;
unsigned int notifyName; char type;
unsigned int waitTime; char name_lo;
unsigned int parentLocalId; ChildBucketMatchKeys k;
}; unsigned __int16 nextSibling;
unsigned __int16 prevSibling;
};
struct ChildVariableValue_u_f union ObjectVariableValue_u
{ {
unsigned __int16 prev; ObjectVariableValue_u_f f;
unsigned __int16 next; ObjectVariableValue_u_o o;
}; };
union ChildVariableValue_u struct ObjectVariableValue
{ {
ChildVariableValue_u_f f; ObjectVariableValue_u u;
VariableUnion u; ObjectVariableValue_w w;
}; };
struct ChildBucketMatchKeys_keys struct scrVarGlob_t
{ {
unsigned __int16 name_hi; ObjectVariableValue objectVariableValue[40960];
unsigned __int16 parentId; ObjectVariableChildren objectVariableChildren[40960];
}; unsigned __int16 childVariableBucket[65536];
ChildVariableValue childVariableValue[384000];
union ChildBucketMatchKeys };
{ }
ChildBucketMatchKeys_keys keys; using namespace scripting;
unsigned int match;
};
struct ChildVariableValue
{
ChildVariableValue_u u;
unsigned __int16 next;
char type;
char name_lo;
ChildBucketMatchKeys k;
unsigned __int16 nextSibling;
unsigned __int16 prevSibling;
};
union ObjectVariableValue_u
{
ObjectVariableValue_u_f f;
ObjectVariableValue_u_o o;
};
struct ObjectVariableValue
{
ObjectVariableValue_u u;
ObjectVariableValue_w w;
};
struct scrVarGlob_t
{
ObjectVariableValue objectVariableValue[40960];
ObjectVariableChildren objectVariableChildren[40960];
unsigned __int16 childVariableBucket[65536];
ChildVariableValue childVariableValue[384000];
};
enum PLAYERCARD_CACHE_TASK_STAGE
{
PLAYERCARD_CACHE_TASK_STAGE_WAITING = 0x0,
PLAYERCARD_CACHE_TASK_STAGE_WORKING = 0x1,
PLAYERCARD_CACHE_TASK_STAGE_ALL_DONE = 0x2,
};
struct CachedPlayerProfile
{
bool has_data;
XUID userID;
char profile[2201];
int time;
};
namespace ddl namespace ddl
{ {

View File

@ -83,6 +83,7 @@ namespace game
WEAK symbol<bool(const char* zoneName)> DB_IsLocalized{ 0x3BC500 }; WEAK symbol<bool(const char* zoneName)> DB_IsLocalized{ 0x3BC500 };
WEAK symbol<char* (const char* filename, char* buf, int size)> DB_ReadRawFile{ 0xA79E30 }; WEAK symbol<char* (const char* filename, char* buf, int size)> DB_ReadRawFile{ 0xA79E30 };
WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{ 0xF20AF0 }; WEAK symbol<int(const RawFile* rawfile)> DB_GetRawFileLen{ 0xF20AF0 };
WEAK symbol<void(int flags)> DB_UnloadFastfilesByZoneFlags{ 0xA7BCE0 };
WEAK symbol<const char* (const DDLState* state, int enumValue)> DDL_Lookup_GetEnumString{ 0x30430 }; WEAK symbol<const char* (const DDLState* state, int enumValue)> DDL_Lookup_GetEnumString{ 0x30430 };
WEAK symbol<bool(const DDLState* state)> DDL_StateIsLeaf{ 0x2E3C0 }; WEAK symbol<bool(const DDLState* state)> DDL_StateIsLeaf{ 0x2E3C0 };

File diff suppressed because it is too large Load Diff