summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/animation.h27
-rw-r--r--src/resources/mapreader.cpp2
2 files changed, 8 insertions, 21 deletions
diff --git a/src/resources/animation.h b/src/resources/animation.h
index 1d23b1608..ffa717f8c 100644
--- a/src/resources/animation.h
+++ b/src/resources/animation.h
@@ -58,6 +58,10 @@ struct Frame
*/
class Animation
{
+ friend class AnimatedSprite;
+ friend class ParticleEmitter;
+ friend class SimpleAnimation;
+
public:
Animation();
@@ -74,28 +78,10 @@ class Animation
void addTerminator(int rand);
/**
- * Returns the frame at the specified index.
- */
- Frame *getFrame(int index)
- { return &(mFrames[index]); }
-
- /**
* Returns the length of this animation in frames.
*/
- unsigned int getLength() const
- { return static_cast<unsigned>(mFrames.size()); }
-
- /**
- * Check for empty animation.
- */
- bool empty() const
- { return mFrames.empty(); }
-
- /**
- * Returns the duration of this animation.
- */
- int getDuration() const
- { return mDuration; }
+ size_t getLength() const
+ { return mFrames.size(); }
void addJump(std::string name, int rand);
@@ -113,6 +99,7 @@ class Animation
static bool isTerminator(const Frame &phase);
protected:
+
typedef std::vector<Frame> Frames;
typedef Frames::iterator FramesIter;
typedef Frames::reverse_iterator FramesRevIter;
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 3f1ef1239..fd04f015f 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -777,7 +777,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, const std::string &path,
if (ani->getLength() > 0)
{
map->addAnimation(tileGID, new TileAnimation(ani));
- logger->log("Animation length: %d", ani->getLength());
+// logger->log("Animation length: %d", ani->getLength());
}
else
{