diff --git a/base/datBase.hpp b/base/datBase.hpp new file mode 100644 index 0000000..07826e1 --- /dev/null +++ b/base/datBase.hpp @@ -0,0 +1,10 @@ +#pragma once +namespace rage +{ + class datBase + { + public: + virtual ~datBase() = default; + }; //Size: 0x0008 + static_assert(sizeof(datBase) == 0x8); +} \ No newline at end of file diff --git a/base/fwExtensibleBase.hpp b/base/fwExtensibleBase.hpp new file mode 100644 index 0000000..7911a69 --- /dev/null +++ b/base/fwExtensibleBase.hpp @@ -0,0 +1,13 @@ +#pragma once +#include "fwRefAwareBase.hpp" + +namespace rage +{ + class fwExtensibleBase : public fwRefAwareBase + { + public: + void* m_extension_container; // 0x0010 + void* m_extensible_unk; // 0x0018 + }; //Size: 0x0020 + static_assert(sizeof(fwExtensibleBase) == 0x20); +} diff --git a/base/fwRefAwareBase.hpp b/base/fwRefAwareBase.hpp new file mode 100644 index 0000000..c316022 --- /dev/null +++ b/base/fwRefAwareBase.hpp @@ -0,0 +1,11 @@ +#pragma once +#include "datBase.hpp" +#include "fwRefAwareBaseImpl.hpp" + +namespace rage +{ + class fwRefAwareBase : public fwRefAwareBaseImpl + { + }; + static_assert(sizeof(fwRefAwareBase) == 0x10); +} \ No newline at end of file diff --git a/base/fwRefAwareBaseImpl.hpp b/base/fwRefAwareBaseImpl.hpp new file mode 100644 index 0000000..beb988f --- /dev/null +++ b/base/fwRefAwareBaseImpl.hpp @@ -0,0 +1,11 @@ +#pragma once + +namespace rage +{ + template + class fwRefAwareBaseImpl : public T + { + private: + void *m_ref; // 0x08 + }; +} \ No newline at end of file diff --git a/classes.cpp b/classes.cpp index 94456f1..ac4474c 100644 --- a/classes.cpp +++ b/classes.cpp @@ -1,5 +1,11 @@ +#include "base/datBase.hpp" +#include "base/fwExtensibleBase.hpp" +#include "base/fwRefAwareBase.hpp" +#include "base/fwRefAwareBaseImpl.hpp" +#include "entity/fwEntity.hpp" #include "network/CNetGamePlayer.hpp" #include "network/CNetworkPlayerMgr.hpp" +#include "network/netObject.hpp" #include "network/netPeerAddress.hpp" #include "network/netPlayer.hpp" #include "network/netPlayerMgrBase.hpp" @@ -7,6 +13,7 @@ #include "network/rlGamerInfoBase.hpp" #include "network/rlGamerInfo.hpp" #include "player/CPlayerInfo.hpp" +#include "ped/CPed.hpp" #include "rage/atArray.hpp" #include "rage/joaat.hpp" #include "rage/rlJson.hpp" diff --git a/entity/fwEntity.hpp b/entity/fwEntity.hpp new file mode 100644 index 0000000..e5656f3 --- /dev/null +++ b/entity/fwEntity.hpp @@ -0,0 +1,29 @@ +#pragma once +#include +#include "../base/fwExtensibleBase.hpp" + +class CMoveObjectPooledObject; +class CNavigation; +class CBaseModelInfo; + +namespace rage +{ + class fwDrawData; + class fwDynamicEntityComponent; + class crmtRequestPose; + class crmtRequestIk; + class crFrameFilter; + class fwAudEntity; + class netObject; + class fwEntity : public fwExtensibleBase + { + public: + class CBaseModelInfo* m_ModelInfo; // 0x0020 + void* m_Unk; // 0x0028 + uint8_t m_EntityType; // 0x0030 + char m_Pad[0xA8]; // 0x0038 + // TODO: move these out of rage::fwEntity + class rage::netObject* m_NetObject; // 0x00E0 + }; + static_assert(sizeof(fwEntity) == 0xE8); +} \ No newline at end of file diff --git a/network/netObject.hpp b/network/netObject.hpp new file mode 100644 index 0000000..3d59716 --- /dev/null +++ b/network/netObject.hpp @@ -0,0 +1,21 @@ +#pragma once +#include + +class CObject; +namespace rage +{ + class netObject + { + public: + virtual ~netObject() = 0; + + char m_Pad[0x38]; // 0x08 + uint16_t m_ObjectType; // 0x40 + uint16_t m_ObjectId; // 0x42 + uint8_t m_Unk; // 0x44 + uint8_t m_OwnerId; // 0x45 + uint8_t m_MigratingOwnerId; // 0x46 + bool m_IsRemotelyControlled; // 0x47 + }; + static_assert(sizeof(rage::netObject) == 0x48); +} \ No newline at end of file diff --git a/network/rlGamerInfoBase.hpp b/network/rlGamerInfoBase.hpp index 4b150e6..9a42527 100644 --- a/network/rlGamerInfoBase.hpp +++ b/network/rlGamerInfoBase.hpp @@ -1,6 +1,7 @@ #pragma once #include #include "rlGamerHandle.hpp" +#include "netPeerAddress.hpp" #pragma pack(push, 8) namespace rage diff --git a/ped/CPed.hpp b/ped/CPed.hpp new file mode 100644 index 0000000..064ae4d --- /dev/null +++ b/ped/CPed.hpp @@ -0,0 +1,7 @@ +#pragma once +#include "entity/fwEntity.hpp" + +// TODO +class CPed : public rage::fwEntity +{ +}; \ No newline at end of file diff --git a/rage/vector.hpp b/rage/vector.hpp index c88c715..71087ed 100644 --- a/rage/vector.hpp +++ b/rage/vector.hpp @@ -8,13 +8,13 @@ namespace rage T data[2]; struct { T x, y; }; - vector2(T x, T y) : + constexpr vector2(T x, T y) : x(x), y(y) { } - vector2() : + constexpr vector2() : x(), y() { @@ -27,14 +27,14 @@ namespace rage T data[3]; struct { T x, y, z; }; - vector3(T x, T y, T z) : + constexpr vector3(T x, T y, T z) : x(x), y(y), z(z) { } - vector3() : + constexpr vector3() : x(), y(), z() @@ -48,7 +48,7 @@ namespace rage T data[4]; struct { T x, y, z, w; }; - vector4(T x, T y, T z, T w) : + constexpr vector4(T x, T y, T z, T w) : x(x), y(y), z(z), @@ -56,7 +56,7 @@ namespace rage { } - vector4() : + constexpr vector4() : x(), y(), z(),