mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
Replace offset.bin's header version variable with TimeDateStamp. (#2832)
* Replace offset.bin's header version variable with TimeDateStamp. * Broke out Read Attribute Patch into two signatures.
This commit is contained in:
parent
e8027127d1
commit
0f8cec4604
@ -44,6 +44,11 @@ namespace memory
|
||||
return m_size;
|
||||
}
|
||||
|
||||
DWORD module::timestamp() const
|
||||
{
|
||||
return m_timestamp;
|
||||
}
|
||||
|
||||
bool module::wait_for_module(std::optional<std::chrono::high_resolution_clock::duration> time)
|
||||
{
|
||||
const auto giveup_time = time.has_value() ? std::make_optional(std::chrono::high_resolution_clock::now() + time.value()) : std::nullopt;
|
||||
@ -72,6 +77,7 @@ namespace memory
|
||||
const auto ntHeader = m_base.add(dosHeader->e_lfanew).as<IMAGE_NT_HEADERS*>();
|
||||
|
||||
m_size = ntHeader->OptionalHeader.SizeOfImage;
|
||||
m_timestamp = ntHeader->FileHeader.TimeDateStamp;
|
||||
|
||||
return m_loaded;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ namespace memory
|
||||
|
||||
bool loaded() const;
|
||||
size_t size() const;
|
||||
DWORD timestamp() const;
|
||||
|
||||
/**
|
||||
* @brief Waits till the given module is loaded.
|
||||
|
@ -23,5 +23,6 @@ namespace memory
|
||||
protected:
|
||||
handle m_base;
|
||||
std::size_t m_size;
|
||||
DWORD m_timestamp;
|
||||
};
|
||||
}
|
||||
|
@ -1813,7 +1813,15 @@ namespace big
|
||||
[](memory::handle ptr)
|
||||
{
|
||||
g_pointers->m_sc.m_read_attribute_patch = ptr.as<PVOID>();
|
||||
g_pointers->m_sc.m_read_attribute_patch_2 = ptr.add(0x72).as<PVOID>();
|
||||
}
|
||||
},
|
||||
// Read Attribute Patch 2
|
||||
{
|
||||
"RAP2",
|
||||
"32 C0 EB ? C7 83",
|
||||
[](memory::handle ptr)
|
||||
{
|
||||
g_pointers->m_sc.m_read_attribute_patch_2 = ptr.as<PVOID>();
|
||||
}
|
||||
}
|
||||
>();
|
||||
|
@ -80,7 +80,7 @@ namespace big
|
||||
|
||||
cache_file.set_data(std::move(cache_data_ptr), data_size);
|
||||
|
||||
cache_file.set_header_version(mem_region.size());
|
||||
cache_file.set_header_version(mem_region.timestamp());
|
||||
cache_file.write();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user