X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FAnimation.h;h=a224f548590c4af16edad31b32c1ab596881df3d;hb=ce1e9a11c89c83356d797c8225369b711513a4da;hp=79bfa852b887f02316afad317a5bfdd912348eb5;hpb=67f6bb1d9727e7d1e2140cf2913aa89ebba84bf5;p=l2e.git diff --git a/src/graphics/Animation.h b/src/graphics/Animation.h index 79bfa85..a224f54 100644 --- a/src/graphics/Animation.h +++ b/src/graphics/Animation.h @@ -10,7 +10,7 @@ namespace loader { } #include "../app/Timer.h" -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include #include @@ -45,7 +45,7 @@ public: virtual int NumFrames() const = 0; virtual int Col(int frame) const = 0; virtual int Row(int frame) const = 0; - virtual geometry::Vector Offset(int frame) const { return geometry::Vector(); } + virtual math::Vector Offset(int frame) const { return math::Vector(); } static void CreateTypeDescription(); @@ -72,6 +72,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; @@ -93,10 +94,10 @@ public: void ChangeSprite(const Sprite *s) { sprite = s; } const Sprite *GetSprite() const { return sprite ? sprite : animation->GetSprite(); } - void Draw(SDL_Surface *dest, geometry::Vector position) const; - void DrawTopRight(SDL_Surface *dest, geometry::Vector position) const; - void DrawCenter(SDL_Surface *dest, geometry::Vector position) const; - void DrawCenterBottom(SDL_Surface *dest, geometry::Vector position) const; + void Draw(SDL_Surface *dest, math::Vector position) const; + void DrawTopRight(SDL_Surface *dest, math::Vector position) const; + void DrawCenter(SDL_Surface *dest, math::Vector position) const; + void DrawCenterBottom(SDL_Surface *dest, math::Vector position) const; int Frame() const; @@ -112,4 +113,4 @@ private: } -#endif /* GRAPHICS_SIMPLEANIMATION_H_ */ +#endif