diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-13 22:18:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-30 02:57:13 +0300 |
commit | 135c19b4337e1ab45cff40a306eadc52a061ddef (patch) | |
tree | 0a163ca1edd542aec5570b7e451034aafb4089dd /src/map.cpp | |
parent | 3a2bab265768c219b0c077eef10b69dfe8158131 (diff) | |
download | manaplus-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.gz manaplus-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.bz2 manaplus-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.xz manaplus-135c19b4337e1ab45cff40a306eadc52a061ddef.zip |
add atlas textures support.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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) |