]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Sprite.h
added attack targets selection state
[l2e.git] / src / graphics / Sprite.h
index 4a99af421232e6638e71534944aa1d47ba23fdcd..d56c69199cd7aa3f3cea49fc7a0ccb99b8606b64 100644 (file)
@@ -26,6 +26,10 @@ public:
        int Width() const { return width; }
        int Height() const { return height; }
        void Draw(SDL_Surface *dest, geometry::Point<int> position, int col = 0, int row = 0) const;
+       void DrawTopRight(SDL_Surface *dest, geometry::Point<int> position, int col = 0, int row = 0) const {
+               geometry::Vector<int> offset(-Width(), 0);
+               Draw(dest, position + offset, col, row);
+       }
        void DrawCenter(SDL_Surface *dest, geometry::Point<int> position, int col = 0, int row = 0) const {
                geometry::Vector<int> offset(-Width() / 2, -Height() / 2);
                Draw(dest, position + offset, col, row);