diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-17 00:10:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-17 00:10:25 +0300 |
commit | d6da03bf0c4bd2e89429448f2d33c2bdc5083733 (patch) | |
tree | 771e9ccecc5d5fd739f9be5df9af443c9ab8b6e5 /src/map.cpp | |
parent | e3ce2827f14efc6630a4c2932b60e23d9b0321b0 (diff) | |
download | ManaVerse-d6da03bf0c4bd2e89429448f2d33c2bdc5083733.tar.gz ManaVerse-d6da03bf0c4bd2e89429448f2d33c2bdc5083733.tar.bz2 ManaVerse-d6da03bf0c4bd2e89429448f2d33c2bdc5083733.tar.xz ManaVerse-d6da03bf0c4bd2e89429448f2d33c2bdc5083733.zip |
add code for loading map heights.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp index 21c527f2c..86d2171e9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -25,6 +25,7 @@ #include "client.h" #include "configuration.h" #include "render/graphics.h" +#include "mapheights.h" #include "maplayer.h" #include "notifications.h" #include "notifymanager.h" @@ -171,10 +172,11 @@ Map::Map(const int width, const int height, mDrawY(-1), mDrawScrollX(-1), mDrawScrollY(-1), + mAtlas(nullptr), + mHeights(nullptr), mRedrawMap(true), mBeingOpacity(false), - mCustom(false), - mAtlas(nullptr) + mCustom(false) { const int size = mWidth * mHeight; for (int i = 0; i < NB_BLOCKTYPES; i++) @@ -225,6 +227,8 @@ Map::~Map() mAtlas->decRef(); mAtlas = nullptr; } + delete mHeights; + mHeights = nullptr; } void Map::optionChanged(const std::string &value) @@ -1575,3 +1579,9 @@ void Map::redrawMap() { mRedrawMap = true; } + +void Map::addHeights(MapHeights *const heights) +{ + delete mHeights; + mHeights = heights; +} |