diff options
author | Jared Adams <jaxad0127@gmail.com> | 2011-05-09 03:55:11 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2011-05-17 09:59:05 -0600 |
commit | ae4aea451d6e2c44b273c963026c4fd697568f79 (patch) | |
tree | 8f909b2c23baf3abb21b1c3987872fb891daa42f /src/sprite.h | |
parent | dbfee8acae48ee1eec46d049656e83e952686ece (diff) | |
download | mana-client-ae4aea451d6e2c44b273c963026c4fd697568f79.tar.gz mana-client-ae4aea451d6e2c44b273c963026c4fd697568f79.tar.bz2 mana-client-ae4aea451d6e2c44b273c963026c4fd697568f79.tar.xz mana-client-ae4aea451d6e2c44b273c963026c4fd697568f79.zip |
Fix sprite buffering size issues
Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/sprite.h')
-rw-r--r-- | src/sprite.h | 16 |
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; |