summaryrefslogtreecommitdiff
path: root/src/compoundsprite.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2011-05-09 03:55:11 -0600
committerJared Adams <jaxad0127@gmail.com>2011-05-17 09:59:05 -0600
commitae4aea451d6e2c44b273c963026c4fd697568f79 (patch)
tree8f909b2c23baf3abb21b1c3987872fb891daa42f /src/compoundsprite.h
parentdbfee8acae48ee1eec46d049656e83e952686ece (diff)
downloadmana-ae4aea451d6e2c44b273c963026c4fd697568f79.tar.gz
mana-ae4aea451d6e2c44b273c963026c4fd697568f79.tar.bz2
mana-ae4aea451d6e2c44b273c963026c4fd697568f79.tar.xz
mana-ae4aea451d6e2c44b273c963026c4fd697568f79.zip
Fix sprite buffering size issues
Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/compoundsprite.h')
-rw-r--r--src/compoundsprite.h13
1 files changed, 11 insertions, 2 deletions
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;