44#include " Toshi2/T2DList.h"
55#include " Toshi/Math/Math.h"
66
7- class ABaseEntity :
8- public Toshi::TGenericClassDerived<ABaseEntity, Toshi::TObject, " ABaseEntity" , TMAKEVERSION(1 , 0 ), TTRUE>,
9- public Toshi::T2DList<ABaseEntity>::Node
7+ class ABaseEntity : public Toshi ::TGenericClassDerived<ABaseEntity, Toshi::TObject, " ABaseEntity" , TMAKEVERSION(1 , 0 ), TTRUE>
8+ , public Toshi::T2DList<ABaseEntity>::Node
109{
11- static constexpr int ENTITY_HASH_SIZE = 0x400 ;
10+ static constexpr TINT ENTITY_HASH_SIZE = 0x400 ;
1211
1312 enum FLAG
1413 {
15- FLAG_Created = BITFIELD (0 ),
16- FLAG_Visible = BITFIELD (2 ),
17- FLAG_DontTick = BITFIELD (8 ),
18- FLAG_LowLOD = BITFIELD (9 ),
19- FLAG_MediumLOD = BITFIELD (10 ),
20- FLAG_HighLOD = BITFIELD (11 ),
21- FLAG_LODMask = FLAG_LowLOD | FLAG_MediumLOD | FLAG_HighLOD,
22- FLAG_UPDATEMATRIX = BITFIELD (15 )
14+ FLAG_Created = BITFIELD (0 ),
15+ FLAG_Visible = BITFIELD (2 ),
16+ FLAG_DontTick = BITFIELD (8 ),
17+ FLAG_LowLOD = BITFIELD (9 ),
18+ FLAG_MediumLOD = BITFIELD (10 ),
19+ FLAG_HighLOD = BITFIELD (11 ),
20+ FLAG_LODMask = FLAG_LowLOD | FLAG_MediumLOD | FLAG_HighLOD,
21+ FLAG_UPDATEMATRIX = BITFIELD (15 )
2322 };
23+
2424public:
2525 virtual ~ABaseEntity () = default ;
26- virtual void Tick (float a_fTicks) { m_fTicks += a_fTicks; }
27- virtual void OnLODChanging () {};
26+ virtual void Tick (TFLOAT a_fTicks) { m_fTicks += a_fTicks; }
27+ virtual void OnLODChanging (){};
2828 virtual void Create ()
2929 {
3030 TASSERT (0 == (m_Flags & FLAG_Created));
3131 m_Flags |= FLAG_Created;
3232 }
33- virtual void PostCreate () {};
34- virtual void Destroy () {};
35-
36- virtual float GetAnimationSpeed (int ) const { return 1 .0f ; }
37- virtual void SetVisible (bool bEnable)
33+ virtual void PostCreate (){};
34+ virtual void Destroy (){};
35+
36+ virtual TFLOAT GetAnimationSpeed (TINT ) const { return 1 .0f ; }
37+ virtual void SetVisible (TBOOL bEnable)
3838 {
3939 bEnable ? m_Flags |= FLAG_Visible : m_Flags &= ~FLAG_Visible;
4040 }
@@ -56,34 +56,33 @@ class ABaseEntity :
5656 m_mMatrix = a_matrix;
5757 m_Flags |= FLAG_UPDATEMATRIX;
5858 }
59-
59+
6060 virtual void GetReactionForce (Toshi::TVector4& a_reactionForce)
6161 {
6262 a_reactionForce = Toshi::TVector4::VEC_ZERO;
6363 }
64-
65- virtual float GetStepUpHeight () const { return 0 .3f ; }
66- virtual void SetBBox (Toshi::TVector4 a_bbox)
64+
65+ virtual TFLOAT GetStepUpHeight () const { return 0 .3f ; }
66+ virtual void SetBBox (Toshi::TVector4 a_bbox)
6767 {
68- m_vBoundingBox = a_bbox;
68+ m_vBoundingBox = a_bbox;
6969 m_fBoundingSphereRadius = a_bbox.Magnitude ();
7070 }
71- virtual float GetInteractionRadius () const { return 2 .5f ; }
72- virtual void OnLeaveState (int a_State) {};
73- virtual void OnEnterState (int a_State) {};
71+ virtual TFLOAT GetInteractionRadius () const { return 2 .5f ; }
72+ virtual void OnLeaveState (TINT a_State){};
73+ virtual void OnEnterState (TINT a_State){};
7474
75- void SetState (int a_State);
75+ void SetState (TINT a_State);
7676
7777
78- static int sm_EntityHash[ENTITY_HASH_SIZE];
78+ static TINT sm_EntityHash[ENTITY_HASH_SIZE];
7979
80- short m_State; // 0xC
81- short m_iID; // 0xE
82- Toshi::TMatrix44 m_mMatrix; // 0x10
83- Toshi::TVector4 m_vBoundingBox; // 0x50
84- float m_fBoundingSphereRadius; // 0x68
85- float m_fTicks; // 0x6C
86- uint8_t m_Flags; // 0x70
87- Toshi::T2DList<ABaseEntity>::Node* m_pEntityCellPair; // 0x7C
80+ TSHORT m_State; // 0xC
81+ TSHORT m_iID; // 0xE
82+ Toshi::TMatrix44 m_mMatrix; // 0x10
83+ Toshi::TVector4 m_vBoundingBox; // 0x50
84+ TFLOAT m_fBoundingSphereRadius; // 0x68
85+ TFLOAT m_fTicks; // 0x6C
86+ TUINT8 m_Flags; // 0x70
87+ Toshi::T2DList<ABaseEntity>::Node* m_pEntityCellPair; // 0x7C
8888};
89-
0 commit comments