From 3c404128c4669a1f4f190e20a89553677717fc50 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Sep 2016 22:01:44 +0300 Subject: Add missing comments into defines. --- src/resources/map/map.cpp | 19 ++++++++++--------- src/resources/map/maplayer.cpp | 2 +- src/resources/map/maplayer.h | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src/resources/map') diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 2b6dd070b..2d6631aa5 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -58,7 +58,7 @@ #ifdef USE_OPENGL #include "render/renderers.h" -#endif +#endif // USE_OPENGL #include "utils/delete2.h" #include "utils/dtor.h" @@ -117,9 +117,9 @@ Map::Map(const std::string &name, mOpacity(config.getFloatValue("guialpha")), #ifdef USE_OPENGL mOpenGL(intToRenderType(config.getIntValue("opengl"))), -#else +#else // USE_OPENGL mOpenGL(RENDER_SOFTWARE), -#endif +#endif // USE_OPENGL mPvp(0), mTilesetsIndexed(false), mIndexedTilesets(nullptr), @@ -149,9 +149,9 @@ Map::Map(const std::string &name, mOpenGL == RENDER_GLES_OPENGL || mOpenGL == RENDER_GLES2_OPENGL || mOpenGL == RENDER_MODERN_OPENGL), -#else +#else // USE_OPENGL mCachedDraw(false), -#endif +#endif // USE_OPENGL mCustom(false), mDrawOnlyFringe(false) { @@ -388,7 +388,7 @@ void Map::draw(Graphics *restrict const graphics, updateFlag = 1; } } -#endif +#endif // USE_OPENGL if (mDrawOnlyFringe) { @@ -444,7 +444,7 @@ void Map::draw(Graphics *restrict const graphics, (*it)->drawOGL(graphics); } else -#endif +#endif // USE_OPENGL { FOR_EACH (Layers::iterator, it, mDrawUnderLayers) { @@ -1442,7 +1442,8 @@ void Map::reduce() restrict2 { #ifdef USE_SDL2 return; -#else +#else // USE_SDL2 + if (!mFringeLayer || mOpenGL != RENDER_SOFTWARE || !config.getBoolValue("enableMapReduce")) @@ -1590,7 +1591,7 @@ void Map::reduce() restrict2 } } logger->log("tiles reduced: %d", cnt); -#endif +#endif // USE_SDL2 } void Map::addHeights(const MapHeights *restrict const heights) restrict2 diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index f71f1de48..57a32ea8f 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -375,7 +375,7 @@ void MapLayer::drawOGL(Graphics *const graphics) const restrict2 BLOCK_END("MapLayer::drawOGL") // logger->log("draws: %d", k); } -#endif +#endif // USE_OPENGL void MapLayer::drawFringe(Graphics *const graphics, int startX, diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index 6db6d344e..8ba017398 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -123,7 +123,7 @@ class MapLayer final: public MemoryCounter, public ConfigListener int endY, const int scrollX, const int scrollY) restrict2 A_NONNULL(2); -#endif +#endif // USE_OPENGL void updateSDL(const Graphics *restrict const graphics, int startX, -- cgit v1.2.3-70-g09d2