From 62dd19783ed3da91bca0c7a78a90ee4dfc093910 Mon Sep 17 00:00:00 2001 From: pv Date: Thu, 5 Oct 2023 17:16:13 +0300 Subject: [PATCH 1/5] Fix 2.01 --- include/RED4ext/Addresses.hpp | 4 ++-- include/RED4ext/Api/v0/Runtime.hpp | 3 ++- include/RED4ext/ResourceLoader.hpp | 2 +- scripts/patterns.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/RED4ext/Addresses.hpp b/include/RED4ext/Addresses.hpp index e83043593..5b5d4f04a 100644 --- a/include/RED4ext/Addresses.hpp +++ b/include/RED4ext/Addresses.hpp @@ -44,7 +44,7 @@ constexpr uintptr_t CClass_sub_90 = 0x1409581C0 - ImageBase; // 48 89 5C 24 ? 48 constexpr uintptr_t CClass_sub_98 = 0x141FAF750 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?, expected: 3, index: 2 constexpr uintptr_t CClass_sub_A0 = 0x141FAED84 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 56 41 57 48 8B EC, expected: 538, index: 354 constexpr uintptr_t CClass_sub_B0 = 0x14087C070 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B 05 ? ? ? ?, expected: 1, index: 0 -constexpr uintptr_t CClass_sub_C0 = 0x140547E70 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 83 64 24 ? ?, expected: 58, index: 11 +constexpr uintptr_t CClass_sub_C0 = 0x140558740 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 83 64 24 ? ?, expected: 58, index: 12 constexpr uintptr_t CClass_GetMaxAlignment = 0x1405586C4 - ImageBase; // 48 89 5C 24 ? 57 48 83 EC ? 8B 59 ?, expected: 126, index: 18 constexpr uintptr_t CClass_sub_D0 = 0x14208CE88 - ImageBase; // 4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56, expected: 33, index: 26 constexpr uintptr_t CClass_CreateInstance = 0x14014C660 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 65 48 8B 04 25 ? ? ? ?, expected: 421, index: 7 @@ -170,7 +170,7 @@ constexpr uintptr_t ResourceDepot = 0x1446DF9C8 - ImageBase; // 48 89 05 ? ? ? ? #pragma endregion #pragma region ResourceLoader -constexpr uintptr_t ResourceLoader = 0x143811B08 - ImageBase; // 48 89 05 ? ? ? ? 48 83 C4 ? 5F C3, expected: 6, index: 0, offset: 3 +constexpr uintptr_t ResourceLoader = 0x1432EDC78 - ImageBase; // 48 89 05 ? ? ? ? 48 83 C4 ? 5F C3, expected: 6, index: 1, offset: 3 constexpr uintptr_t ResourceLoader_FindTokenFast = 0x140151C5C - ImageBase; // 48 8B C4 4C 89 40 ? 53 48 83 EC ? 48 8B DA 4C 8D 40 ?, expected: 2, index: 0 constexpr uintptr_t ResourceLoader_LoadAsync = 0x140608484 - ImageBase; // 48 89 5C 24 ? 55 48 8B EC 48 83 EC ? 83 4D E8 ? 33 C0, expected: 1, index: 0 #pragma endregion diff --git a/include/RED4ext/Api/v0/Runtime.hpp b/include/RED4ext/Api/v0/Runtime.hpp index 658912334..a4df7991c 100644 --- a/include/RED4ext/Api/v0/Runtime.hpp +++ b/include/RED4ext/Api/v0/Runtime.hpp @@ -25,6 +25,7 @@ #define RED4EXT_V0_RUNTIME_1_63 RED4EXT_V0_FILEVER(3, 0, 72, 45053) #define RED4EXT_V0_RUNTIME_1_63_HOTFIX_1 RED4EXT_V0_FILEVER(3, 0, 72, 54038) #define RED4EXT_V0_RUNTIME_2_00 RED4EXT_V0_FILEVER(3, 0, 74, 53121) +#define RED4EXT_V0_RUNTIME_2_01 RED4EXT_V0_FILEVER(3, 0, 74, 63017) /** * @brief Supports all game versions. @@ -35,4 +36,4 @@ /* * @brief The latest game version. */ -#define RED4EXT_V0_RUNTIME_LATEST RED4EXT_V0_RUNTIME_2_00 +#define RED4EXT_V0_RUNTIME_LATEST RED4EXT_V0_RUNTIME_2_01 diff --git a/include/RED4ext/ResourceLoader.hpp b/include/RED4ext/ResourceLoader.hpp index 2295ff034..89c185c8d 100644 --- a/include/RED4ext/ResourceLoader.hpp +++ b/include/RED4ext/ResourceLoader.hpp @@ -139,7 +139,7 @@ struct ResourceLoader using FindToken_t = uintptr_t (*)(ResourceLoader*, SharedPtr>*, ResourcePath); RelocFunc func(Addresses::ResourceLoader_FindTokenFast); - std::shared_lock _; + std::shared_lock _(tokenLock); SharedPtr> token; func(this, &token, aPath); diff --git a/scripts/patterns.py b/scripts/patterns.py index f9dcbe72f..52e6b30d2 100644 --- a/scripts/patterns.py +++ b/scripts/patterns.py @@ -53,7 +53,7 @@ def get_groups() -> List[Group]: Item(name='sub_98', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?', expected=3, index=2), Item(name='sub_A0', pattern='48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 56 41 57 48 8B EC', expected=538, index=354), Item(name='sub_B0', pattern='48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B 05 ? ? ? ?', expected=1, index=0), - Item(name='sub_C0', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 83 64 24 ? ?', expected=58, index=11), + Item(name='sub_C0', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 83 64 24 ? ?', expected=58, index=12), Item(name='GetMaxAlignment', pattern='48 89 5C 24 ? 57 48 83 EC ? 8B 59 ?', expected=126, index=18), Item(name='sub_D0', pattern='4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56', expected=33, index=26), @@ -197,7 +197,7 @@ def get_groups() -> List[Group]: ]), Group(name='ResourceLoader', pointers=[ - Item(pattern='48 89 05 ? ? ? ? 48 83 C4 ? 5F C3', offset=3, expected=6, index=0) + Item(pattern='48 89 05 ? ? ? ? 48 83 C4 ? 5F C3', offset=3, expected=6, index=1) ], functions=[ Item(name='FindTokenFast', pattern='48 8B C4 4C 89 40 ? 53 48 83 EC ? 48 8B DA 4C 8D 40 ?', expected=2, index=0), From 8aeab3681a381e4499e072af92e808d6f04823db Mon Sep 17 00:00:00 2001 From: pv Date: Thu, 5 Oct 2023 18:21:02 +0300 Subject: [PATCH 2/5] Fix 2.01 --- include/RED4ext/Addresses.hpp | 4 ++-- scripts/patterns.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/RED4ext/Addresses.hpp b/include/RED4ext/Addresses.hpp index 5b5d4f04a..df57f0ded 100644 --- a/include/RED4ext/Addresses.hpp +++ b/include/RED4ext/Addresses.hpp @@ -40,13 +40,13 @@ constexpr uintptr_t CClass_Unserialize = 0x14014CCE4 - ImageBase; // 48 89 5C 24 constexpr uintptr_t CClass_ToString = 0x140920280 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 55 57 41 56 48 8D 6C 24 ? 48 81 EC ? ? ? ?, expected: 341, index: 104 constexpr uintptr_t CClass_sub_80 = 0x141FAE574 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ?, expected: 987, index: 514 constexpr uintptr_t CClass_sub_88 = 0x141FAE4C8 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B 02, expected: 65, index: 34 -constexpr uintptr_t CClass_sub_90 = 0x1409581C0 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?, expected: 3, index: 1 +constexpr uintptr_t CClass_sub_90 = 0x140760AD0 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?, expected: 3, index: 0 constexpr uintptr_t CClass_sub_98 = 0x141FAF750 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?, expected: 3, index: 2 constexpr uintptr_t CClass_sub_A0 = 0x141FAED84 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 56 41 57 48 8B EC, expected: 538, index: 354 constexpr uintptr_t CClass_sub_B0 = 0x14087C070 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B 05 ? ? ? ?, expected: 1, index: 0 constexpr uintptr_t CClass_sub_C0 = 0x140558740 - ImageBase; // 48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 83 64 24 ? ?, expected: 58, index: 12 constexpr uintptr_t CClass_GetMaxAlignment = 0x1405586C4 - ImageBase; // 48 89 5C 24 ? 57 48 83 EC ? 8B 59 ?, expected: 126, index: 18 -constexpr uintptr_t CClass_sub_D0 = 0x14208CE88 - ImageBase; // 4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56, expected: 33, index: 26 +constexpr uintptr_t CClass_sub_D0 = 0x141FAF420 - ImageBase; // 4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56, expected: 33, index: 25 constexpr uintptr_t CClass_CreateInstance = 0x14014C660 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 65 48 8B 04 25 ? ? ? ?, expected: 421, index: 7 constexpr uintptr_t CClass_GetProperty = 0x14014D5E8 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 33 FF 48 8B DA, expected: 4, index: 0 constexpr uintptr_t CClass_GetProperties = 0x140558850 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B D9, expected: 31, index: 5 diff --git a/scripts/patterns.py b/scripts/patterns.py index 52e6b30d2..9e3f5ffa8 100644 --- a/scripts/patterns.py +++ b/scripts/patterns.py @@ -49,13 +49,13 @@ def get_groups() -> List[Group]: Item(name='ToString', pattern='48 89 5C 24 ? 48 89 74 24 ? 55 57 41 56 48 8D 6C 24 ? 48 81 EC ? ? ? ?', expected=341, index=104), Item(name='sub_80', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ?', expected=987, index=514), Item(name='sub_88', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B 02', expected=65, index=34), - Item(name='sub_90', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?', expected=3, index=1), + Item(name='sub_90', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?', expected=3, index=0), Item(name='sub_98', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ?', expected=3, index=2), Item(name='sub_A0', pattern='48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 56 41 57 48 8B EC', expected=538, index=354), Item(name='sub_B0', pattern='48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B 05 ? ? ? ?', expected=1, index=0), Item(name='sub_C0', pattern='48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC ? 83 64 24 ? ?', expected=58, index=12), Item(name='GetMaxAlignment', pattern='48 89 5C 24 ? 57 48 83 EC ? 8B 59 ?', expected=126, index=18), - Item(name='sub_D0', pattern='4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56', expected=33, index=26), + Item(name='sub_D0', pattern='4C 8B DC 49 89 5B ? 49 89 6B ? 49 89 73 ? 57 41 54 41 55 41 56', expected=33, index=25), Item(name='CreateInstance', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 65 48 8B 04 25 ? ? ? ?', expected=421, index=7), Item(name='GetProperty', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 33 FF 48 8B DA', expected=4, index=0), From 1605124ddfe48d99ce0bd15b7c96f2db9225b792 Mon Sep 17 00:00:00 2001 From: pv Date: Thu, 5 Oct 2023 20:30:13 +0300 Subject: [PATCH 3/5] Fix 2.01 --- include/RED4ext/Addresses.hpp | 2 +- scripts/patterns.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/RED4ext/Addresses.hpp b/include/RED4ext/Addresses.hpp index df57f0ded..b1f695f14 100644 --- a/include/RED4ext/Addresses.hpp +++ b/include/RED4ext/Addresses.hpp @@ -104,7 +104,7 @@ constexpr uintptr_t CStack_vtbl = 0x142A08238 - ImageBase; // 48 8D 05 ? ? ? ? 4 #pragma region CString constexpr uintptr_t CString_ctor_str = 0x140251288 - ImageBase; // 48 85 D2 74 15 48 83 C8 FF 48 FF C0, expected: 1, index: 0 -constexpr uintptr_t CString_ctor_span = 0x140678644 - ImageBase; // 40 53 48 83 EC ? 33 C0 48 8B D9 48 89 41 ?, expected: 6, index: 3 +constexpr uintptr_t CString_ctor_span = 0x1409394E4 - ImageBase; // 40 53 48 83 EC ? 33 C0 48 8B D9 48 89 41 ? 88 01 89 41 ? E8, expected: 3, index: 2 constexpr uintptr_t CString_copy = 0x14011DA8C - ImageBase; // B8 ? ? ? ? 39 41 ? 73 19 39 42 ?, expected: 1, index: 0 constexpr uintptr_t CString_dtor = 0x14014A704 - ImageBase; // 40 53 48 83 EC ? 8B 41 ? 48 8B D9 C1 E8 ?, expected: 2, index: 0 #pragma endregion diff --git a/scripts/patterns.py b/scripts/patterns.py index 9e3f5ffa8..e37a3272d 100644 --- a/scripts/patterns.py +++ b/scripts/patterns.py @@ -126,7 +126,7 @@ def get_groups() -> List[Group]: Group(name='CString', functions=[ Item(name='ctor_str', pattern='48 85 D2 74 15 48 83 C8 FF 48 FF C0', expected=1, index=0), - Item(name='ctor_span', pattern='40 53 48 83 EC ? 33 C0 48 8B D9 48 89 41 ?', expected=6, index=3), + Item(name='ctor_span', pattern='40 53 48 83 EC ? 33 C0 48 8B D9 48 89 41 ? 88 01 89 41 ? E8', expected=3, index=2), Item(name='copy', pattern='B8 ? ? ? ? 39 41 ? 73 19 39 42 ?', expected=1, index=0), Item(name='dtor', pattern='40 53 48 83 EC ? 8B 41 ? 48 8B D9 C1 E8 ?', expected=2, index=0) ]), From 643e222581e45bcdf06ee793cc317769b8d7cfa7 Mon Sep 17 00:00:00 2001 From: pv Date: Thu, 5 Oct 2023 20:50:32 +0300 Subject: [PATCH 4/5] Add patch version --- include/RED4ext/Api/Runtime.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/RED4ext/Api/Runtime.hpp b/include/RED4ext/Api/Runtime.hpp index 21de46667..4a54aa5eb 100644 --- a/include/RED4ext/Api/Runtime.hpp +++ b/include/RED4ext/Api/Runtime.hpp @@ -15,6 +15,7 @@ #define RED4EXT_RUNTIME_1_63 RED4EXT_V0_RUNTIME_1_63 #define RED4EXT_RUNTIME_1_63_HOTFIX_1 RED4EXT_V0_RUNTIME_1_63_HOTFIX_1 #define RED4EXT_RUNTIME_2_00 RED4EXT_V0_RUNTIME_2_00 +#define RED4EXT_RUNTIME_2_01 RED4EXT_V0_RUNTIME_2_01 /** * @brief Supports all game versions. From 64805781a8eb7cbdd0404cb222034c6b44a7f4f5 Mon Sep 17 00:00:00 2001 From: pv Date: Thu, 5 Oct 2023 21:41:37 +0300 Subject: [PATCH 5/5] Update RTTI types for 2.01 --- include/RED4ext/Dump/Reflection-inl.hpp | 18 ++++++++--- include/RED4ext/Dump/Reflection.hpp | 1 + .../Natives/Generated/Quaternion.hpp | 2 +- .../Generated/game/DynamicSpawnSystem.hpp | 4 +-- .../Generated/game/GameSessionDesc.hpp | 4 +-- .../Natives/Generated/game/MovingPlatform.hpp | 10 +++---- .../Generated/game/MovingPlatformMoveTo.hpp | 4 ++- .../game/MovingPlatformRestoreMoveTo.hpp | 2 +- .../Generated/gsm/State_PreGameSession.hpp | 4 +-- .../Natives/Generated/gsm/State_Session.hpp | 4 +-- .../gsm/State_SessionRestoreFromSave.hpp | 4 +-- .../quest/ICharacterConditionType.hpp | 2 +- .../quest/UIContextState_ConditionType.hpp | 30 +++++++++++++++++++ .../Generated/quest/UseWorkspotParamsV1.hpp | 2 +- .../Generated/world/ui/RuntimeSystemUI.hpp | 4 +-- 15 files changed, 69 insertions(+), 26 deletions(-) create mode 100644 include/RED4ext/Scripting/Natives/Generated/quest/UIContextState_ConditionType.hpp diff --git a/include/RED4ext/Dump/Reflection-inl.hpp b/include/RED4ext/Dump/Reflection-inl.hpp index 7e67c237d..30dda84ae 100644 --- a/include/RED4ext/Dump/Reflection-inl.hpp +++ b/include/RED4ext/Dump/Reflection-inl.hpp @@ -700,8 +700,6 @@ RED4EXT_INLINE void BitfieldFileDescriptor::EmitFile(std::filesystem::path aOutP o << "struct " << nameQualified; } - // TODO: Struct alignment: __declspec(align(X)) - o << std::endl; o << "{" << std::endl; @@ -783,6 +781,7 @@ RED4EXT_INLINE void ClassDependencyBuilder::ToFileDescriptor(ClassFileDescriptor aFd.trueName = name.ToString(); aFd.size = pType->GetSize(); + aFd.alignment = pType->GetAlignment(); aFd.directory = aTypeToPath(pType); aFd.override = aTypeToOverride(pType); aFd.usedAsHandle = aHandleCompatChecker(pType); @@ -1082,11 +1081,22 @@ RED4EXT_INLINE void ClassFileDescriptor::EmitFile(std::filesystem::path aOutPath o << "namespace " << ns << std::endl; o << "{" << std::endl; - o << "struct " << name; + } + + o << "struct "; + + if (alignment == 0x10) + { + o << "__declspec(align(0x" << std::hex << std::uppercase << alignment << ")) "; + } + + if (nsIndex != std::string::npos) + { + o << name; } else { - o << "struct " << nameQualified; + o << nameQualified; } if (!parent.empty()) diff --git a/include/RED4ext/Dump/Reflection.hpp b/include/RED4ext/Dump/Reflection.hpp index f4975c84a..4cee99d3e 100644 --- a/include/RED4ext/Dump/Reflection.hpp +++ b/include/RED4ext/Dump/Reflection.hpp @@ -49,6 +49,7 @@ struct ClassFileDescriptor std::string override; bool usedAsHandle; size_t size = 0; + size_t alignment = 0; size_t parentSize = 0; struct PropertyDescriptor diff --git a/include/RED4ext/Scripting/Natives/Generated/Quaternion.hpp b/include/RED4ext/Scripting/Natives/Generated/Quaternion.hpp index 6dbb8ba06..86ba9e2e7 100644 --- a/include/RED4ext/Scripting/Natives/Generated/Quaternion.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/Quaternion.hpp @@ -9,7 +9,7 @@ namespace RED4ext { -struct __declspec(align(16)) Quaternion +struct __declspec(align(0x10)) Quaternion { static constexpr const char* NAME = "Quaternion"; static constexpr const char* ALIAS = NAME; diff --git a/include/RED4ext/Scripting/Natives/Generated/game/DynamicSpawnSystem.hpp b/include/RED4ext/Scripting/Natives/Generated/game/DynamicSpawnSystem.hpp index f5c4db19a..f2506c42d 100644 --- a/include/RED4ext/Scripting/Natives/Generated/game/DynamicSpawnSystem.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/game/DynamicSpawnSystem.hpp @@ -17,9 +17,9 @@ struct DynamicSpawnSystem : game::IDynamicSpawnSystem static constexpr const char* NAME = "gameDynamicSpawnSystem"; static constexpr const char* ALIAS = "DynamicSpawnSystem"; - uint8_t unk48[0x120 - 0x48]; // 48 + uint8_t unk48[0x130 - 0x48]; // 48 }; -RED4EXT_ASSERT_SIZE(DynamicSpawnSystem, 0x120); +RED4EXT_ASSERT_SIZE(DynamicSpawnSystem, 0x130); } // namespace game using gameDynamicSpawnSystem = game::DynamicSpawnSystem; using DynamicSpawnSystem = game::DynamicSpawnSystem; diff --git a/include/RED4ext/Scripting/Natives/Generated/game/GameSessionDesc.hpp b/include/RED4ext/Scripting/Natives/Generated/game/GameSessionDesc.hpp index 35a3e4a46..e384881fb 100644 --- a/include/RED4ext/Scripting/Natives/Generated/game/GameSessionDesc.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/game/GameSessionDesc.hpp @@ -16,9 +16,9 @@ struct GameSessionDesc static constexpr const char* NAME = "gameGameSessionDesc"; static constexpr const char* ALIAS = NAME; - uint8_t unk00[0x1C0 - 0x0]; // 0 + uint8_t unk00[0x1D0 - 0x0]; // 0 }; -RED4EXT_ASSERT_SIZE(GameSessionDesc, 0x1C0); +RED4EXT_ASSERT_SIZE(GameSessionDesc, 0x1D0); } // namespace game using gameGameSessionDesc = game::GameSessionDesc; } // namespace RED4ext diff --git a/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatform.hpp b/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatform.hpp index e27e838aa..e43533850 100644 --- a/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatform.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatform.hpp @@ -23,12 +23,12 @@ struct MovingPlatform : ent::IPlacedComponent CName soundPositionName; // 1A8 uint8_t unk1B0[0x1DC - 0x1B0]; // 1B0 game::MovingPlatformLoopType loopType; // 1DC - uint8_t unk1E0[0x1E3 - 0x1E0]; // 1E0 - bool supportLegacyUnalignedMarkers; // 1E3 - bool enableWaterInteractions; // 1E4 - uint8_t unk1E5[0x1F0 - 0x1E5]; // 1E5 + uint8_t unk1E0[0x1E8 - 0x1E0]; // 1E0 + bool supportLegacyUnalignedMarkers; // 1E8 + bool enableWaterInteractions; // 1E9 + uint8_t unk1EA[0x200 - 0x1EA]; // 1EA }; -RED4EXT_ASSERT_SIZE(MovingPlatform, 0x1F0); +RED4EXT_ASSERT_SIZE(MovingPlatform, 0x200); } // namespace game using gameMovingPlatform = game::MovingPlatform; using MovingPlatform = game::MovingPlatform; diff --git a/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformMoveTo.hpp b/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformMoveTo.hpp index 76ecaee70..3d3aba409 100644 --- a/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformMoveTo.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformMoveTo.hpp @@ -25,8 +25,10 @@ struct MovingPlatformMoveTo : red::Event CName destinationName; // 50 int32_t data; // 58 uint8_t unk5C[0x60 - 0x5C]; // 5C + bool isElevator; // 60 + uint8_t unk61[0x68 - 0x61]; // 61 }; -RED4EXT_ASSERT_SIZE(MovingPlatformMoveTo, 0x60); +RED4EXT_ASSERT_SIZE(MovingPlatformMoveTo, 0x68); } // namespace game using gameMovingPlatformMoveTo = game::MovingPlatformMoveTo; using MoveTo = game::MovingPlatformMoveTo; diff --git a/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformRestoreMoveTo.hpp b/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformRestoreMoveTo.hpp index 708f9bcdb..f82a718ff 100644 --- a/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformRestoreMoveTo.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/game/MovingPlatformRestoreMoveTo.hpp @@ -17,7 +17,7 @@ struct MovingPlatformRestoreMoveTo : game::MovingPlatformMoveTo static constexpr const char* NAME = "gameMovingPlatformRestoreMoveTo"; static constexpr const char* ALIAS = NAME; - uint8_t unk60[0x90 - 0x60]; // 60 + uint8_t unk68[0x90 - 0x68]; // 68 }; RED4EXT_ASSERT_SIZE(MovingPlatformRestoreMoveTo, 0x90); } // namespace game diff --git a/include/RED4ext/Scripting/Natives/Generated/gsm/State_PreGameSession.hpp b/include/RED4ext/Scripting/Natives/Generated/gsm/State_PreGameSession.hpp index ef358cf9a..19179f28b 100644 --- a/include/RED4ext/Scripting/Natives/Generated/gsm/State_PreGameSession.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/gsm/State_PreGameSession.hpp @@ -17,9 +17,9 @@ struct State_PreGameSession : gsm::State_Session static constexpr const char* NAME = "gsmState_PreGameSession"; static constexpr const char* ALIAS = NAME; - uint8_t unk320[0x330 - 0x320]; // 320 + uint8_t unk330[0x340 - 0x330]; // 330 }; -RED4EXT_ASSERT_SIZE(State_PreGameSession, 0x330); +RED4EXT_ASSERT_SIZE(State_PreGameSession, 0x340); } // namespace gsm using gsmState_PreGameSession = gsm::State_PreGameSession; } // namespace RED4ext diff --git a/include/RED4ext/Scripting/Natives/Generated/gsm/State_Session.hpp b/include/RED4ext/Scripting/Natives/Generated/gsm/State_Session.hpp index c4a8ab09e..e3e628df4 100644 --- a/include/RED4ext/Scripting/Natives/Generated/gsm/State_Session.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/gsm/State_Session.hpp @@ -17,9 +17,9 @@ struct State_Session : gsm::State static constexpr const char* NAME = "gsmState_Session"; static constexpr const char* ALIAS = NAME; - uint8_t unkB8[0x320 - 0xB8]; // B8 + uint8_t unkB8[0x330 - 0xB8]; // B8 }; -RED4EXT_ASSERT_SIZE(State_Session, 0x320); +RED4EXT_ASSERT_SIZE(State_Session, 0x330); } // namespace gsm using gsmState_Session = gsm::State_Session; } // namespace RED4ext diff --git a/include/RED4ext/Scripting/Natives/Generated/gsm/State_SessionRestoreFromSave.hpp b/include/RED4ext/Scripting/Natives/Generated/gsm/State_SessionRestoreFromSave.hpp index fbd502dcf..d682b2c0a 100644 --- a/include/RED4ext/Scripting/Natives/Generated/gsm/State_SessionRestoreFromSave.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/gsm/State_SessionRestoreFromSave.hpp @@ -17,9 +17,9 @@ struct State_SessionRestoreFromSave : gsm::State static constexpr const char* NAME = "gsmState_SessionRestoreFromSave"; static constexpr const char* ALIAS = NAME; - uint8_t unkB8[0x2A0 - 0xB8]; // B8 + uint8_t unkB8[0x2B0 - 0xB8]; // B8 }; -RED4EXT_ASSERT_SIZE(State_SessionRestoreFromSave, 0x2A0); +RED4EXT_ASSERT_SIZE(State_SessionRestoreFromSave, 0x2B0); } // namespace gsm using gsmState_SessionRestoreFromSave = gsm::State_SessionRestoreFromSave; } // namespace RED4ext diff --git a/include/RED4ext/Scripting/Natives/Generated/quest/ICharacterConditionType.hpp b/include/RED4ext/Scripting/Natives/Generated/quest/ICharacterConditionType.hpp index 2b95ae848..e01f20182 100644 --- a/include/RED4ext/Scripting/Natives/Generated/quest/ICharacterConditionType.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/quest/ICharacterConditionType.hpp @@ -18,7 +18,7 @@ struct ICharacterConditionType : quest::IConditionType static constexpr const char* NAME = "questICharacterConditionType"; static constexpr const char* ALIAS = NAME; - game::EntityReference puppetRef; // 38 + game::EntityReference objectRef; // 38 bool isPlayer; // 70 uint8_t unk71[0x78 - 0x71]; // 71 }; diff --git a/include/RED4ext/Scripting/Natives/Generated/quest/UIContextState_ConditionType.hpp b/include/RED4ext/Scripting/Natives/Generated/quest/UIContextState_ConditionType.hpp new file mode 100644 index 000000000..0a9f685eb --- /dev/null +++ b/include/RED4ext/Scripting/Natives/Generated/quest/UIContextState_ConditionType.hpp @@ -0,0 +1,30 @@ +#pragma once + +// clang-format off + +// This file is generated from the Game's Reflection data + +#include +#include +#include +#include + +namespace RED4ext +{ +namespace quest +{ +struct UIContextState_ConditionType : quest::IUIConditionType +{ + static constexpr const char* NAME = "questUIContextState_ConditionType"; + static constexpr const char* ALIAS = NAME; + + game::ui::Context state; // 38 + bool active; // 3C + uint8_t unk3D[0x40 - 0x3D]; // 3D +}; +RED4EXT_ASSERT_SIZE(UIContextState_ConditionType, 0x40); +} // namespace quest +using questUIContextState_ConditionType = quest::UIContextState_ConditionType; +} // namespace RED4ext + +// clang-format on diff --git a/include/RED4ext/Scripting/Natives/Generated/quest/UseWorkspotParamsV1.hpp b/include/RED4ext/Scripting/Natives/Generated/quest/UseWorkspotParamsV1.hpp index 7f510edac..8c3be44b8 100644 --- a/include/RED4ext/Scripting/Natives/Generated/quest/UseWorkspotParamsV1.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/quest/UseWorkspotParamsV1.hpp @@ -52,7 +52,7 @@ struct UseWorkspotParamsV1 : quest::AICommandParams bool repeatCommandOnInterrupt; // CC bool continueInCombat; // CD bool meshDissolvingEnabled; // CE - uint8_t unkCF[0xD0 - 0xCF]; // CF + bool dangleResetSimulation; // CF }; RED4EXT_ASSERT_SIZE(UseWorkspotParamsV1, 0xD0); } // namespace quest diff --git a/include/RED4ext/Scripting/Natives/Generated/world/ui/RuntimeSystemUI.hpp b/include/RED4ext/Scripting/Natives/Generated/world/ui/RuntimeSystemUI.hpp index 7ef33ef66..d362bdf8d 100644 --- a/include/RED4ext/Scripting/Natives/Generated/world/ui/RuntimeSystemUI.hpp +++ b/include/RED4ext/Scripting/Natives/Generated/world/ui/RuntimeSystemUI.hpp @@ -17,9 +17,9 @@ struct RuntimeSystemUI : world::IRuntimeSystem static constexpr const char* NAME = "worlduiRuntimeSystemUI"; static constexpr const char* ALIAS = NAME; - uint8_t unk48[0x260 - 0x48]; // 48 + uint8_t unk48[0x298 - 0x48]; // 48 }; -RED4EXT_ASSERT_SIZE(RuntimeSystemUI, 0x260); +RED4EXT_ASSERT_SIZE(RuntimeSystemUI, 0x298); } // namespace world::ui using worlduiRuntimeSystemUI = world::ui::RuntimeSystemUI; } // namespace RED4ext