Revert "baseaddr"

This reverts commit 05696f1ec5.
This commit is contained in:
Skull Merlin 2022-03-05 02:35:20 +02:00
parent d6bbfad1e7
commit 5fe6b85a1a
2 changed files with 2 additions and 20 deletions

View File

@ -3,14 +3,6 @@
namespace game
{
uint64_t base_address;
void load_base_address()
{
const auto module = GetModuleHandle(NULL);
base_address = uint64_t(module);
}
int Cmd_Argc()
{
return cmd_args->argc[cmd_args->nesting];
@ -110,8 +102,3 @@ namespace game
}
}
}
uintptr_t operator"" _b(const uintptr_t ptr)
{
return game::base_address + ptr;
}

View File

@ -9,9 +9,6 @@
namespace game
{
extern uint64_t base_address;
void load_base_address();
namespace environment
{
launcher::mode get_mode();
@ -40,10 +37,10 @@ namespace game
{
if (environment::is_sp())
{
return reinterpret_cast<T*>((uint64_t)sp_object_ + base_address);
return sp_object_;
}
return reinterpret_cast<T*>((uint64_t)mp_object_ + base_address);
return mp_object_;
}
operator T* () const
@ -70,6 +67,4 @@ namespace game
bool VirtualLobby_Loaded();
}
uintptr_t operator"" _b(const uintptr_t ptr);
#include "symbols.hpp"