mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2024-12-22 14:37:31 +08:00
Added scrValue (#116)
This commit is contained in:
parent
22b0242869
commit
14adf08cac
19
rage/scrValue.hpp
Normal file
19
rage/scrValue.hpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
using LPCSTR = const char*; //For Linux support, but I didn't want to make the class inaccurate
|
||||||
|
|
||||||
|
namespace rage
|
||||||
|
{
|
||||||
|
union scrValue
|
||||||
|
{
|
||||||
|
int Int;
|
||||||
|
unsigned int Uns;
|
||||||
|
float Float;
|
||||||
|
LPCSTR String;
|
||||||
|
scrValue* Reference;
|
||||||
|
uint64_t Any;
|
||||||
|
bool operator==(const scrValue& val) {
|
||||||
|
return Int == val.Int;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "../base/pgBase.hpp"
|
#include "../base/pgBase.hpp"
|
||||||
|
#include "../rage/scrValue.hpp"
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
namespace rage
|
namespace rage
|
||||||
@ -16,9 +17,9 @@ namespace rage
|
|||||||
std::uint32_t m_local_count; // 0x24
|
std::uint32_t m_local_count; // 0x24
|
||||||
std::uint32_t m_global_count; // 0x28
|
std::uint32_t m_global_count; // 0x28
|
||||||
std::uint32_t m_native_count; // 0x2C
|
std::uint32_t m_native_count; // 0x2C
|
||||||
void *m_local_data; // 0x30
|
scrValue *m_local_data; // 0x30
|
||||||
std::int64_t **m_global_data; // 0x38
|
scrValue **m_global_data; // 0x38
|
||||||
void **m_native_entrypoints; // 0x40
|
scrNativeHandler *m_native_entrypoints; // 0x40
|
||||||
std::uint32_t m_proc_count; // 0x48
|
std::uint32_t m_proc_count; // 0x48
|
||||||
char pad_004C[4]; // 0x4C
|
char pad_004C[4]; // 0x4C
|
||||||
const char** m_proc_names; // 0x50
|
const char** m_proc_names; // 0x50
|
||||||
@ -84,7 +85,7 @@ namespace rage
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void** get_address_of_native_entrypoint(void* entrypoint)
|
scrNativeHandler* get_address_of_native_entrypoint(scrNativeHandler entrypoint)
|
||||||
{
|
{
|
||||||
for (std::uint32_t i = 0; i < m_native_count; ++i)
|
for (std::uint32_t i = 0; i < m_native_count; ++i)
|
||||||
{
|
{
|
||||||
@ -99,4 +100,4 @@ namespace rage
|
|||||||
};
|
};
|
||||||
static_assert(sizeof(scrProgram) == 0x80);
|
static_assert(sizeof(scrProgram) == 0x80);
|
||||||
}
|
}
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "scriptHandler.hpp"
|
#include "scriptHandler.hpp"
|
||||||
#include "scriptHandlerNetComponent.hpp"
|
#include "scriptHandlerNetComponent.hpp"
|
||||||
#include "scrThreadContext.hpp"
|
#include "scrThreadContext.hpp"
|
||||||
|
#include "../rage/scrValue.hpp"
|
||||||
|
|
||||||
namespace rage
|
namespace rage
|
||||||
{
|
{
|
||||||
@ -16,7 +17,7 @@ namespace rage
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
scrThreadContext m_context; // 0x08
|
scrThreadContext m_context; // 0x08
|
||||||
void* m_stack; // 0xB0
|
scrValue* m_stack; // 0xB0
|
||||||
char m_padding[0x4]; // 0xB8
|
char m_padding[0x4]; // 0xB8
|
||||||
uint32_t m_arg_size; // 0xBC
|
uint32_t m_arg_size; // 0xBC
|
||||||
uint32_t m_arg_loc; // 0xC0
|
uint32_t m_arg_loc; // 0xC0
|
||||||
@ -28,4 +29,4 @@ namespace rage
|
|||||||
scriptHandlerNetComponent* m_net_component; // 0x11C
|
scriptHandlerNetComponent* m_net_component; // 0x11C
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user