18 , m_pObjectType(
TNULL )
19 , m_pModelInstance(
TNULL )
28 m_llAnimControllers.DeleteAll();
30 if ( m_pModelInstance )
33 m_pModelInstance =
TNULL;
35 AModelRepos::GetSingleton()->DestroyModelInstance( pModelInstance );
38 m_llAttachedObjects.Clear();
45 m_pObjectType = a_pObjectType;
48 m_pModelInstance = AModelRepos::GetSingleton()->InstantiateModel( a_pObjectType->
GetModel() );
50 if ( m_pModelInstance )
55 m_pModelInstance->SetReceivesLight(
TFALSE );
58 TSceneObject* pSceneObject = m_pModelInstance->GetSceneObject();
72 TClass* pControllerClass = it->GetControllerClass();
78 TBOOL bCreated = pAnimController->
Create( a_Unk1,
this, it );
81 m_llAnimControllers.PushBack( pAnimController );
99 PlayQueuedAnimation();
100 m_oToshiAnimInterface.Update( a_fDeltaTime, animEvents );
109 TASSERT( !
"Call the breakpoint" );
120 if ( it->IsEnabled() )
121 it->OnUpdate( a_fDeltaTime );
128 if ( !StartAnimation( a_strName ) )
131 TASSERT( m_vecQueuedAnims.Size() != m_vecQueuedAnims.CAPACITY );
133 m_vecQueuedAnims.PushBack( a_strName );
141TBOOL AAnimatableObject::StartAnimation(
const TPString8& a_strName )
153 if ( it->IsEnabled() )
155 bShouldPlay &= it->IsAnimationAllowed( pAnimation );
160 m_oToshiAnimInterface.PlayAnim( a_strName, -1.0f,
TFALSE );
166void AAnimatableObject::PlayQueuedAnimation()
170 if ( StartAnimation( *it ) )
173 m_vecQueuedAnims.EraseFast( it );
184 m_pModelInstance->SetVisible( a_bVisible );
192 m_pModelInstance->SetSkeletonUpdating( a_bUpdating );
199 it->SetSkeletonUpdating( a_bUpdating,
TTRUE );
207 m_vecQueuedAnims.Clear();
208 m_oToshiAnimInterface.KillAllAnimations();
#define TSTATICCAST(POINTERTYPE, VALUE)
#define HASANYFLAG(STATE, FLAG)
#define TOSHI_NAMESPACE_USING
#define T2_FOREACH(vecName, iteratorName)
#define TDEFINE_CLASS(...)
static TINT CompareNoCase(const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
class TObject * CreateObject() const
TVector2 & GetSomeVector2()
TSkeletonInstance * GetSkeletonInstance()
TBOOL PlayAnimation(const Toshi::TPString8 &a_strName)
TBOOL Create(AAnimatableObjectType *a_pObjectType, void *a_Unk1, CREATE_FLAGS a_eFlags=CREATE_FLAGS_NONE)
TBOOL Update(TFLOAT a_fDeltaTime)
void SetVisible(TBOOL a_bVisible)
@ CREATE_FLAGS_NO_ANIM_CONTROLLER
void SetSkeletonUpdating(TBOOL a_bUpdating, TBOOL a_bRecursive)
void UpdateAnimControllers(TFLOAT a_fDeltaTime)
const Toshi::TPString8 & GetName() const
ANamedAnimationSetRef GetDefaultAnimationSet() const
AModel * GetModel() const
Toshi::T2DList< AAnimControllerType > & GetAnimControllerTypes()
virtual void OnAnimatableObjectCreated(AAnimatableObject *a_pAnimatableObject)
TBOOL Create(void *a_pUnk, AAnimatableObject *a_pAnimatableObject, AAnimControllerType *a_pControllerType)
@ ANIMEVENT_TYPE_BREAKPOINT
ANamedAnimationSetRef GetAnimationSet()
AnimEvent aEvents[MAX_NUM_ANIMATIONS]