summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-11 20:05:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-11 20:05:29 +0300
commit2c302cc6cb54881fbe354cc9d5a9997788f63e56 (patch)
tree9cef7d73dca25c523038ddb2ce13d49349596b27 /src/resources/map/map.cpp
parent3bbfd3d36990113d7e91724625f4a347412dd883 (diff)
downloadmanaplus-2c302cc6cb54881fbe354cc9d5a9997788f63e56.tar.gz
manaplus-2c302cc6cb54881fbe354cc9d5a9997788f63e56.tar.bz2
manaplus-2c302cc6cb54881fbe354cc9d5a9997788f63e56.tar.xz
manaplus-2c302cc6cb54881fbe354cc9d5a9997788f63e56.zip
Add structure for tile object.
Now it contains only image pointer.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index cc2d3487a..e206edef2 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -1405,7 +1405,7 @@ void Map::reduce()
if (x >= layer->mWidth || y >= layer->mHeight)
continue;
- Image *const img = layer->mTiles[x + y * layer->mWidth];
+ Image *const img = layer->mTiles[x + y * layer->mWidth].image;
if (img)
{
if (img->hasAlphaChannel() && img->isAlphaCalculated())
@@ -1487,7 +1487,7 @@ void Map::reduce()
continue;
}
- const Image *img = layer->mTiles[x + y * layer->mWidth];
+ const Image *img = layer->mTiles[x + y * layer->mWidth].image;
if (img && !img->isAlphaVisible())
{ // removing all down tiles
++ ri;
@@ -1496,10 +1496,10 @@ void Map::reduce()
MapLayer *const layer2 = *ri;
const size_t pos = static_cast<size_t>(
x + y * layer2->mWidth);
- img = layer2->mTiles[pos];
+ img = layer2->mTiles[pos].image;
if (img)
{
- layer2->mTiles[pos] = nullptr;
+ layer2->mTiles[pos].image = nullptr;
cnt ++;
}
++ ri;