]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Animation.h
new language, new compiler
[l2e.git] / src / graphics / Animation.h
index 3791df4a75a185cc9463352f647ec36855d9853e..ddbf095f185e06d552cc38b4a0153a3c3db53aaa 100644 (file)
@@ -11,6 +11,7 @@ namespace loader {
 
 #include "../app/Timer.h"
 #include "../math/Vector.h"
+#include "../loader/noinit.h"
 
 #include <memory>
 #include <SDL.h>
@@ -30,6 +31,8 @@ public:
        Animation(const Sprite *sprite, int frameTime, bool repeat = false)
        : sprite(sprite), frameTime(frameTime), repeat(repeat) { }
        virtual ~Animation() { };
+protected:
+       Animation(loader::noinit_t);
 
 public:
        const Sprite *GetSprite() const { return sprite; }
@@ -72,6 +75,7 @@ public:
 
        void Start(app::State &ctrl);
        void Start(app::Application &ctrl);
+       void Synchronize(const AnimationRunner &other) { timer = other.timer; }
        void Stop();
        bool Started() const;
        bool Running() const;