X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSprite.h;fp=src%2Fgraphics%2FSprite.h;h=d56c69199cd7aa3f3cea49fc7a0ccb99b8606b64;hb=3c72a71fbf6de96333a641051a20c6bf8b3a5df3;hp=4a99af421232e6638e71534944aa1d47ba23fdcd;hpb=7946f704a4cd3a985d2fb523079fce7fa14c341e;p=l2e.git diff --git a/src/graphics/Sprite.h b/src/graphics/Sprite.h index 4a99af4..d56c691 100644 --- a/src/graphics/Sprite.h +++ b/src/graphics/Sprite.h @@ -26,6 +26,10 @@ public: int Width() const { return width; } int Height() const { return height; } void Draw(SDL_Surface *dest, geometry::Point position, int col = 0, int row = 0) const; + void DrawTopRight(SDL_Surface *dest, geometry::Point position, int col = 0, int row = 0) const { + geometry::Vector offset(-Width(), 0); + Draw(dest, position + offset, col, row); + } void DrawCenter(SDL_Surface *dest, geometry::Point position, int col = 0, int row = 0) const { geometry::Vector offset(-Width() / 2, -Height() / 2); Draw(dest, position + offset, col, row);