This commit is contained in:
Oscar
2025-07-17 13:52:06 +03:00
commit 2f50c8a911
206 changed files with 246874 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#pragma once
#include <cstddef>
#include <cstdint>
namespace M {
template <typename T, std::size_t nIndex, class CBaseClass, typename... Args_t>
static inline T vfunc(CBaseClass* thisptr, Args_t... argList) {
using VirtualFn_t = T(__thiscall*)(const void*, decltype(argList)...);
return (*reinterpret_cast<VirtualFn_t* const*>(reinterpret_cast<std::uintptr_t>(thisptr)))[nIndex](thisptr, argList...);
}
}