mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 14:57:27 +08:00
feat(Util/System): Get rel address of pointer
This commit is contained in:
parent
5cea9d40e7
commit
84d04a9e4d
@ -25,6 +25,13 @@ namespace big::system
|
||||
file.close();
|
||||
}
|
||||
|
||||
inline uintptr_t get_relative_address(void* ptr)
|
||||
{
|
||||
uintptr_t base_address = memory::module(nullptr).begin().as<uintptr_t>();
|
||||
|
||||
return (uintptr_t)ptr - base_address;
|
||||
}
|
||||
|
||||
inline void patch_blame(bool toggle)
|
||||
{
|
||||
*(unsigned short*)g_pointers->m_blame_explode = toggle ? 0xE990 : 0x850F;
|
||||
|
Loading…
x
Reference in New Issue
Block a user