diff options
Diffstat (limited to 'src/sprite.h')
-rw-r--r-- | src/sprite.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sprite.h b/src/sprite.h index 51811149..89780519 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -50,6 +50,22 @@ class Sprite draw(Graphics *graphics, int offsetX, int offsetY) const = 0; /** + * Returns the horizontal size of the sprites graphical representation + * in pixels or 0 when it is undefined. + */ + virtual int + getWidth() const + { return 0; } + + /** + * Returns the vertical size of the sprites graphical representation + * in pixels or 0 when it is undefined. + */ + virtual int + getHeight() const + { return 0; } + + /** * Returns the pixel Y coordinate of the sprite. */ virtual int |