]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/SimpleAnimation.h
removed useless comments
[l2e.git] / src / graphics / SimpleAnimation.h
index 3354328b5e6cb5281ba69d6f35d14df05f40704c..7e5a99a9a2630b6e4ba7eadf59e1a993349a6940 100644 (file)
@@ -1,10 +1,3 @@
-/*
- *  SimpleAnimation.h
- *
- *  Created on: Aug 11, 2012
- *      Author: holy
- */
-
 #ifndef GRAPHICS_SIMPLEANIMATION_H_
 #define GRAPHICS_SIMPLEANIMATION_H_
 
@@ -16,15 +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 Col() const { return col; }
-       virtual int Row() const { return row + Frame(); }
-       virtual int NumFrames() const { return numFrames; };
+       virtual int NumFrames() const;
+       virtual int Col(int frame) const;
+       virtual int Row(int frame) const;
 
 private:
        int numFrames;
@@ -35,4 +38,4 @@ private:
 
 }
 
-#endif /* GRAPHICS_SIMPLEANIMATION_H_ */
+#endif