Skip to content

Commit

Permalink
Update for patch 1.52
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed Mar 22, 2022
1 parent e462ff1 commit 8277f14
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
url = git@github.com:microsoft/wil.git
[submodule "vendor/semver"]
path = vendor/semver
url = git@github.com:Neargye/semver
url = git@github.com:Neargye/semver.git
8 changes: 4 additions & 4 deletions lib/Engine/Addresses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace Engine::Addresses
{
constexpr uintptr_t ImageBase = 0x140000000;

constexpr uintptr_t Engine_Main = 0x140191BD0 - ImageBase; // 40 53 48 81 EC ? ? ? ? FF 15 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ?, expected: 1, index: 0
constexpr uintptr_t ResourceReference_Load = 0x140247B00 - ImageBase; // 48 89 5C 24 10 57 48 83 EC 30 48 8D 59 08 48 8B F9 48 8B 0B 48 85 C9, expected: 1, index: 0
constexpr uintptr_t ResourceReference_Fetch = 0x140247BB0 - ImageBase; // 40 53 48 83 EC 20 48 8B D9 E8 ? ? ? ? 48 8B 4B 08 48 85 C9 74 0A, expected: 1, index: 0
constexpr uintptr_t ResourceReference_Reset = 0x140247A90 - ImageBase; // 48 83 EC 38 45 33 C0 4C 89 01 48 8B 51 10 48 8B 41 08 48 89 54 24 28 4C 89 41 10 48 89 44 24 20, expected: 1, index: 0
constexpr uintptr_t Engine_Main = 0x140191C50 - ImageBase; // 40 53 48 81 EC ? ? ? ? FF 15 ? ? ? ? E8 ? ? ? ? E8 ? ? ? ?, expected: 1, index: 0
constexpr uintptr_t ResourceReference_Load = 0x140247CF0 - ImageBase; // 48 89 5C 24 10 57 48 83 EC 30 48 8D 59 08 48 8B F9 48 8B 0B 48 85 C9, expected: 1, index: 0
constexpr uintptr_t ResourceReference_Fetch = 0x140247DA0 - ImageBase; // 40 53 48 83 EC 20 48 8B D9 E8 ? ? ? ? 48 8B 4B 08 48 85 C9 74 0A, expected: 1, index: 0
constexpr uintptr_t ResourceReference_Reset = 0x140247C80 - ImageBase; // 48 83 EC 38 45 33 C0 4C 89 01 48 8B 51 10 48 8B 41 08 48 89 54 24 28 4C 89 41 10 48 89 44 24 20, expected: 1, index: 0
}
4 changes: 2 additions & 2 deletions lib/TweakDB/Addresses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ namespace TweakDB::Addresses
{
constexpr uintptr_t ImageBase = 0x140000000;

constexpr uintptr_t TweakDB_Load = 0x140BC8D20 - ImageBase; // 48 89 5C 24 18 55 57 41 56 48 8B EC 48 83 EC 70 48 8B D9 45 33 F6 48 8D, expected: 1, index: 0
constexpr uintptr_t TweakDBID_Derive = 0x142B8F590 - ImageBase; // 40 53 48 83 EC 30 33 C0 4C 89 44 24 20 48 8B DA, expected: 1, index: 0
constexpr uintptr_t TweakDB_Load = 0x140BC8EF0 - ImageBase; // 48 89 5C 24 18 55 57 41 56 48 8B EC 48 83 EC 70 48 8B D9 45 33 F6 48 8D, expected: 1, index: 0
constexpr uintptr_t TweakDBID_Derive = 0x142B90910 - ImageBase; // 40 53 48 83 EC 30 33 C0 4C 89 44 24 20 48 8B DA, expected: 1, index: 0
}
6 changes: 6 additions & 0 deletions lib/TweakDB/FlatPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ void TweakDB::FlatPool::Initialize()
auto offset = RED4ext::AlignUp(static_cast<uint32_t>(m_offsetEnd), FlatAlignment);
while (offset < offsetEnd)
{
// The current offset should always point to the VFT of the next flat.
// If there's zero instead, that means the next value is 16-byte aligned,
// and we need to skip the 8-byte padding to get to the flat.
if (*reinterpret_cast<uint64_t*>(m_tweakDb->flatDataBuffer + offset) == 0ull)
offset += 8u;

const auto data = GetFlatData(static_cast<int32_t>(offset));
const auto poolKey = data.type->GetName();

Expand Down
2 changes: 1 addition & 1 deletion src/Project.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ constexpr auto Version = []() {

// v1.2.3 => 1.2.3
// v1.2.3-type => 1.2.3-type
if (appendix == std::string::npos || tag[appendix + 1] > 'a')
if (appendix == std::string::npos || tag.find('-', appendix + 1) == std::string::npos)
{
version.from_string(tag.substr(1));
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/wil
Submodule wil updated 1 files
+1 −1 README.md

0 comments on commit 8277f14

Please sign in to comment.