summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp14
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;
+}