From a353543dd4da3c489a84f6f17125fdd0e1be2349 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 4 Jun 2007 21:48:47 +0000 Subject: Merged 0.0 changes from revision 3234 to 3317 to trunk. --- src/sprite.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/sprite.h') diff --git a/src/sprite.h b/src/sprite.h index 51811149..89780519 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -49,6 +49,22 @@ class Sprite virtual void 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. */ -- cgit v1.2.3-70-g09d2