File HookManager.hpp

class function_id

Public Static Functions

template<auto Fn>
static inline consteval uint64_t hash_code()
template<auto Fn>
static inline consteval std::string_view name()
class HookManager

Public Functions

template<auto OriginalFn>
inline void CreateHook(SafetyHookInline &trampoline, void *hook)
inline void CreateHookAbsolute(SafetyHookInline &safetyHookTrampoline, uintptr_t originalAddress, void *hook)

Directly hooks a function with an absolute address CAUTION: This will not work if two mods want to hook the same function. For more compatibility, use HookManager::CreateHook

template<auto Func>
inline void RegisterFunction(std::string_view signature)
template<auto Func>
inline void RegisterFunction(uintptr_t address)
void Shutdown()

Private Members

std::vector<SafetyHookInline*> mHooks
std::unordered_map<size_t, uintptr_t> mFuncHashToOriginalAddress