+ void DrawTopRight(SDL_Surface *dest, geometry::Point<int> position) const {
+ geometry::Vector<int> offset(-sprite->Width(), 0);
+ Draw(dest, position + offset);
+ }
+ void DrawCenter(SDL_Surface *dest, geometry::Point<int> position) const {
+ geometry::Vector<int> offset(-sprite->Width() / 2, -sprite->Height() / 2);
+ Draw(dest, position + offset);
+ }
+ void DrawCenterBottom(SDL_Surface *dest, geometry::Point<int> position) const {
+ geometry::Vector<int> offset(-sprite->Width() / 2, -sprite->Height());
+ Draw(dest, position + offset);
+ }
+
+protected:
+ int Frame() const { return Running() ? (timer.Iteration() % NumFrames()) : 0; }
+ virtual int Col() const = 0;
+ virtual int Row() const = 0;
+ virtual int NumFrames() const = 0;