diff --git a/src/game/clientscript/clientscript_public.hpp b/src/game/clientscript/clientscript_public.hpp index a82fe24..2c2f888 100644 --- a/src/game/clientscript/clientscript_public.hpp +++ b/src/game/clientscript/clientscript_public.hpp @@ -384,6 +384,44 @@ namespace game VAR_ENDON_LIST = 0x18, }; + enum scr_builtin_type_t + { + BUILTIN_ANY = 0x0, + BUILTIN_DEVELOPER_ONLY = 0x1, + }; + + enum Scr_SourceType_t + { + SOURCE_TYPE_NONE = 0x0, + SOURCE_TYPE_BREAKPOINT = 0x1, + SOURCE_TYPE_CALL = 0x2, + }; + + enum scr_abort_t + { + SCR_ABORT_NONE = 0x0, + SCR_ABORT_CONTINUE = 0x1, + SCR_ABORT_BREAK = 0x2, + SCR_ABORT_RETURN = 0x3, + SCR_ABORT_MAX = 0x3, + }; + + enum scr_call_type_t + { + CALL_NONE = 0x0, + CALL_BUILTIN = 0x1, + CALL_THREAD = 0x2, + CALL_FUNCTION = 0x3, + }; + + enum sl_user_type_e + { + SL_USER_GAME = 0x1, + SL_USER_TEMP = 0x2, + SL_USER_XZONE = 0x4, + SL_USER_XZONE_TEMP = 0x8, + }; + #pragma endregion #pragma region "structs" diff --git a/src/game/enums.hpp b/src/game/enums.hpp index d133fce..e8b8e53 100644 --- a/src/game/enums.hpp +++ b/src/game/enums.hpp @@ -3763,6 +3763,9 @@ namespace game CRITSECT_SCRIPT_STRING = 0xB, CRITSECT_MEMORY_TREE = 0xC, CRITSECT_SYS_EVENT_QUEUE = 0xE, + CRITSECT_DXDEVICE = 0x11, + CRITSECT_DXDEVICE_GLOB = 0x12, + CRITSECT_MISSING_ASSET = 0x13, CRITSECT_PHYSICS_UPDATE = 0x15, CRITSECT_CINEMATIC = 0x19, CRITSECT_CINEMATIC_TARGET_CHANGE = 0x1A, @@ -3897,15 +3900,6 @@ namespace game HUDELEM_UPDATE_ARCHIVAL_AND_CURRENT = 0x3, }; - enum sourceType_e - { - SOURCE_TYPE_BREAKPOINT = 0x1, - SOURCE_TYPE_CALL = 0x2, - SOURCE_TYPE_THREAD_START = 0x4, - SOURCE_TYPE_BUILTIN_CALL = 0x8, - SOURCE_TYPE_NOTIFY = 0x10, - }; - enum animBodyPart_t { ANIM_BP_UNUSED = 0x0, @@ -3915,6 +3909,51 @@ namespace game NUM_ANIM_BODYPARTS = 0x4, }; + enum zone_flags_e + { + ZONE_FLAG_none = 0x0, + DB_ZONE_COMMON_LOC = 0x1, + DB_ZONE_LEVEL_LOC = 0x2, + DB_ZONE_CODE = 0x4, + DB_ZONE_COMMON = 0x8, + DB_ZONE_LEVEL = 0x10, + DB_ZONE_LOAD = 0x20, + DB_ZONE_MYCHANGES = 0x40, + ZONE_FLAG_unk3 = 0x80, + DB_ZONE_LEVELOVERLAY = 0x100, // patch, not 'so' + DB_ZONE_PATCH = 0x200, + ZONE_FLAG_unk5 = 0x400, + DB_ZONE_MOD = 0x800, + }; + + enum xfile_block_type_e + { + XFILE_BLOCK_TEMP = 0x0, + XFILE_BLOCK_RUNTIME = 0x1, + XFILE_BLOCK_RUNTIME_BEGIN = 0x1, + XFILE_BLOCK_LARGE_RUNTIME = 0x2, + XFILE_BLOCK_PHYSICAL_RUNTIME = 0x3, + XFILE_BLOCK_VIRTUAL = 0x4, + XFILE_BLOCK_RUNTIME_END = 0x4, + XFILE_BLOCK_LARGE = 0x5, + XFILE_BLOCK_PHYSICAL = 0x6, + MAX_XFILE_COUNT = 0x7, + }; + + enum dm_memory_tyep_e + { + DM_MEMORY_TEMP = 0x0, + DM_MEMORY_VIRTUAL = 0x1, + DM_MEMORY_PHYSICAL = 0x2, + }; + + enum phys_alloc_type_e + { + PHYS_ALLOC_LOW = 0x0, + PHYS_ALLOC_HIGH = 0x1, + PHYS_ALLOC_COUNT = 0x2, + }; + #ifdef __cplusplus } #endif diff --git a/src/game/structs.hpp b/src/game/structs.hpp index 8d7b045..545f39f 100644 --- a/src/game/structs.hpp +++ b/src/game/structs.hpp @@ -3604,17 +3604,6 @@ namespace game ASSERT_STRUCT_OFFSET(TLSData_t, field_38, 0x38); ASSERT_STRUCT_OFFSET(TLSData_t, field_3C, 0x3C); - struct XZoneInfo - { - char * name; //OFS: 0x0 SIZE: 0x4 - int allocFlags; //OFS: 0x4 SIZE: 0x4 - int freeFlags; //OFS: 0x8 SIZE: 0x4 - }; - ASSERT_STRUCT_SIZE(XZoneInfo, 0xC); - ASSERT_STRUCT_OFFSET(XZoneInfo, name, 0x0); - ASSERT_STRUCT_OFFSET(XZoneInfo, allocFlags, 0x4); - ASSERT_STRUCT_OFFSET(XZoneInfo, freeFlags, 0x8); - union DvarValue { bool enabled; //OFS: 0x0 SIZE: 0x1 @@ -11407,17 +11396,6 @@ namespace game ASSERT_STRUCT_OFFSET(LargeLocal, startPos, 0x0); ASSERT_STRUCT_OFFSET(LargeLocal, size, 0x4); - struct XFile - { - unsigned int size; //OFS: 0x0 SIZE: 0x4 - unsigned int externalSize; //OFS: 0x4 SIZE: 0x4 - unsigned int blockSize[8]; //OFS: 0x8 SIZE: 0x20 - }; - ASSERT_STRUCT_SIZE(XFile, 0x28); - ASSERT_STRUCT_OFFSET(XFile, size, 0x0); - ASSERT_STRUCT_OFFSET(XFile, externalSize, 0x4); - ASSERT_STRUCT_OFFSET(XFile, blockSize, 0x8); - union pointtrace_or_moveclip_u { pointtrace_t point; //OFS: 0x0 SIZE: 0x40 @@ -12777,21 +12755,6 @@ namespace game ASSERT_STRUCT_OFFSET(GfxCmdStretchPicRotateXY, color, 0x28); ASSERT_STRUCT_OFFSET(GfxCmdStretchPicRotateXY, rotation, 0x2C); - struct XZoneMemory - { - XBlock blocks[9]; //OFS: 0x0 SIZE: 0x48 - char * lockedVertexData; //OFS: 0x48 SIZE: 0x4 - char * lockedIndexData; //OFS: 0x4C SIZE: 0x4 - void * vertexBuffer; //OFS: 0x50 SIZE: 0x4 - void * indexBuffer; //OFS: 0x54 SIZE: 0x4 - }; - ASSERT_STRUCT_SIZE(XZoneMemory, 0x58); - ASSERT_STRUCT_OFFSET(XZoneMemory, blocks, 0x0); - ASSERT_STRUCT_OFFSET(XZoneMemory, lockedVertexData, 0x48); - ASSERT_STRUCT_OFFSET(XZoneMemory, lockedIndexData, 0x4C); - ASSERT_STRUCT_OFFSET(XZoneMemory, vertexBuffer, 0x50); - ASSERT_STRUCT_OFFSET(XZoneMemory, indexBuffer, 0x54); - struct SaveMemoryGlob { SaveGame * committedGameSave; //OFS: 0x0 SIZE: 0x4 @@ -13324,7 +13287,64 @@ namespace game ASSERT_STRUCT_OFFSET(DynEnt_FadeData, id, 0x0); ASSERT_STRUCT_OFFSET(DynEnt_FadeData, startTime, 0x4); + struct __declspec(align(2)) GfxMetrics + { + unsigned __int16 cubemapShotRes; + unsigned __int16 cubemapShotPixelBorder; + bool hasAnisotropicMinFilter; + bool hasAnisotropicMagFilter; + int maxAnisotropy; + int maxClipPlanes; + unsigned __int8 shadowmapSamplerState; + bool slopeScaleDepthBias; + bool canMipCubemaps; + }; + // cCurve + + struct CommonFastFileLoad + { + int code_post_gfx_flags; + int patch_flags; + int ui_flags; + int common_flags; + int flags5; + int localized_common_flags; + const char *code_post_gfx; + const char *patch; + const char *ui; + const char *common; + int filename4; + const char *localized_common; + const char *mod; + }; + + struct GfxWindowParms + { + HWND__ *hwnd; + int hz; + bool fullscreen; + int x; + int y; + int sceneWidth; + int sceneHeight; + int displayWidth; + int displayHeight; + int aaSamples; + }; + + struct stream_source_info_t + { + char Stream; + char Offset; + char Type; + }; + + struct stream_dest_info_t + { + char Usage; + char UsageIndex; + }; #ifdef __cplusplus } diff --git a/src/game/xasset.hpp b/src/game/xasset.hpp index 490b09a..05e5059 100644 --- a/src/game/xasset.hpp +++ b/src/game/xasset.hpp @@ -5318,7 +5318,8 @@ namespace game RawFile* rawfile; //OFS: 0x1A SIZE: 0x4 StringTable* stringTable; //OFS: 0x1B SIZE: 0x4 PackIndex* packIndex; //OFS: 0x1C SIZE: 0x4 - void* data; //OFS: 0x1D SIZE: 0x4 + snd_alias_list_t* sound; //OFS: 0x1D SIZE: 0x4 + void* data; //OFS: 0x1E SIZE: 0x4 }; struct XAsset @@ -5417,6 +5418,28 @@ namespace game ASSERT_STRUCT_OFFSET(XZone, allocType, 0x8); ASSERT_STRUCT_OFFSET(XZone, blocks, 0xC); + struct XFile + { + unsigned int size; //OFS: 0x0 SIZE: 0x4 + unsigned int externalSize; //OFS: 0x4 SIZE: 0x4 + unsigned int blockSize[7]; //OFS: 0x8 SIZE: 0x1C + }; + ASSERT_STRUCT_SIZE(XFile, 0x24); + ASSERT_STRUCT_OFFSET(XFile, size, 0x0); + ASSERT_STRUCT_OFFSET(XFile, externalSize, 0x4); + ASSERT_STRUCT_OFFSET(XFile, blockSize, 0x8); + + struct XZoneInfo + { + char * name; //OFS: 0x0 SIZE: 0x4 + int allocFlags; //OFS: 0x4 SIZE: 0x4 + int freeFlags; //OFS: 0x8 SIZE: 0x4 + }; + ASSERT_STRUCT_SIZE(XZoneInfo, 0xC); + ASSERT_STRUCT_OFFSET(XZoneInfo, name, 0x0); + ASSERT_STRUCT_OFFSET(XZoneInfo, allocFlags, 0x4); + ASSERT_STRUCT_OFFSET(XZoneInfo, freeFlags, 0x8); + #ifdef __cplusplus WEAK symbolDB_FindXAssetHeader{ 0x0, 0x48DA30 }; } diff --git a/src/stdinc.hpp b/src/stdinc.hpp index 1a8fe88..2d6f76c 100644 --- a/src/stdinc.hpp +++ b/src/stdinc.hpp @@ -10,6 +10,7 @@ #pragma warning(disable: 4324) #pragma warning(disable: 4459) #pragma warning(disable: 4611) +#pragma warning(disable: 4359) #pragma warning(error: 4409) #define DLL_EXPORT extern "C" __declspec(dllexport)