mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2026-10-10 03:43:17 +08:00
feat(Classes): Updated CBaseModelInfo, CPlayerGameStateDataNode and fwEntity (#24)
* Fixed eModelType enum value names * CBaseModelInfo: Changed min/max dimension types from fvector3 to fvector4 * CBaseModelInfo: Adjusted to actual size * Added datBase, fwRefAwareBase, fwRefAwareBaseImpl, fwExtensibleBase, fwExtension, fwExtensionContainer and pgBase classes * CPlayerGameStateDataNode: Updated fields and resized to actual size * CVehicleModelInfo: Resized because of modified CBaseModelInfo
This commit is contained in:
+28
-14
@@ -8,8 +8,8 @@ enum class eModelType : std::uint8_t
|
||||
{
|
||||
Invalid,
|
||||
Object,
|
||||
Interior,
|
||||
Window,
|
||||
MLO,
|
||||
Time,
|
||||
Weapon,
|
||||
Vehicle,
|
||||
Ped,
|
||||
@@ -27,19 +27,33 @@ enum class eModelType : std::uint8_t
|
||||
Unk193 = 193
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
#pragma pack(push, 8)
|
||||
class CBaseModelInfo
|
||||
{
|
||||
public:
|
||||
char pad_0000[24]; //0x0000
|
||||
uint32_t m_model_hash; //0x0018
|
||||
char pad_001C[20]; //0x001C
|
||||
rage::fvector3 m_min_dimensions; //0x0030
|
||||
char pad_003C[4]; //0x003C
|
||||
rage::fvector3 m_max_dimensions; //0x0040
|
||||
char pad_004C[81]; //0x004C
|
||||
eModelType m_model_type; //0x009D
|
||||
char pad_009E[6]; //0x009E
|
||||
}; //Size: 0x00A4
|
||||
static_assert(sizeof(CBaseModelInfo) == 0xA4);
|
||||
char pad_0000[24]; //0x0000
|
||||
uint32_t m_model_hash; //0x0018
|
||||
char pad_001C[20]; //0x001C
|
||||
rage::fvector4 m_axis_aligned_bounding_box_min; //0x0030
|
||||
rage::fvector4 m_axis_aligned_bounding_box_max; //0x0040
|
||||
uint32_t m_flags;
|
||||
char pad_0054[4];
|
||||
uint16_t unk_0x58;
|
||||
char pad_005A[6];
|
||||
uint8_t m_drawable_type;
|
||||
char pad_0061;
|
||||
uint16_t m_drawable_index;
|
||||
char pad_0064[6];
|
||||
uint16_t unk_0x6A;
|
||||
char pad_006C[12];
|
||||
uint64_t unk_0x78;
|
||||
uint64_t unk_0x80;
|
||||
char pad_0088[8];
|
||||
uint64_t unk_0x90;
|
||||
char pad_0098[5];
|
||||
eModelType m_model_type;
|
||||
char pad_009E[6];
|
||||
uint64_t unk_0xA8;
|
||||
}; //Size: 0x00B0
|
||||
static_assert(sizeof(CBaseModelInfo) == 0xB0);
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
class datBase
|
||||
{
|
||||
public:
|
||||
virtual ~datBase() = default;
|
||||
}; //Size: 0x0008
|
||||
static_assert(sizeof(datBase) == 0x8);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "fwRefAwareBase.hpp"
|
||||
#include "fwExtensionContainer.hpp"
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
class fwExtensibleBase : public fwRefAwareBase
|
||||
{
|
||||
public:
|
||||
virtual bool is_of_type(std::uint32_t hash) = 0;
|
||||
virtual uint32_t const &get_type() = 0;
|
||||
|
||||
fwExtensionContainer* m_extension_container; // 0x0010
|
||||
void *m_extensible_unk; // 0x0018
|
||||
|
||||
template <typename T>
|
||||
bool is_of_type()
|
||||
{
|
||||
static auto name = (typeid(T).name()) + 6; // Skip "class "
|
||||
static auto name_hash = joaat(name);
|
||||
|
||||
return is_of_type(name_hash);
|
||||
}
|
||||
}; //Size: 0x0020
|
||||
static_assert(sizeof(fwExtensibleBase) == 0x20);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
class fwExtension
|
||||
{
|
||||
public:
|
||||
virtual ~fwExtension() = default;
|
||||
virtual void unk_0x08() = 0;
|
||||
virtual void unk_0x10() = 0;
|
||||
virtual uint32_t get_id() = 0;
|
||||
}; //Size: 0x0008
|
||||
static_assert(sizeof(fwExtension) == 0x8);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "fwExtension.hpp"
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
class fwExtensionContainer
|
||||
{
|
||||
public:
|
||||
fwExtension *m_entry; //0x0000
|
||||
fwExtensionContainer* m_next; //0x0008
|
||||
}; //Size: 0x0010
|
||||
static_assert(sizeof(fwExtensionContainer) == 0x10);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "datBase.hpp"
|
||||
#include "fwRefAwareBaseImpl.hpp"
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
class fwRefAwareBase : public fwRefAwareBaseImpl<datBase>
|
||||
{
|
||||
};
|
||||
static_assert(sizeof(fwRefAwareBase) == 0x10);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
class fwRefAwareBaseImpl : public T
|
||||
{
|
||||
private:
|
||||
void *m_ref; // 0x08
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
namespace rage
|
||||
{
|
||||
|
||||
class pgBase
|
||||
{
|
||||
public:
|
||||
virtual ~pgBase() = default;
|
||||
|
||||
void *unk_0000; // 0x0000
|
||||
}; //Size: 0x0008
|
||||
static_assert(sizeof(pgBase) == 0x10);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user