X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FComplexAnimation.h;h=92562c5469ebdb83850d9af9a3aa84d1e9801aaa;hb=7df7c6eca83c2b5c0ee17c55340d8863f9d638f5;hp=e35895d9ae5f59c5f03c01cbb20ae0a3a0e6cb00;hpb=b02da898c7c8a08141df4e797774a61cf5e0163f;p=l2e.git diff --git a/src/graphics/ComplexAnimation.h b/src/graphics/ComplexAnimation.h index e35895d..92562c5 100644 --- a/src/graphics/ComplexAnimation.h +++ b/src/graphics/ComplexAnimation.h @@ -1,10 +1,3 @@ -/* - * ComplexAnimation.h - * - * Created on: Aug 12, 2012 - * Author: holy - */ - #ifndef GRAPHICS_COMPLEXANIMATION_H_ #define GRAPHICS_COMPLEXANIMATION_H_ @@ -16,18 +9,21 @@ class ComplexAnimation : public Animation { public: - ComplexAnimation() : frames(0), numFrames(0) { } - ComplexAnimation(const Sprite *sprite, int frameTime, bool repeat = false) - : Animation(sprite, frameTime, repeat), frames(0), numFrames(0) { } + static const int TYPE_ID = 402; + +public: + 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 &disposition) + FrameProp(int col, int row, const math::Vector &disposition) : col(col), row(row), disposition(disposition) {} int col; int row; - geometry::Vector disposition; + math::Vector disposition; }; void SetFrames(const FrameProp *f, int num) { frames = f; numFrames = num; } @@ -35,10 +31,10 @@ public: 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 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 Offset(int frame) const; private: const FrameProp *frames; @@ -48,4 +44,4 @@ private: } -#endif /* GRAPHICS_COMPLEXANIMATION_H_ */ +#endif