X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.h;h=88a41c5ba52e859137549e5d68737beacf340264;hb=2255d436a0c2acc10b015827366a72b2ece86094;hp=003a03120c5b451908e3f72443e55251d2c15cb1;hpb=bb7326004878abeadbe171db75d2caa0eae74431;p=l2e.git diff --git a/src/graphics/SimpleAnimation.h b/src/graphics/SimpleAnimation.h index 003a031..88a41c5 100644 --- a/src/graphics/SimpleAnimation.h +++ b/src/graphics/SimpleAnimation.h @@ -1,10 +1,3 @@ -/* - * SimpleAnimation.h - * - * Created on: Aug 11, 2012 - * Author: holy - */ - #ifndef GRAPHICS_SIMPLEANIMATION_H_ #define GRAPHICS_SIMPLEANIMATION_H_ @@ -16,20 +9,25 @@ class SimpleAnimation : public Animation { public: - SimpleAnimation() - : numFrames(0), col(0), row(0) { } - SimpleAnimation(const Sprite *sprite, int frameTime, int numFrames, int col = 0, int row = 0, bool repeat = false) - : Animation(sprite, frameTime, repeat), numFrames(numFrames), col(col), row(row) { } + static const int TYPE_ID = 408; + +public: + SimpleAnimation(); + SimpleAnimation(const Sprite *sprite, int frameTime, int numFrames, + int col = 0, int row = 0, bool repeat = false); public: void SetNumFrames(int n) { numFrames = n; } void SetCol(int c) { col = c; } void SetRow(int r) { row = r; } + static void CreateTypeDescription(); + static void Construct(void *); + protected: - virtual int NumFrames() const { return numFrames; }; - virtual int Col(int frame) const { return col; } - virtual int Row(int frame) const { return row + frame; } + virtual int NumFrames() const; + virtual int Col(int frame) const; + virtual int Row(int frame) const; private: int numFrames;