summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index 1a95fced8..ee401c2fb 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -44,6 +44,7 @@
#include "resources/subimage.h"
#include "resources/map/location.h"
+#include "resources/map/tileanimation.h"
#include "utils/delete2.h"
#include "utils/dtor.h"
@@ -69,41 +70,6 @@ class ActorFunctuator final
}
} actorCompare;
-TileAnimation::TileAnimation(Animation *const ani):
- mAffected(),
- mAnimation(new SimpleAnimation(ani)),
- mLastImage(nullptr)
-{
-}
-
-TileAnimation::~TileAnimation()
-{
- delete2(mAnimation);
-}
-
-bool TileAnimation::update(const int ticks)
-{
- if (!mAnimation)
- return false;
-
- // update animation
- if (!mAnimation->update(ticks))
- return false;
-
- // exchange images
- Image *const img = mAnimation->getCurrentImage();
- if (img != mLastImage)
- {
- FOR_EACH (TilePairVectorCIter, i, mAffected)
- {
- if (i->first)
- i->first->setTile(i->second, img);
- }
- mLastImage = img;
- }
- return true;
-}
-
Map::Map(const int width, const int height,
const int tileWidth, const int tileHeight) :
Properties(),