30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
#ifndef ANIMATION_H
|
|
#define ANIMATION_H
|
|
#include "FrameSheet.h"
|
|
struct Animation {
|
|
int f; // current frame
|
|
int delta; // time since last frame change
|
|
int fps; // fps of current set
|
|
int anim_bool; // bool to animate or not
|
|
int set_id;
|
|
int face_id;
|
|
struct Sprite *sprite; // pointer to sprite to render
|
|
struct AnimData *anim; // ptr to anim, obv
|
|
struct SetData *set; // set
|
|
struct FaceData *face; //face
|
|
struct FrameData *frame; // blah blah blah
|
|
struct FrameSheet *sheet; // err
|
|
};
|
|
int cleanAnim(struct Animation *animation);
|
|
int setAnimSet(struct Animation *animation, char *set);
|
|
int setAnimDefaults(struct Animation *animation);
|
|
int getAnimSetId(struct Animation *animation, char *set);
|
|
int setAnimFace(struct Animation *animation, char *face);
|
|
int getAnimFaceId(struct Animation *animation, char *face);
|
|
int setAnimFrame(struct Animation *animation, int frame);
|
|
int incAnimFrame(struct Animation *animation);
|
|
int addAnimDelta(struct Animation *animation, int delta_ms);
|
|
char *getAnimTag(struct Animation *animation);
|
|
int checkAnimTag(struct Animation *animation, const char *tag);
|
|
#endif
|