22 #ifndef FIFE_VIDEO_ANIMATION_H
23 #define FIFE_VIDEO_ANIMATION_H
int32_t getFrameDuration(int32_t index) const
Gets the frame duration for given (indexed) frame.
void setDirection(uint32_t direction)
Animation direction tells how this animation is associated with movement when played starting from fr...
uint32_t getDuration() const
Gets the total duration for the whole animation.
int32_t m_animation_endtime
Base class for all fife classes Used e.g.
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
uint32_t getFrameCount() const
Get the number of frames.
int32_t getFrameIndex(uint32_t timestamp)
Get the frame index that matches given timestamp.
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
bool isValidIndex(int32_t index) const
Checks for animation frame index overflows.
uint32_t getDirection() const
Gets the animation direction.