mirror of
https://github.com/YimMenu/RDR-Classes.git
synced 2024-12-22 14:37:30 +08:00
Entities (#4)
* feat(metric): add rlMetric * fix(metric): serializer fix * feat(tls): add tlsContext * feat(fwEntity): add entity classes * fix: add import * fix(vector): constexpr ctors * feat(ped): add CPed ---------
This commit is contained in:
parent
8d335c795b
commit
ca56c5acdd
10
base/datBase.hpp
Normal file
10
base/datBase.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
namespace rage
|
||||
{
|
||||
class datBase
|
||||
{
|
||||
public:
|
||||
virtual ~datBase() = default;
|
||||
}; //Size: 0x0008
|
||||
static_assert(sizeof(datBase) == 0x8);
|
||||
}
|
13
base/fwExtensibleBase.hpp
Normal file
13
base/fwExtensibleBase.hpp
Normal file
@ -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);
|
||||
}
|
11
base/fwRefAwareBase.hpp
Normal file
11
base/fwRefAwareBase.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include "datBase.hpp"
|
||||
#include "fwRefAwareBaseImpl.hpp"
|
||||
|
||||
namespace rage
|
||||
{
|
||||
class fwRefAwareBase : public fwRefAwareBaseImpl<datBase>
|
||||
{
|
||||
};
|
||||
static_assert(sizeof(fwRefAwareBase) == 0x10);
|
||||
}
|
11
base/fwRefAwareBaseImpl.hpp
Normal file
11
base/fwRefAwareBaseImpl.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
namespace rage
|
||||
{
|
||||
template <typename T>
|
||||
class fwRefAwareBaseImpl : public T
|
||||
{
|
||||
private:
|
||||
void *m_ref; // 0x08
|
||||
};
|
||||
}
|
@ -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"
|
||||
|
29
entity/fwEntity.hpp
Normal file
29
entity/fwEntity.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#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);
|
||||
}
|
21
network/netObject.hpp
Normal file
21
network/netObject.hpp
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
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);
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include "rlGamerHandle.hpp"
|
||||
#include "netPeerAddress.hpp"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
namespace rage
|
||||
|
7
ped/CPed.hpp
Normal file
7
ped/CPed.hpp
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#include "entity/fwEntity.hpp"
|
||||
|
||||
// TODO
|
||||
class CPed : public rage::fwEntity
|
||||
{
|
||||
};
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user