#include <AAnimatableObjectManager.h>
Definition at line 16 of file AAnimatableObjectManager.h.
◆ BaseClass
◆ ThisClass
◆ AAnimatableObjectManager()
AAnimatableObjectManager::AAnimatableObjectManager |
( |
| ) |
|
◆ ~AAnimatableObjectManager()
AAnimatableObjectManager::~AAnimatableObjectManager |
( |
| ) |
|
Definition at line 31 of file AAnimatableObjectManager.cpp.
32{
33 if ( m_pAnimSoundBPsTRB )
34 {
35 delete m_pAnimSoundBPsTRB;
36 m_pAnimSoundBPsTRB =
TNULL;
37 m_pSoundBreakpoints =
TNULL;
38 }
39
40 m_llObjectTypes.DeleteAll();
41 m_llAnimatableObjects.DeleteAll();
42}
◆ CreateAnimatableObject()
Definition at line 45 of file AAnimatableObjectManager.cpp.
46{
47 AAnimatableObject* pObject = new AAnimatableObject();
48
49 m_llAnimatableObjects.PushBack( pObject );
50 pObject->
Create( a_pObjectType, a_Unk1, a_eFlags );
51
52 return pObject;
53}
TBOOL Create(AAnimatableObjectType *a_pObjectType, void *a_Unk1, CREATE_FLAGS a_eFlags=CREATE_FLAGS_NONE)
◆ CreateTObject()
Toshi::TObject * AAnimatableObjectManager::CreateTObject |
( |
| ) |
|
|
static |
◆ CreateTObjectInPlace()
Toshi::TObject * AAnimatableObjectManager::CreateTObjectInPlace |
( |
void * | a_pPtr | ) |
|
|
static |
◆ DeinitialiseClass()
void AAnimatableObjectManager::DeinitialiseClass |
( |
| ) |
|
|
static |
◆ DestroyAnimatableObject()
void AAnimatableObjectManager::DestroyAnimatableObject |
( |
AAnimatableObject * | a_pAnimatableObject | ) |
|
Definition at line 183 of file AAnimatableObjectManager.cpp.
184{
185 if ( !a_pAnimatableObject )
186 return;
187
188 if ( m_llAnimatableObjects.Exists( a_pAnimatableObject ) )
189 {
190
192
193
196
197 a_pAnimatableObject->Remove();
198 delete a_pAnimatableObject;
199 }
200}
AAnimatableObject * pParentObject
void DetachObject(AAnimatableObject *a_pObject, AAnimatableObject *a_pParent)
void DestroyAttachedObjects(AAnimatableObject *a_pAnimatableObject)
◆ DestroyAttachedObjects()
void AAnimatableObjectManager::DestroyAttachedObjects |
( |
AAnimatableObject * | a_pAnimatableObject | ) |
|
Definition at line 203 of file AAnimatableObjectManager.cpp.
204{
205 if ( !a_pAnimatableObject )
206 return;
207
208 while ( a_pAnimatableObject->m_llAttachedObjects.IsLinked() )
209 {
210 AAnimatableObject* pAttachedObject = a_pAnimatableObject->m_llAttachedObjects.Begin();
212 }
213}
void DestroyAnimatableObject(AAnimatableObject *a_pAnimatableObject)
◆ DestroyType()
void AAnimatableObjectManager::DestroyType |
( |
const Toshi::TPString8 & | a_rcName | ) |
|
Definition at line 169 of file AAnimatableObjectManager.cpp.
170{
171 AAnimatableObjectType* pType =
FindType( a_rcName );
172
173 if ( pType )
174 {
175 pType->Remove();
176 delete pType;
177
178 AModelRepos::GetSingleton()->UnloadUnusedModels();
179 }
180}
AAnimatableObjectType * FindType(const Toshi::TPString8 &a_rcName)
◆ DetachObject()
◆ FindNumAnimationSoundBreakpoints()
TINT AAnimatableObjectManager::FindNumAnimationSoundBreakpoints |
( |
const Toshi::TPString8 & | a_rcModelName, |
|
|
ANamedAnimation * | a_pAnimation ) |
Definition at line 239 of file AAnimatableObjectManager.cpp.
240{
242
244
245 for (
TUINT i = 0; i < m_pSoundBreakpoints->uiCount; i++ )
246 {
249 {
250 iCount += 1;
251 }
252 }
253
254 return iCount;
255}
static TINT CompareNoCase(const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
const Toshi::TPString8 & GetExportedName() const
◆ FindType()
Definition at line 148 of file AAnimatableObjectManager.cpp.
149{
151 {
152 if ( it->GetName() == a_rcName )
153 return it;
154 }
155
156 TERROR(
"AAnimatableObjectManager: unable to find animatable type '%s'\n", a_rcName.GetString() );
158}
#define T2_FOREACH(vecName, iteratorName)
◆ GetClass()
Toshi::TClass * AAnimatableObjectManager::GetClass |
( |
| ) |
|
|
overridevirtual |
◆ GetClassStatic()
static __forceinline Toshi::TClass * AAnimatableObjectManager::GetClassStatic |
( |
| ) |
|
|
inlinestatic |
◆ InitialiseClass()
void AAnimatableObjectManager::InitialiseClass |
( |
| ) |
|
|
static |
◆ LoadAnimObjType() [1/2]
void AAnimatableObjectManager::LoadAnimObjType |
( |
const TCHAR * | a_szName, |
|
|
const PBProperties * | a_pProperties, |
|
|
TBOOL | a_bNoBreakpoints ) |
Definition at line 142 of file AAnimatableObjectManager.cpp.
143{
144 LoadAnimObjType( TPString8( a_szName ), a_pProperties, a_bNoBreakpoints );
145}
void LoadAnimObjType(const TCHAR *a_szName, const PBProperties *a_pProperties, TBOOL a_bNoBreakpoints)
◆ LoadAnimObjType() [2/2]
void AAnimatableObjectManager::LoadAnimObjType |
( |
const Toshi::TPString8 & | a_rcName, |
|
|
const PBProperties * | a_pProperties, |
|
|
TBOOL | a_bNoBreakpoints ) |
◆ LoadAnimSoundBreakpoints()
TBOOL AAnimatableObjectManager::LoadAnimSoundBreakpoints |
( |
const TCHAR * | a_szFilePath | ) |
|
Definition at line 216 of file AAnimatableObjectManager.cpp.
217{
219
220 if ( a_szFilePath )
221 {
222 m_pAnimSoundBPsTRB = new TTRB();
223
225 {
226 m_pSoundBreakpoints = m_pAnimSoundBPsTRB->CastSymbol<ASoundBreakpointsTable>( "Main" );
228 }
229 else
230 {
231 TASSERT( !
"Unable to load info about sound breakpoints" );
232 }
233 }
234
236}
◆ LoadTypesFromLibrary()
void AAnimatableObjectManager::LoadTypesFromLibrary |
( |
const TCHAR * | a_szLibName | ) |
|
Definition at line 56 of file AAnimatableObjectManager.cpp.
57{
58 TString8 strLibPath;
59 strLibPath.
Format(
"%slibs\\%s.trb", MODELTYPES_DIR, a_szLibName );
60
61 TTRB oTRB;
64
66 {
67 const PBProperties* pProperties = PBProperties::LoadFromTRB( oTRB );
69
70
72 {
73 TINT iLoadScreenUpdateCounter = 0;
74
76 {
78
79
80 if ( ++iLoadScreenUpdateCounter > 5 )
81 {
82 iLoadScreenUpdateCounter = 0;
84 }
85 }
86 }
87
89 }
90
92}
ALoadScreen g_oLoadScreen
ERROR Load(const TCHAR *a_szFilePath, TUINT32 a_uiUnknown=0)
const TCHAR * GetString() const
PBPropertyName & GetName()
TString8 & Format(const TCHAR *a_pcFormat,...)
void Update(TFLOAT a_fDeltaTime=1.0f, TBOOL a_bRender=true)
◆ OnUpdate()
TBOOL AAnimatableObjectManager::OnUpdate |
( |
TFLOAT | a_fDeltaTime | ) |
|
|
overridevirtual |
Definition at line 258 of file AAnimatableObjectManager.cpp.
259{
261 {
262
263 TBOOL bUpdateAnim = it->IsAnimated();
264
265 if ( bUpdateAnim )
266 {
268
269
270 if ( !modelInstance->IsUpdatingSkeleton() && it->GetQueuedAnimations().Size() <= 0 )
272 }
273
274 if ( bUpdateAnim )
275 it->Update( a_fDeltaTime );
276 }
277
279}
Toshi::TRef< AModelInstance > AModelInstanceRef
◆ ms_oClass
◆ PARENTCLASS
Toshi::TClass* AAnimatableObjectManager::PARENTCLASS = & Toshi::TTask::ms_oClass |
|
staticconstexpr |
The documentation for this class was generated from the following files: