18 #ifndef INCLUDED_UNITANIMATION 19 #define INCLUDED_UNITANIMATION 65 void SetAnimationState(
const CStr& name,
bool once,
float speed,
float desync,
const CStrW& actionSound);
135 #endif // INCLUDED_UNITANIMATION entity_id_t m_Entity
Definition: UnitAnimation.h:122
void AddModel(CModel *model, const CObjectEntry *object)
Definition: UnitAnimation.cpp:55
bool pastSoundPos
Definition: UnitAnimation.h:109
bool m_Looping
Definition: UnitAnimation.h:127
CStr m_State
Definition: UnitAnimation.h:125
CModel * model
Definition: UnitAnimation.h:103
CStrW m_ActionSound
Definition: UnitAnimation.h:132
void SetEntityID(entity_id_t ent)
Change the entity ID associated with this animation (currently used for playing locational sound effe...
Definition: UnitAnimation.cpp:50
float time
Definition: UnitAnimation.h:106
bool m_AnimStatesAreStatic
True if all the current AnimStates are static, so Update() doesn't need to do any work at all...
Definition: UnitAnimation.h:118
CSkeletonAnim * anim
Definition: UnitAnimation.h:104
void Update(float time)
Advance the animation state.
Definition: UnitAnimation.cpp:155
void UpdateAnimationID()
Picks a new animation ID from our current state.
Definition: UnitAnimation.cpp:278
float m_Speed
Definition: UnitAnimation.h:129
CStr m_AnimationID
Definition: UnitAnimation.h:126
void ReloadUnit(CModel *model, const CObjectEntry *object)
Regenerate internal animation state from the models in the current unit.
Definition: UnitAnimation.cpp:88
float m_Desync
Definition: UnitAnimation.h:131
void SetAnimationState(const CStr &name, bool once, float speed, float desync, const CStrW &actionSound)
Start playing an animation.
Definition: UnitAnimation.cpp:98
float m_SyncRepeatTime
Definition: UnitAnimation.h:130
void SetAnimationSyncRepeat(float repeatTime)
Adjust the speed of the current animation, so that Update(repeatTime) will do a complete animation lo...
Definition: UnitAnimation.cpp:117
NONCOPYABLE(CUnitAnimation)
const CObjectEntry * object
Definition: UnitAnimation.h:105
Definition: UnitAnimation.h:101
static size_t model
Definition: x86_x64.cpp:221
CModel * m_Model
Definition: UnitAnimation.h:123
Deals with synchronisation issues between raw animation data (CModel, CSkeletonAnim) and the simulati...
Definition: UnitAnimation.h:35
std::vector< SModelAnimState > m_AnimStates
Definition: UnitAnimation.h:112
float m_OriginalSpeed
Definition: UnitAnimation.h:128
CUnitAnimation(entity_id_t ent, CModel *model, CObjectEntry *object)
Construct for a given unit, defaulting to the "idle" animation.
Definition: UnitAnimation.cpp:43
bool pastLoadPos
Definition: UnitAnimation.h:107
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23
void SetAnimationSyncOffset(float actionTime)
Adjust the offset of the current animation, so that Update(actionTime) will advance it to the 'action...
Definition: UnitAnimation.cpp:122
Definition: ObjectEntry.h:38
bool pastActionPos
Definition: UnitAnimation.h:108
const CObjectEntry * m_Object
Definition: UnitAnimation.h:124
Definition: SkeletonAnim.h:32