diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-01-28 23:36:15 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-01-29 13:24:20 +0100 |
commit | 8e4fe8414eed9fc4934a0d0e34eee578e0216dc7 (patch) | |
tree | 1e83aa3712bd2f2b5da4a1ddc5226563215ff1be | |
parent | 3cd5ac3ced565c86a5e5ca4fdb336e91ba55f524 (diff) | |
download | mana-client-8e4fe8414eed9fc4934a0d0e34eee578e0216dc7.tar.gz mana-client-8e4fe8414eed9fc4934a0d0e34eee578e0216dc7.tar.bz2 mana-client-8e4fe8414eed9fc4934a0d0e34eee578e0216dc7.tar.xz mana-client-8e4fe8414eed9fc4934a0d0e34eee578e0216dc7.zip |
Removed Sprite::getCurrentFrame and Sprite::getFrameCount
They are apparently no longer being used.
Reviewed-by: Erik Schilling
-rw-r--r-- | src/animatedsprite.cpp | 12 | ||||
-rw-r--r-- | src/animatedsprite.h | 4 | ||||
-rw-r--r-- | src/compoundsprite.cpp | 49 | ||||
-rw-r--r-- | src/compoundsprite.h | 14 | ||||
-rw-r--r-- | src/imagesprite.h | 6 | ||||
-rw-r--r-- | src/sprite.h | 12 |
6 files changed, 1 insertions, 96 deletions
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 222ae9ac..54a11d87 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -194,18 +194,6 @@ bool AnimatedSprite::setDirection(SpriteDirection direction) return false; } -size_t AnimatedSprite::getCurrentFrame() const -{ - return mFrameIndex; -} - -size_t AnimatedSprite::getFrameCount() const -{ - if (mAnimation) - return mAnimation->getLength(); - return 0; -} - int AnimatedSprite::getDuration() const { if (mAnimation) diff --git a/src/animatedsprite.h b/src/animatedsprite.h index 3440e1be..32a63bf6 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -80,10 +80,6 @@ class AnimatedSprite : public Sprite virtual bool drawnWhenBehind() const { return true; } - size_t getCurrentFrame() const; - - size_t getFrameCount() const; - int getDuration() const; private: diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp index fc782980..cd07ca51 100644 --- a/src/compoundsprite.cpp +++ b/src/compoundsprite.cpp @@ -163,26 +163,6 @@ bool CompoundSprite::drawnWhenBehind() const return (getNumberOfLayers() == 1); } -size_t CompoundSprite::getCurrentFrame() const -{ - SpriteConstIterator it, it_end; - for (it = mSprites.begin(), it_end = mSprites.end(); it != it_end; it++) - if (*it) - return (*it)->getCurrentFrame(); - - return 0; -} - -size_t CompoundSprite::getFrameCount() const -{ - SpriteConstIterator it, it_end; - for (it = mSprites.begin(), it_end = mSprites.end(); it != it_end; it++) - if (*it) - return (*it)->getFrameCount(); - - return 0; -} - void CompoundSprite::addSprite(Sprite *sprite) { mSprites.push_back(sprite); @@ -232,35 +212,6 @@ void CompoundSprite::ensureSize(size_t layerCount) mSprites.resize(layerCount); } -/** - * Returns the curent frame in the current animation of the given layer. - */ -size_t CompoundSprite::getCurrentFrame(size_t layer) -{ - if (layer >= mSprites.size()) - return 0; - - if (Sprite *s = getSprite(layer)) - return s->getCurrentFrame(); - - return 0; -} - -/** - * Returns the frame count in the current animation of the given layer. - */ -size_t CompoundSprite::getFrameCount(size_t layer) -{ - if (layer >= mSprites.size()) - return 0; - - Sprite *s = getSprite(layer); - if (s) - return s->getFrameCount(); - - return 0; -} - int CompoundSprite::getDuration() const { int duration = 0; diff --git a/src/compoundsprite.h b/src/compoundsprite.h index 10ee01e1..eed40231 100644 --- a/src/compoundsprite.h +++ b/src/compoundsprite.h @@ -68,10 +68,6 @@ public: virtual bool drawnWhenBehind() const; - size_t getCurrentFrame() const; - - size_t getFrameCount() const; - int getDuration() const; size_t size() const @@ -90,16 +86,6 @@ public: void ensureSize(size_t layerCount); - /** - * Returns the curent frame in the current animation of the given layer. - */ - virtual size_t getCurrentFrame(size_t layer); - - /** - * Returns the frame count in the current animation of the given layer. - */ - virtual size_t getFrameCount(size_t layer); - void doRedraw() { mNeedsRedraw = true; } diff --git a/src/imagesprite.h b/src/imagesprite.h index ef599d17..3ee8fc61 100644 --- a/src/imagesprite.h +++ b/src/imagesprite.h @@ -60,12 +60,6 @@ public: int getNumberOfLayers() { return 1; } - size_t getCurrentFrame() const - { return 0; } - - size_t getFrameCount() const - { return 1; } - int getDuration() const { return 0; } diff --git a/src/sprite.h b/src/sprite.h index 35df7115..3af6eb7c 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -87,7 +87,7 @@ class Sprite /** * Returns a reference to the current image being drawn. */ - virtual const Image* getImage() const = 0; + virtual const Image *getImage() const = 0; /** * Sets the direction. @@ -109,16 +109,6 @@ class Sprite { return mAlpha; } /** - * Returns the current frame number for the sprite. - */ - virtual size_t getCurrentFrame() const = 0; - - /** - * Returns the frame count for the sprite. - */ - virtual size_t getFrameCount() const = 0; - - /** * Returns the duration of the current sprite animation in milliseconds. */ virtual int getDuration() const = 0; |