summaryrefslogtreecommitdiff
path: root/src/sprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sprite.h')
-rw-r--r--src/sprite.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/sprite.h b/src/sprite.h
index 38db8b41..797b1b20 100644
--- a/src/sprite.h
+++ b/src/sprite.h
@@ -60,16 +60,28 @@ class Sprite
virtual bool draw(Graphics* graphics, int posX, int posY) const = 0;
/**
- * Gets the width in pixels of the image of the current frame
+ * Gets the width in pixels of the image
*/
virtual int getWidth() const = 0;
/**
- * Gets the height in pixels of the image of the current frame
+ * Gets the height in pixels of the image
*/
virtual int getHeight() const = 0;
/**
+ * Gets the horizontal offset that the sprite will be drawn at
+ */
+ virtual int getOffsetX() const
+ { return 0; }
+
+ /**
+ * Gets the vertical offset that the sprite will be drawn at
+ */
+ virtual int getOffsetY() const
+ { return 0; }
+
+ /**
* Returns a reference to the current image being drawn.
*/
virtual const Image* getImage() const = 0;