From b624b0a4d6410134072c894d5686335c588a6c99 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Mar 2018 07:31:43 +0300 Subject: Fix compilation without OpenGL. --- src/resources/map/map.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/resources/map/map.cpp') 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 -- cgit v1.2.3-60-g2f50