- void Draw(SDL_Surface *dest, geometry::Vector<int> position) const {
- GetSprite()->Draw(dest, position + animation->Offset(Frame()), animation->Col(Frame()) + ColOffset(), animation->Row(Frame()) + RowOffset());
- }
- void DrawTopRight(SDL_Surface *dest, geometry::Vector<int> position) const {
- geometry::Vector<int> offset(-GetSprite()->Width(), 0);
- Draw(dest, position + offset);
- }
- void DrawCenter(SDL_Surface *dest, geometry::Vector<int> position) const {
- Draw(dest, position - (GetSprite()->Size() / 2));
- }
- void DrawCenterBottom(SDL_Surface *dest, geometry::Vector<int> position) const {
- geometry::Vector<int> offset(-GetSprite()->Width() / 2, -GetSprite()->Height());
- Draw(dest, position + offset);
- }
-
- int Frame() const { return Running() ? ((timer.Iteration() + frameShift) % animation->NumFrames()) : 0; }
+ void Draw(SDL_Surface *dest, math::Vector<int> position) const;
+ void DrawTopRight(SDL_Surface *dest, math::Vector<int> position) const;
+ void DrawCenter(SDL_Surface *dest, math::Vector<int> position) const;
+ void DrawCenterBottom(SDL_Surface *dest, math::Vector<int> position) const;
+
+ int Frame() const;