summaryrefslogtreecommitdiff
path: root/src/resources/map/maplayer.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-31 05:04:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-31 17:30:48 +0300
commit537085e221d25f710ed7162e1fc8add8ffe4a72f (patch)
treed1abf9cdb898005099eb741a1f6ed79417b331fb /src/resources/map/maplayer.h
parent496e74aa95984380e4a36fe8d55d0839002d6f8f (diff)
downloadmanaverse-537085e221d25f710ed7162e1fc8add8ffe4a72f.tar.gz
manaverse-537085e221d25f710ed7162e1fc8add8ffe4a72f.tar.bz2
manaverse-537085e221d25f710ed7162e1fc8add8ffe4a72f.tar.xz
manaverse-537085e221d25f710ed7162e1fc8add8ffe4a72f.zip
Improve fringe map layers drawing.
Pre cache next tile position with image.
Diffstat (limited to 'src/resources/map/maplayer.h')
-rw-r--r--src/resources/map/maplayer.h16
1 files changed, 14 insertions, 2 deletions
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,