]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/ComplexAnimation.h
removed useless comments
[l2e.git] / src / graphics / ComplexAnimation.h
index a548cdbb9931b92d6be76388be0713765f0b1497..92562c5469ebdb83850d9af9a3aa84d1e9801aaa 100644 (file)
@@ -1,10 +1,3 @@
-/*
- * ComplexAnimation.h
- *
- *  Created on: Aug 12, 2012
- *      Author: holy
- */
-
 #ifndef GRAPHICS_COMPLEXANIMATION_H_
 #define GRAPHICS_COMPLEXANIMATION_H_
 
@@ -16,28 +9,32 @@ 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<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 CreateTypeDescription();
+       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;
@@ -47,4 +44,4 @@ private:
 
 }
 
-#endif /* GRAPHICS_COMPLEXANIMATION_H_ */
+#endif