From ae4aea451d6e2c44b273c963026c4fd697568f79 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 9 May 2011 03:55:11 -0600 Subject: Fix sprite buffering size issues Reviewed-by: Yohann Ferreira --- src/compoundsprite.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/compoundsprite.h') diff --git a/src/compoundsprite.h b/src/compoundsprite.h index 3b443219..5754c4e1 100644 --- a/src/compoundsprite.h +++ b/src/compoundsprite.h @@ -45,12 +45,20 @@ public: /** * Gets the width in pixels of the first sprite in the list. */ - virtual int getWidth() const; + virtual int getWidth() const + { return mWidth; } /** * Gets the height in pixels of the first sprite in the list. */ - virtual int getHeight() const; + virtual int getHeight() const + { return mHeight; } + + int getOffsetX() const + { return mOffsetX; } + + int getOffsetY() const + { return mOffsetY; } virtual const Image* getImage() const; @@ -97,6 +105,7 @@ private: mutable Image *mImage; mutable Image *mAlphaImage; + mutable int mWidth, mHeight; mutable int mOffsetX, mOffsetY; mutable bool mNeedsRedraw; -- cgit v1.2.3-70-g09d2