mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2024-12-22 22:47:32 +08:00
7fe43eb735
* fix(scrProgramTable): Removed unused include * feat(GtaThread): Actually commit file contents
39 lines
846 B
C++
39 lines
846 B
C++
#pragma once
|
|
#include "scrProgramTableEntry.hpp"
|
|
|
|
#pragma pack(push, 1)
|
|
namespace rage
|
|
{
|
|
class scrProgramTable
|
|
{
|
|
public:
|
|
scrProgramTableEntry* m_data; // 0x00
|
|
char m_padding[0x10]; // 0x08
|
|
std::uint32_t m_size; // 0x18
|
|
|
|
scrProgram* find_script(joaat_t hash)
|
|
{
|
|
for (std::uint32_t i = 0; i < m_size; ++i)
|
|
{
|
|
if (m_data[i].m_hash == hash)
|
|
{
|
|
return m_data[i].m_program;
|
|
}
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
scrProgramTableEntry* begin()
|
|
{
|
|
return m_data;
|
|
}
|
|
|
|
scrProgramTableEntry* end()
|
|
{
|
|
return m_data + m_size;
|
|
}
|
|
};
|
|
static_assert(sizeof(scrProgramTable) == 0x1C);
|
|
}
|
|
#pragma pack(pop) |