summaryrefslogtreecommitdiff
path: root/src/resources/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-20 22:58:11 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-20 22:58:11 +0300
commitea82328250b5b134da350f5bacbd7ee57730ba6b (patch)
tree2d02eec7524ce69bc12f5bede7f409f3d29cb209 /src/resources/map
parente7f9514cab45863edf6a613ef8563bb15ff66e96 (diff)
downloadmv-ea82328250b5b134da350f5bacbd7ee57730ba6b.tar.gz
mv-ea82328250b5b134da350f5bacbd7ee57730ba6b.tar.bz2
mv-ea82328250b5b134da350f5bacbd7ee57730ba6b.tar.xz
mv-ea82328250b5b134da350f5bacbd7ee57730ba6b.zip
Dont put on maps tiles from empty atlases.
Before in wrong maps and OpenGL enabled modes, manaplus may show artifacts, because tiles from empty atlases really is not loaded and drawed.
Diffstat (limited to 'src/resources/map')
-rw-r--r--src/resources/map/tileset.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/resources/map/tileset.h b/src/resources/map/tileset.h
index 6acf52c41..50eb112e3 100644
--- a/src/resources/map/tileset.h
+++ b/src/resources/map/tileset.h
@@ -43,8 +43,9 @@ class Tileset final : public ImageSet
const int margin,
const int spacing) :
ImageSet(img, w, h, margin, spacing),
+ mProperties(),
mFirstGid(firstGid),
- mProperties()
+ mIsEmpty(false)
{
}
@@ -92,10 +93,16 @@ class Tileset final : public ImageSet
return sz;
}
- private:
- int mFirstGid;
+ void setEmpty(const bool b)
+ { mIsEmpty = b; }
+
+ bool isEmpty() const
+ { return mIsEmpty; }
+ private:
std::map<std::string, std::string> mProperties;
+ int mFirstGid;
+ bool mIsEmpty;
};
#endif // RESOURCES_MAP_TILESET_H