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/atlas/atlasmanager.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/resources/atlas/atlasmanager.cpp') diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp index 746e9b8f3..b097bcfc4 100644 --- a/src/resources/atlas/atlasmanager.cpp +++ b/src/resources/atlas/atlasmanager.cpp @@ -26,7 +26,7 @@ #ifdef DEBUG_IMAGES #include "logger.h" -#endif +#endif // DEBUG_IMAGES #include "utils/mathutils.h" #include "utils/physfscheckutils.h" @@ -50,7 +50,7 @@ #ifndef SDL_BYTEORDER #error missing SDL_endian.h -#endif +#endif // SDL_BYTEORDER AtlasManager::AtlasManager() { @@ -70,7 +70,7 @@ AtlasResource *AtlasManager::loadTextureAtlas(const std::string &name, int sz = settings.textureSize; if (maxSize > sz) maxSize = sz; -#endif +#endif // !defined(ANDROID) && !defined(__APPLE__) // sorting images on atlases. simpleSort(name, atlases, images, maxSize); @@ -163,7 +163,8 @@ void AtlasManager::loadImages(const StringVect &files, #ifdef DEBUG_IMAGES logger->log("set name %p, %s", static_cast(image), image->mIdPath.c_str()); -#endif +#endif // DEBUG_IMAGES + images.push_back(image); } } @@ -278,12 +279,13 @@ void AtlasManager::createSDLAtlas(TextureAtlas *const atlas) const unsigned int gmask = 0x00ff0000; const unsigned int bmask = 0x0000ff00; const unsigned int amask = 0x000000ff; -#else +#else // SDL_BYTEORDER == SDL_BIG_ENDIAN + const unsigned int rmask = 0x000000ff; const unsigned int gmask = 0x0000ff00; const unsigned int bmask = 0x00ff0000; const unsigned int amask = 0xff000000; -#endif +#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN // do not create atlas based on only one image if (atlas->items.size() == 1) @@ -356,7 +358,8 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas) #ifdef DEBUG_IMAGES logger->log("set name %p, %s", static_cast(image), image->mIdPath.c_str()); -#endif +#endif // DEBUG_IMAGES + image->incRef(); FOR_EACH (std::vector::iterator, it, atlas->items) @@ -374,7 +377,8 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas) #ifdef DEBUG_IMAGES logger->log("set name %p, %s", static_cast(image2), image2->mIdPath.c_str()); -#endif +#endif // DEBUG_IMAGES + image2->incRef(); } } @@ -439,4 +443,4 @@ void AtlasManager::moveToDeleted(AtlasResource *const resource) } } -#endif +#endif // USE_OPENGL -- cgit v1.2.3-70-g09d2