diff options
author | Reid <reidyaro@gmail.com> | 2012-01-30 15:27:30 +0100 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2012-01-30 15:27:30 +0100 |
commit | 502a0a0163e702af7334979a2eabfc4826a94091 (patch) | |
tree | 5e80ef76585b1718d7e74a411117c725fe3cb0e9 /src/compoundsprite.h | |
parent | 8dea62750ab3a44e0f35f2543bbb6ccf2a9470ce (diff) | |
parent | 193ea898e5f549c14c0e4cd0d060785de4fb4bcf (diff) | |
download | manaplus-502a0a0163e702af7334979a2eabfc4826a94091.tar.gz manaplus-502a0a0163e702af7334979a2eabfc4826a94091.tar.bz2 manaplus-502a0a0163e702af7334979a2eabfc4826a94091.tar.xz manaplus-502a0a0163e702af7334979a2eabfc4826a94091.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/compoundsprite.h')
-rw-r--r-- | src/compoundsprite.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/compoundsprite.h b/src/compoundsprite.h index 1c04e44d2..1b9eeca34 100644 --- a/src/compoundsprite.h +++ b/src/compoundsprite.h @@ -44,11 +44,11 @@ class CompoundItem Image *alphaImage; }; -class CompoundSprite : public Sprite, private std::vector<Sprite*> +class CompoundSprite : public Sprite { public: - typedef CompoundSprite::iterator SpriteIterator; - typedef CompoundSprite::const_iterator SpriteConstIterator; + typedef std::vector<Sprite*>::iterator SpriteIterator; + typedef std::vector<Sprite*>::const_iterator SpriteConstIterator; CompoundSprite(); @@ -60,7 +60,7 @@ public: virtual bool update(int time); - virtual bool draw(Graphics* graphics, int posX, int posY) const; + virtual bool draw(Graphics *graphics, int posX, int posY) const; /** * Gets the width in pixels of the first sprite in the list. @@ -72,7 +72,7 @@ public: */ virtual int getHeight() const; - virtual const Image* getImage() const; + virtual const Image *getImage() const; virtual bool setSpriteDirection(SpriteDirection direction); @@ -83,17 +83,17 @@ public: unsigned int getFrameCount() const; size_t size() const - { return std::vector<Sprite*>::size(); } + { return mSprites.size(); } bool empty() const - { return std::vector<Sprite*>::empty(); } + { return mSprites.empty(); } - void addSprite(Sprite* sprite); + void addSprite(Sprite *sprite); - void setSprite(int layer, Sprite* sprite); + void setSprite(int layer, Sprite *sprite); Sprite *getSprite(int layer) const - { return at(layer); } + { return mSprites.at(layer); } void removeSprite(int layer); @@ -144,6 +144,7 @@ private: bool mEnableAlphaFix; bool mDisableAdvBeingCaching; bool mDisableBeingCaching; + std::vector<Sprite*> mSprites; }; #endif // COMPOUNDSPRITE_H |