- void Draw(SDL_Surface *dest, geometry::Point<int> position) const {
- animation->GetSprite()->Draw(dest, position + animation->Offset(Frame()), animation->Col(Frame()) + ColOffset(), animation->Row(Frame()) + RowOffset());
+ void ChangeAnimation(const Animation *a) { animation = a; }
+ const Animation *GetAnimation() const { return animation; }
+
+ void ChangeSprite(const Sprite *s) { sprite = s; }
+ const Sprite *GetSprite() const { return sprite ? sprite : animation->GetSprite(); }
+
+ 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());