summaryrefslogtreecommitdiff
path: root/src/resources/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/resources/map
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadmv-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
mv-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
mv-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/resources/map')
-rw-r--r--src/resources/map/map.cpp19
-rw-r--r--src/resources/map/maplayer.cpp2
-rw-r--r--src/resources/map/maplayer.h2
3 files changed, 12 insertions, 11 deletions
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,