]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/SimpleAnimation.h
new language, new compiler
[l2e.git] / src / graphics / SimpleAnimation.h
index d5d758fc7c3a88978a47aa2f0e898335a99a6b7c..0864d2b024402f2509e01283558ded8f117615b3 100644 (file)
@@ -1,14 +1,8 @@
-/*
- *  SimpleAnimation.h
- *
- *  Created on: Aug 11, 2012
- *      Author: holy
- */
-
 #ifndef GRAPHICS_SIMPLEANIMATION_H_
 #define GRAPHICS_SIMPLEANIMATION_H_
 
 #include "Animation.h"
+#include "../loader/noinit.h"
 
 namespace graphics {
 
@@ -19,10 +13,11 @@ public:
        static const int TYPE_ID = 408;
 
 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) { }
+       SimpleAnimation();
+       SimpleAnimation(const Sprite *sprite, int frameTime, int numFrames,
+                       int col = 0, int row = 0, bool repeat = false);
+protected:
+       SimpleAnimation(loader::noinit_t);
 
 public:
        void SetNumFrames(int n) { numFrames = n; }
@@ -31,11 +26,12 @@ public:
 
        static void CreateTypeDescription();
        static void Construct(void *);
+       static void Initialize(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;
@@ -46,4 +42,4 @@ private:
 
 }
 
-#endif /* GRAPHICS_SIMPLEANIMATION_H_ */
+#endif