From 537085e221d25f710ed7162e1fc8add8ffe4a72f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 Dec 2016 05:04:16 +0300 Subject: Improve fringe map layers drawing. Pre cache next tile position with image. --- src/resources/map/maplayer.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/resources/map/maplayer.h') diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index 19f213ecc..10be2d3aa 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -164,13 +164,25 @@ class MapLayer final: public MemoryCounter, public ConfigListener std::string getCounterName() const override final { return mName; } +#ifdef UNITTESTS + TileInfo *getTiles() const + { + return mTiles; + } + +#endif // UNITTESTS + +#ifndef UNITTESTS protected: +#endif // UNITTESTS static int getTileDrawWidth(const TileInfo *restrict img, const int endX, - int &width) A_WARN_UNUSED A_NONNULL(1); + int &restrict width, + int &restrict nextTile) A_WARN_UNUSED A_NONNULL(1); static int getEmptyTileDrawWidth(const TileInfo *restrict img, - const int endX) + const int endX, + int &restrict nextTile) A_WARN_UNUSED A_NONNULL(1); void updateConditionTiles(MetaTile *restrict const metaTiles, -- cgit v1.2.3-70-g09d2