22 #ifndef FIFE_VIDEO_ANIMATION_H 23 #define FIFE_VIDEO_ANIMATION_H uint32_t getDirection() const
Gets the animation direction.
std::vector< ImagePtr > getFrames()
Gets all frame images.
void setDirection(uint32_t direction)
Animation direction tells how this animation is associated with movement when played starting from fr...
int32_t m_animation_endtime
Animation(IResourceLoader *loader=0)
Constructor.
void setActionFrame(int32_t num)
Sets the action frame.
Contains information about one animation frame (duration + frame index + frame pointer) ...
int32_t getActionFrame() const
Gets the action frame.
ImagePtr getFrameByTimestamp(uint32_t timestamp)
Gets the frame image that matches the given timestamp.
std::vector< FrameInfo > m_frames
std::string createUniqueAnimationName()
int32_t getFrameIndex(uint32_t timestamp)
Get the frame index that matches given timestamp.
bool isValidIndex(int32_t index) const
Checks for animation frame index overflows.
std::map< uint32_t, FrameInfo > m_framemap
ImagePtr getFrame(int32_t index)
Gets the frame iamge that matches the given index.
void addFrame(ImagePtr image, uint32_t duration)
Adds new frame into animation Frames must be added starting from first frame.
SharedPtr< Animation > AnimationPtr
uint32_t getFrameCount() const
Get the number of frames.
uint32_t getDuration() const
Gets the total duration for the whole animation.
int32_t getFrameDuration(int32_t index) const
Gets the frame duration for given (indexed) frame.