summaryrefslogtreecommitdiff
path: root/src/render/sdlgraphics.cpp
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/render/sdlgraphics.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadmanaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/render/sdlgraphics.cpp')
-rw-r--r--src/render/sdlgraphics.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 9cd734f30..c0e9b58a3 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -40,13 +40,13 @@
#ifndef SDL_BYTEORDER
#error missing SDL_endian.h
-#endif
+#endif // SDL_BYTEORDER
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
static unsigned int *cR = nullptr;
static unsigned int *cG = nullptr;
static unsigned int *cB = nullptr;
-#endif
+#endif // SDL_BYTEORDER == SDL_LIL_ENDIAN
SDLGraphics::SDLGraphics() :
Graphics(),
@@ -970,11 +970,11 @@ void SDLGraphics::fillRectangle(const Rect &restrict rectangle) restrict2
p[2] = CAST_U8((p[2] * ca + cb) >> 8);
p[1] = CAST_U8((p[1] * ca + cg) >> 8);
p[0] = CAST_U8((p[0] * ca + cr) >> 8);
-#else
+#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
p[0] = CAST_U8((p[0] * ca + cb) >> 8);
p[1] = CAST_U8((p[1] * ca + cg) >> 8);
p[2] = CAST_U8((p[2] * ca + cr) >> 8);
-#endif
+#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
}
}
break;
@@ -1004,7 +1004,7 @@ void SDLGraphics::fillRectangle(const Rect &restrict rectangle) restrict2
| (g & 0xff00) | (r & 0xff0000));
}
}
-#else
+#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
if (!cR)
{
cR = new unsigned int[0x100];
@@ -1064,7 +1064,7 @@ void SDLGraphics::fillRectangle(const Rect &restrict rectangle) restrict2
| cR[(dst & rMask) / rShift];
}
}
-#endif
+#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
break;
}
default:
@@ -1235,7 +1235,7 @@ void SDLGraphics::drawHLine(int x1, int y, int x2) restrict2
p[2] = b2;
p += 3;
}
-#else
+#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
for (; x1 <= x2; ++x1)
{
p[0] = b2;
@@ -1243,7 +1243,7 @@ void SDLGraphics::drawHLine(int x1, int y, int x2) restrict2
p[2] = b0;
p += 3;
}
-#endif
+#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
break;
}
@@ -1365,7 +1365,7 @@ void SDLGraphics::drawVLine(int x, int y1, int y2) restrict2
p[2] = b2;
p += pitch;
}
-#else
+#else // SDL_BYTEORDER == SDL_BIG_ENDIAN
for (; y1 <= y2; ++y1)
{
p[0] = b2;
@@ -1373,7 +1373,7 @@ void SDLGraphics::drawVLine(int x, int y1, int y2) restrict2
p[2] = b0;
p += pitch;
}
-#endif
+#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN
break;
}