summaryrefslogtreecommitdiff
path: root/src/resources/map/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-09 07:31:43 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-09 07:32:10 +0300
commitb624b0a4d6410134072c894d5686335c588a6c99 (patch)
tree655dda6e0f4ed4ac772a6150f8d3cd2a6ebaec9b /src/resources/map/map.cpp
parentb406b1a7717af8fd479d39133df35fb331880b61 (diff)
downloadplus-b624b0a4d6410134072c894d5686335c588a6c99.tar.gz
plus-b624b0a4d6410134072c894d5686335c588a6c99.tar.bz2
plus-b624b0a4d6410134072c894d5686335c588a6c99.tar.xz
plus-b624b0a4d6410134072c894d5686335c588a6c99.zip
Fix compilation without OpenGL.
Diffstat (limited to 'src/resources/map/map.cpp')
-rw-r--r--src/resources/map/map.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index c9636183e..656f10fba 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -147,7 +147,9 @@ Map::Map(const std::string &name,
mDrawScrollX(-1),
mDrawScrollY(-1),
mMask(1),
+#ifdef USE_OPENGL
mAtlas(nullptr),
+#endif // USE_OPENGL
mHeights(nullptr),
mRedrawMap(true),
mBeingOpacity(false),
@@ -192,11 +194,13 @@ Map::~Map()
delete2(mTempLayer);
delete2(mObjects);
delete_all(mMapPortals);
+#ifdef USE_OPENGL
if (mAtlas != nullptr)
{
mAtlas->decRef();
mAtlas = nullptr;
}
+#endif // USE_OPENGL
delete2(mHeights);
delete [] mMetaTiles;
}
@@ -1794,9 +1798,11 @@ int Map::calcMemoryChilds(const int level) const
return sz;
}
+#ifdef USE_OPENGL
int Map::getAtlasCount() const restrict2
{
if (mAtlas == nullptr)
return 0;
return CAST_S32(mAtlas->atlases.size());
}
+#endif // USE_OPENGL