X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSimpleAnimation.h;h=0864d2b024402f2509e01283558ded8f117615b3;hb=0e7b9eca67383e45e04aa419cb783c92722f7801;hp=d5d758fc7c3a88978a47aa2f0e898335a99a6b7c;hpb=1907ca03c5e865c4d398170042aa384c67ffff29;p=l2e.git diff --git a/src/graphics/SimpleAnimation.h b/src/graphics/SimpleAnimation.h index d5d758f..0864d2b 100644 --- a/src/graphics/SimpleAnimation.h +++ b/src/graphics/SimpleAnimation.h @@ -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