From c9f43996f3147100627ee2c6f9da993ceb160113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Apr 2012 02:26:34 +0300 Subject: Improve iterators part 2. --- src/map.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 53698ea03..f9821f7e0 100644 --- a/src/map.h +++ b/src/map.h @@ -43,6 +43,13 @@ class ObjectsLayer; typedef std::vector Tilesets; typedef std::vector Layers; +typedef Layers::const_iterator LayersCIter; + +typedef std::vector > TilePairVector; +typedef TilePairVector::const_iterator TilePairVectorCIter; + +typedef std::vector AmbientLayerVector; +typedef AmbientLayerVector::const_iterator AmbientLayerVectorCIter; /** * A meta tile stores additional information about a location on a tile map. @@ -84,11 +91,14 @@ class TileAnimation { mAffected.push_back(std::make_pair(layer, index)); } private: - std::vector > mAffected; + TilePairVector mAffected; SimpleAnimation *mAnimation; Image *mLastImage; }; +typedef std::map TileAnimationMap; +typedef TileAnimationMap::const_iterator TileAnimationMapCIter; + /** * A tile map. */ @@ -422,8 +432,8 @@ class Map : public Properties, public ConfigListener unsigned mOnClosedList, mOnOpenList; // Overlay data - std::vector mBackgrounds; - std::vector mForegrounds; + AmbientLayerVector mBackgrounds; + AmbientLayerVector mForegrounds; float mLastAScrollX; float mLastAScrollY; // bool mSpritesUpdated; -- cgit v1.2.3-60-g2f50