diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-29 21:09:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-12-29 22:01:14 +0300 |
commit | 0c06037af71273481958ba8587bbb4082d1ed822 (patch) | |
tree | d20ac88eb7654dab57975d6f02f22ad0d9314872 /src/resources/map/map.cpp | |
parent | e8b2a5596f569e72e0e7482e8f41aaf7e710d8ec (diff) | |
download | manaverse-0c06037af71273481958ba8587bbb4082d1ed822.tar.gz manaverse-0c06037af71273481958ba8587bbb4082d1ed822.tar.bz2 manaverse-0c06037af71273481958ba8587bbb4082d1ed822.tar.xz manaverse-0c06037af71273481958ba8587bbb4082d1ed822.zip |
Improve drawing tiles.
Remove check for existing tile image in each tile.
From now tiles without image hidden.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r-- | src/resources/map/map.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 327df358c..759951bcf 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1716,6 +1716,16 @@ void Map::updateConditionLayers() restrict2 } } +void Map::preCacheLayers() restrict2 +{ + FOR_EACH (LayersCIter, it, mLayers) + { + MapLayer *restrict const layer = *it; + if (layer) + layer->updateCache(mWidth, mHeight); + } +} + int Map::calcMemoryLocal() const { return static_cast<int>(sizeof(Map) + |