X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.h;h=003a03120c5b451908e3f72443e55251d2c15cb1;hb=bb7326004878abeadbe171db75d2caa0eae74431;hp=3354328b5e6cb5281ba69d6f35d14df05f40704c;hpb=ebeefe8b81fbb2e69939d67972453c01b023ec22;p=l2e.git diff --git a/src/graphics/SimpleAnimation.h b/src/graphics/SimpleAnimation.h index 3354328..003a031 100644 --- a/src/graphics/SimpleAnimation.h +++ b/src/graphics/SimpleAnimation.h @@ -21,10 +21,15 @@ public: 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) { } +public: + void SetNumFrames(int n) { numFrames = n; } + void SetCol(int c) { col = c; } + void SetRow(int r) { row = r; } + protected: - virtual int Col() const { return col; } - virtual int Row() const { return row + Frame(); } virtual int NumFrames() const { return numFrames; }; + virtual int Col(int frame) const { return col; } + virtual int Row(int frame) const { return row + frame; } private: int numFrames;