-/*
- * ComplexAnimation.h
- *
- * Created on: Aug 12, 2012
- * Author: holy
- */
-
#ifndef GRAPHICS_COMPLEXANIMATION_H_
#define GRAPHICS_COMPLEXANIMATION_H_
static const int TYPE_ID = 402;
public:
- ComplexAnimation() : frames(0), numFrames(0) { }
- ComplexAnimation(const Sprite *sprite, int frameTime, bool repeat = false)
- : Animation(sprite, frameTime, repeat), frames(0), numFrames(0) { }
+ ComplexAnimation();
+ ComplexAnimation(const Sprite *sprite, int frameTime, bool repeat = false);
public:
struct FrameProp {
static const int TYPE_ID = 403;
FrameProp() : col(0), row(0) { }
- FrameProp(int col, int row, const geometry::Vector<int> &disposition)
+ FrameProp(int col, int row, const math::Vector<int> &disposition)
: col(col), row(row), disposition(disposition) {}
int col;
int row;
- geometry::Vector<int> disposition;
+ math::Vector<int> disposition;
};
void SetFrames(const FrameProp *f, int num) { frames = f; numFrames = num; }
static void Construct(void *);
protected:
- virtual int NumFrames() const { return numFrames; };
- virtual int Col(int frame) const { return frames[frame].col; }
- virtual int Row(int frame) const { return frames[frame].row; }
- virtual geometry::Vector<int> Offset(int frame) const { return frames[frame].disposition; }
+ virtual int NumFrames() const;
+ virtual int Col(int frame) const;
+ virtual int Row(int frame) const;
+ virtual math::Vector<int> Offset(int frame) const;
private:
const FrameProp *frames;
}
-#endif /* GRAPHICS_COMPLEXANIMATION_H_ */
+#endif