mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
60887cb816
- Add more metrics to bad_metrics set - Add MM Filtering (This metric shouldnt be normally called anyway) - Improve QD Hook to increase AC verifier delay when detected - Removed gameskeleton hook in favor of patching ac at init - Added tamperactions check to gameskeleton patcher
40 lines
733 B
C++
40 lines
733 B
C++
#pragma once
|
|
#include "common.hpp"
|
|
|
|
namespace big
|
|
{
|
|
class script_global
|
|
{
|
|
public:
|
|
constexpr script_global(std::size_t index) :
|
|
m_index(index)
|
|
{
|
|
}
|
|
|
|
constexpr script_global at(std::ptrdiff_t index) const
|
|
{
|
|
return m_index + index;
|
|
}
|
|
constexpr script_global at(std::ptrdiff_t index, std::size_t size) const
|
|
{
|
|
return m_index + 1 + (index * size);
|
|
}
|
|
|
|
template<typename T>
|
|
std::enable_if_t<std::is_pointer_v<T>, T> as() const
|
|
{
|
|
return static_cast<T>(get());
|
|
}
|
|
|
|
template<typename T>
|
|
std::enable_if_t<std::is_lvalue_reference_v<T>, T> as() const
|
|
{
|
|
return *static_cast<std::add_pointer_t<std::remove_reference_t<T>>>(get());
|
|
}
|
|
|
|
private:
|
|
void* get() const;
|
|
std::size_t m_index;
|
|
};
|
|
}
|