OpenBarnyard
 
Loading...
Searching...
No Matches
ATreeManager.h
Go to the documentation of this file.
1#pragma once
5
6#include <Toshi/T2SList.h>
7
9 : public Toshi::TSingleton<ATreeManager>
10{
11public:
13 : Toshi::T2SList<TreeInstance>::Node
14 {
17
18 union
19 {
23 };
24
26
27 ACollisionObjectSimple* pSimpleCollisionObjects = TNULL;
28 void* unk = TNULL;
29 };
30
31 class Model
32 {
33 public:
35
36 public:
37 Model();
38 ~Model();
39
40 void Load( const TCHAR* a_szModelName );
41
42 private:
43 Toshi::TManagedModel* m_pManagedModel;
44 Toshi::TSceneObject* m_pSceneObject;
45 TUINT m_uiID;
46 TINT m_iNumFOBs;
47 Toshi::TMatrix44* m_pFOBMatrices;
48 TFLOAT m_fUnk1;
49 TFLOAT m_fRadius;
50 };
51
52 inline static constexpr TINT MAX_INSTANCES = 1302;
53
54public:
57
58 // Initialises models and returns TTRUE if succeded
60
61 void CreateInstances( ATerrainLocatorList* a_pLocatorList );
62
63 void Render();
64
65private:
66 // ...
67 TINT m_iNumTrunks;
68 Model* m_pTrunks;
69 TINT m_iNumFOBs;
70 Model* m_pFOBs;
71 // ...
72 TreeInstance m_aTreeInstances[ MAX_INSTANCES ];
73 Toshi::T2SList<TreeInstance> m_llUsedTreeInstances;
74 Toshi::T2SList<TreeInstance> m_llFreeTreeInstances;
75 ALockedMesh m_aLockedMeshes[ 2 ];
76 // ...
77 TFLOAT m_fUnk1;
78 TFLOAT m_fUnk2;
79 TFLOAT m_fUnk3;
80 TBOOL m_bCreateCollision;
81 TBOOL m_bFlag;
82};
uint16_t TUINT16
Definition Typedefs.h:15
unsigned int TUINT
Definition Typedefs.h:8
char TCHAR
Definition Typedefs.h:20
uint8_t TUINT8
Definition Typedefs.h:17
float TFLOAT
Definition Typedefs.h:4
#define TNULL
Definition Typedefs.h:23
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6
TBOOL Initialise()
void CreateInstances(ATerrainLocatorList *a_pLocatorList)
static constexpr TINT MAX_INSTANCES
ACollisionObjectSimple * pSimpleCollisionObjects
ATerrainLocatorList * pLocatorList
void Load(const TCHAR *a_szModelName)