From ea82328250b5b134da350f5bacbd7ee57730ba6b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 20 Apr 2018 22:58:11 +0300 Subject: 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. --- src/resources/map/tileset.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/resources/map') 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 mProperties; + int mFirstGid; + bool mIsEmpty; }; #endif // RESOURCES_MAP_TILESET_H -- cgit v1.2.3-70-g09d2