diff --git a/sdk-static.toml b/sdk-static.toml index 9aebfdf1..ca5d3072 100644 --- a/sdk-static.toml +++ b/sdk-static.toml @@ -321,3 +321,6 @@ size = 0x10 [panorama_CPanelPtr] size = 0x08 + +[VectorWS] +size = 0xc \ No newline at end of file diff --git a/sdk-static/c/include/source2sdk/source2gen/source2gen.h b/sdk-static/c/include/source2sdk/source2gen/source2gen.h index 2eae659e..80c0531a 100644 --- a/sdk-static/c/include/source2sdk/source2gen/source2gen.h +++ b/sdk-static/c/include/source2sdk/source2gen/source2gen.h @@ -95,6 +95,7 @@ typedef char Vector[0x0c]; typedef char Vector2D[0x08]; typedef char Vector4D[0x10]; typedef char VectorAligned[0x10]; +typedef char VectorWS[0x0c]; typedef char WorldGroupId_t[0x04]; typedef char float32[0x04]; typedef char fltx4[0x10]; diff --git a/sdk-static/cpp/include/source2sdk/source2gen/source2gen.hpp b/sdk-static/cpp/include/source2sdk/source2gen/source2gen.hpp index c132011c..2374dfbd 100644 --- a/sdk-static/cpp/include/source2sdk/source2gen/source2gen.hpp +++ b/sdk-static/cpp/include/source2sdk/source2gen/source2gen.hpp @@ -128,6 +128,7 @@ using Vector = char[0x0c]; using Vector2D = char[0x08]; using Vector4D = char[0x10]; using VectorAligned = char[0x10]; +using VectorWS = char[0x0c]; using WorldGroupId_t = char[0x04]; using float32 = char[0x04]; using fltx4 = char[0x10]; diff --git a/source2gen/include/sdk/interfaces/common/CThreadMutex.h b/source2gen/include/sdk/interfaces/common/CThreadMutex.h index 28429477..c32ca90b 100644 --- a/source2gen/include/sdk/interfaces/common/CThreadMutex.h +++ b/source2gen/include/sdk/interfaces/common/CThreadMutex.h @@ -12,7 +12,11 @@ typedef std::uint32_t ThreadId_t; typedef std::uint64_t ThreadId_t; #endif +#if DOTA2 && TARGET_OS == WINDOWS +constexpr auto kTtSizeofCriticalsection = 4; +#else constexpr auto kTtSizeofCriticalsection = 40; +#endif class CThreadMutex { public: @@ -24,7 +28,11 @@ class CThreadMutex { bool m_bTrace; const char* m_pDebugName; }; +#if DOTA2 && TARGET_OS == WINDOWS +static_assert(sizeof(CThreadMutex) == platform_specific{.windows = 0x18, .linux = 0x40}); +#else static_assert(sizeof(CThreadMutex) == platform_specific{.windows = 0x38, .linux = 0x40}); +#endif // source2gen - Source2 games SDK generator // Copyright 2024 neverlosecc diff --git a/source2gen/include/sdk/interfaces/common/CUtlMemoryPoolBase.h b/source2gen/include/sdk/interfaces/common/CUtlMemoryPoolBase.h index cba9b128..94e731e0 100644 --- a/source2gen/include/sdk/interfaces/common/CUtlMemoryPoolBase.h +++ b/source2gen/include/sdk/interfaces/common/CUtlMemoryPoolBase.h @@ -100,7 +100,12 @@ class CUtlMemoryPoolBaseV2 { int m_TotalSize{}; // m_BlocksPerBlob * (m_NumBlobs + 1) + (m_nAligment + 14) }; + +#if DOTA2 && TARGET_OS == WINDOWS +static_assert(sizeof(CUtlMemoryPoolBaseV2) == platform_specific{.windows = 0x60, .linux = 0x90}); +#else static_assert(sizeof(CUtlMemoryPoolBaseV2) == platform_specific{.windows = 0x80, .linux = 0x90}); +#endif using CUtlMemoryPoolBase = std::conditional_t; diff --git a/source2gen/include/sdk/interfaces/common/CUtlTSHash.h b/source2gen/include/sdk/interfaces/common/CUtlTSHash.h index d92ba59e..71f8e870 100644 --- a/source2gen/include/sdk/interfaces/common/CUtlTSHash.h +++ b/source2gen/include/sdk/interfaces/common/CUtlTSHash.h @@ -249,13 +249,22 @@ class CUtlTSHashV2 { class HashBucket_t { public: +#if DOTA2 && TARGET_OS == WINDOWS + RTL_SRWLOCK m_AddLock; // 0x0000 +#else CThreadSpinRWLock m_AddLock; // 0x0000 - HashFixedData_t* m_pFirst; // 0x0020 - HashFixedData_t* m_pFirstUncommitted; // 0x0020 +#endif + HashFixedData_t* m_pFirst; // 0x0010 + HashFixedData_t* m_pFirstUncommitted; // 0x0018 IF_LINUX(char pad_0x20[0x08];) }; // Size: 0x0028 // clang-19 requires an explicit template type for platform_specific + +#if DOTA2 && TARGET_OS == WINDOWS + static_assert(sizeof(HashBucket_t) == platform_specific{.windows = 0x18, .linux = 0x30}); // Linux UNTESTED +#else static_assert(sizeof(HashBucket_t) == platform_specific{.windows = 0x28, .linux = 0x30}); +#endif CUtlMemoryPoolBase m_EntryMemory; diff --git a/source2gen/include/sdk/interfaces/schemasystem/schema.h b/source2gen/include/sdk/interfaces/schemasystem/schema.h index 57930256..0a573421 100644 --- a/source2gen/include/sdk/interfaces/schemasystem/schema.h +++ b/source2gen/include/sdk/interfaces/schemasystem/schema.h @@ -132,7 +132,12 @@ enum { #elif defined(DOTA2) || defined(CS2) || defined(DEADLOCK) constexpr auto kSchemaSystemVersion = platform_specific{.windows = 2, .linux = 1}.get(); + +#if DOTA2 && TARGET_OS == WINDOWS +constexpr auto kSchemaSystem_PAD0 = platform_specific{.windows = 0x190, .linux = 0x188 + 0x68}.get(); +#else constexpr auto kSchemaSystem_PAD0 = platform_specific{.windows = 0x188, .linux = 0x188 + 0x68}.get(); +#endif constexpr auto kSchemaSystem_PAD1 = 0x120; constexpr auto kSchemaSystemTypeScope_PAD0 = 0x7; @@ -143,7 +148,7 @@ enum { kSchemaSystem_GetClassModuleName = kSchemaSystem_GetClassInfoBinaryName + 1, kSchemaSystem_GetEnumBinaryName = kSchemaSystem_GetClassModuleName + 1, kSchemaSystem_GetEnumProjectName = kSchemaSystem_GetEnumBinaryName + 1, - kSchemaSystemTypeScope_DeclaredClass = 14, + kSchemaSystemTypeScope_DeclaredClass = 12, kSchemaSystemTypeScope_DeclaredEnum = kSchemaSystemTypeScope_DeclaredClass + 1, kSchemaSystemTypeScope_GetScopeName = 28, kSchemaSystemTypeScope_IsGlobalScope = kSchemaSystemTypeScope_GetScopeName + 1, @@ -798,8 +803,8 @@ class CSchemaPtrMap { public: CUtlMap m_Map; -#if TARGET_OS == LINUX char pad_0x28[0x08]; +#if TARGET_OS == LINUX #endif #if !defined(DOTA2) && !defined(CS2) && !defined(DEADLOCK) @@ -808,7 +813,7 @@ class CSchemaPtrMap { }; #if defined(DOTA2) || defined(CS2) || defined(DEADLOCK) -static_assert(sizeof(CSchemaPtrMap) == platform_specific{.windows = 0x28, .linux = 0x30}.get()); +static_assert(sizeof(CSchemaPtrMap) == platform_specific{.windows = 0x30, .linux = 0x30}.get()); #else static_assert(sizeof(CSchemaPtrMap) == platform_specific{.windows = 0x30, .linux = 0x30}.get()); #endif @@ -966,7 +971,10 @@ class CSchemaSystemTypeScope { CSchemaType_NoschemaType m_pNoschemaType = {}; #endif - CUtlTSHash m_ClassBindings = {}; // 0x05C0 +#if DOTA2 && TARGET_OS == WINDOWS + void* unk; // 0x0558 +#endif + CUtlTSHash m_ClassBindings = {}; // 0x0560 CUtlTSHash m_EnumBindings = {}; // 0x2E50 };