#include "math.h" //used: getexportaddr #include "memory.h" bool MATH::Setup() { bool bSuccess = true; const void* hTier0Lib = MEM::GetModuleBaseHandle(TIER0_DLL); if (hTier0Lib == nullptr) return false; fnRandomSeed = reinterpret_cast(MEM::GetExportAddress(hTier0Lib, CS_XOR("RandomSeed"))); bSuccess &= (fnRandomSeed != nullptr); fnRandomFloat = reinterpret_cast(MEM::GetExportAddress(hTier0Lib, CS_XOR("RandomFloat"))); bSuccess &= (fnRandomFloat != nullptr); fnRandomFloatExp = reinterpret_cast(MEM::GetExportAddress(hTier0Lib, CS_XOR("RandomFloatExp"))); bSuccess &= (fnRandomFloatExp != nullptr); fnRandomInt = reinterpret_cast(MEM::GetExportAddress(hTier0Lib, CS_XOR("RandomInt"))); bSuccess &= (fnRandomInt != nullptr); fnRandomGaussianFloat = reinterpret_cast(MEM::GetExportAddress(hTier0Lib, CS_XOR("RandomGaussianFloat"))); bSuccess &= (fnRandomGaussianFloat != nullptr); return bSuccess; }