diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-05 15:00:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-05 15:00:58 +0300 |
commit | 9a3a196dbf633a699c26d0227802a42f025c8bfd (patch) | |
tree | dfbdb2ff1e2c54d75a2bf6411d3f70df22518c28 /src/compoundsprite.h | |
parent | fc17ff22d9df50df9c5d1cf3dc0de358001271ed (diff) | |
parent | ece36a40d4e9a838cde01075d7681b8fc517b19f (diff) | |
download | plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.gz plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.bz2 plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.xz plus-9a3a196dbf633a699c26d0227802a42f025c8bfd.zip |
Merge branch 'master' into stripped
Conflicts:
src/guichan/gui.cpp
src/guichan/include/guichan/sdl/sdlpixel.hpp
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 |