2021-04-20 00:56:11 +02:00
|
|
|
#pragma once
|
|
|
|
|
2021-04-23 20:57:21 +02:00
|
|
|
#include "structs.hpp"
|
|
|
|
|
2021-04-20 00:56:11 +02:00
|
|
|
namespace game
|
|
|
|
{
|
|
|
|
extern uint64_t base_address;
|
|
|
|
|
|
|
|
void load_base_address();
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
class symbol
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
symbol(const size_t address)
|
|
|
|
: address_(reinterpret_cast<T*>(address))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
T* get() const
|
|
|
|
{
|
|
|
|
return reinterpret_cast<T*>((uint64_t)address_ + base_address);
|
|
|
|
}
|
|
|
|
|
|
|
|
operator T* () const
|
|
|
|
{
|
|
|
|
return this->get();
|
|
|
|
}
|
|
|
|
|
|
|
|
T* operator->() const
|
|
|
|
{
|
|
|
|
return this->get();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
T* address_;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "symbols.hpp"
|