This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/BigBaseV2/src/script_global.cpp
2019-06-23 22:00:18 +02:00

27 lines
525 B
C++

#include "common.hpp"
#include "pointers.hpp"
#include "script_global.hpp"
namespace big
{
script_global::script_global(std::size_t index) :
m_index(index)
{
}
script_global script_global::at(std::ptrdiff_t index)
{
return script_global(m_index + index);
}
script_global script_global::at(std::ptrdiff_t index, std::size_t size)
{
return script_global(m_index + 1 + (index * size));
}
void *script_global::get()
{
return g_pointers->m_script_globals[m_index >> 0x12 & 0x3F] + (m_index & 0x3FFFF);
}
}