From 135c19b4337e1ab45cff40a306eadc52a061ddef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 Aug 2012 22:18:03 +0300 Subject: add atlas textures support. --- src/map.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 71d0f5ee4..e68f063d9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -159,7 +159,8 @@ Map::Map(const int width, const int height, mDrawScrollY(-1), mRedrawMap(true), mBeingOpacity(false), - mCustom(false) + mCustom(false), + mAtlas(nullptr) { const int size = mWidth * mHeight; for (int i = 0; i < NB_BLOCKTYPES; i++) @@ -200,6 +201,11 @@ Map::~Map() delete mObjects; mObjects = nullptr; delete_all(mMapPortals); + if (mAtlas) + { + mAtlas->decRef(); + mAtlas = nullptr; + } } void Map::optionChanged(const std::string &value) -- cgit v1.2.3-60-g2f50