diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-04-20 22:58:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-04-20 22:58:11 +0300 |
commit | ea82328250b5b134da350f5bacbd7ee57730ba6b (patch) | |
tree | 2d02eec7524ce69bc12f5bede7f409f3d29cb209 /src/resources/map | |
parent | e7f9514cab45863edf6a613ef8563bb15ff66e96 (diff) | |
download | manaplus-ea82328250b5b134da350f5bacbd7ee57730ba6b.tar.gz manaplus-ea82328250b5b134da350f5bacbd7ee57730ba6b.tar.bz2 manaplus-ea82328250b5b134da350f5bacbd7ee57730ba6b.tar.xz manaplus-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.h | 13 |
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 |