1 #ifndef GRAPHICS_COMPLEXANIMATION_H_
2 #define GRAPHICS_COMPLEXANIMATION_H_
12 static const int TYPE_ID = 402;
15 ComplexAnimation() : frames(0), numFrames(0) { }
16 ComplexAnimation(const Sprite *sprite, int frameTime, bool repeat = false)
17 : Animation(sprite, frameTime, repeat), frames(0), numFrames(0) { }
21 static const int TYPE_ID = 403;
22 FrameProp() : col(0), row(0) { }
23 FrameProp(int col, int row, const geometry::Vector<int> &disposition)
24 : col(col), row(row), disposition(disposition) {}
27 geometry::Vector<int> disposition;
29 void SetFrames(const FrameProp *f, int num) { frames = f; numFrames = num; }
31 static void CreateTypeDescription();
32 static void Construct(void *);
35 virtual int NumFrames() const { return numFrames; };
36 virtual int Col(int frame) const { return frames[frame].col; }
37 virtual int Row(int frame) const { return frames[frame].row; }
38 virtual geometry::Vector<int> Offset(int frame) const { return frames[frame].disposition; }
41 const FrameProp *frames;
48 #endif /* GRAPHICS_COMPLEXANIMATION_H_ */