]> git.localhorst.tv Git - l2e.git/commitdiff
added sprite accessors to Animation
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 12 Aug 2012 16:52:02 +0000 (18:52 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 12 Aug 2012 16:52:02 +0000 (18:52 +0200)
src/graphics/Animation.h

index 0f33541f0397ce41ce479f4442246bf0b3fd8654..03ead7fc5fc3cb75cc293b8c8fd55c135eb7af2a 100644 (file)
@@ -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<int> position) const {
                sprite->Draw(dest, position, Col() + ColOffset(), Row() + RowOffset());
        }