mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00

* feat(Spoofing): add spoofing * feat(Spoofing): prepare code for player attach * remove(PlayerAttach): isn't going to work due to netsync architecture * fix(GUI): fix scaling * feat(Project): add clang-format file * feat(Classes): update classes * fix(BlackHole): remove unnecessary cleanup * fix(Formatting): fix formatting for initializer lists * feat(clang-format): Set tab width and 1 space before comment Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
35 lines
741 B
C++
35 lines
741 B
C++
#include "script_local.hpp"
|
|
|
|
#include "common.hpp"
|
|
#include "gta/script_thread.hpp"
|
|
#include "pointers.hpp"
|
|
|
|
namespace big
|
|
{
|
|
script_local::script_local(rage::scrThread* thread, std::size_t index) :
|
|
m_index(index),
|
|
m_stack(thread->m_stack)
|
|
{
|
|
}
|
|
script_local::script_local(PVOID stack, std::size_t index) :
|
|
m_index(index),
|
|
m_stack(stack)
|
|
{
|
|
}
|
|
|
|
script_local script_local::at(std::ptrdiff_t index)
|
|
{
|
|
return script_local(m_stack, m_index + index);
|
|
}
|
|
|
|
script_local script_local::at(std::ptrdiff_t index, std::size_t size)
|
|
{
|
|
return script_local(m_stack, m_index + 1 + (index * size));
|
|
}
|
|
|
|
void* script_local::get()
|
|
{
|
|
return reinterpret_cast<uintptr_t*>((uintptr_t)m_stack + (m_index * sizeof(uintptr_t)));
|
|
}
|
|
}
|