From 62db8dd0b428e68cf5626607297589c2bafe0d3e Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 12 Aug 2012 18:52:02 +0200 Subject: [PATCH] added sprite accessors to Animation --- src/graphics/Animation.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/graphics/Animation.h b/src/graphics/Animation.h index 0f33541..03ead7f 100644 --- a/src/graphics/Animation.h +++ b/src/graphics/Animation.h @@ -48,6 +48,9 @@ public: void SetRowOffset(int offset) { rowOffset = offset; } int RowOffset() const { return rowOffset; } + const Sprite *GetSprite() const { return sprite; } + void ChangeSprite(const Sprite *s) { sprite = s; } + virtual void Draw(SDL_Surface *dest, geometry::Point position) const { sprite->Draw(dest, position, Col() + ColOffset(), Row() + RowOffset()); } -- 2.39.2