]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Animation.h
added type description of simple animation
[l2e.git] / src / graphics / Animation.h
index 2696694a4f4235cc9454af5b2528ad1a80788567..ee62493b18f54c623c729d52c450ec046b027993 100644 (file)
 #include "../app/Timer.h"
 #include "../geometry/Vector.h"
 
+#include <memory>
 #include <SDL.h>
 
+namespace loader {
+       class TypeDescription;
+}
+
 namespace graphics {
 
 class Animation {
@@ -43,6 +48,9 @@ public:
        virtual int Row(int frame) const = 0;
        virtual geometry::Vector<int> Offset(int frame) const { return geometry::Vector<int>(); }
 
+protected:
+       static void AddFields(loader::TypeDescription &, const Animation &, std::ptrdiff_t offset);
+
 private:
        const Sprite *sprite;
        int frameTime;