From: Daniel Karbach Date: Sun, 12 Aug 2012 16:52:02 +0000 (+0200) Subject: added sprite accessors to Animation X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=62db8dd0b428e68cf5626607297589c2bafe0d3e;p=l2e.git added sprite accessors to Animation --- 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()); }