summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-17 01:45:09 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-17 01:45:09 +0300
commit9020af071e467fd15ac3d5568c2c95a73da4a7d6 (patch)
treef571ee810c3584494acc7d1c56402d34098b7864 /src/resources
parentf084a76075d63d70eff0a6fc198a475b2ea428f2 (diff)
downloadmanaplus-9020af071e467fd15ac3d5568c2c95a73da4a7d6.tar.gz
manaplus-9020af071e467fd15ac3d5568c2c95a73da4a7d6.tar.bz2
manaplus-9020af071e467fd15ac3d5568c2c95a73da4a7d6.tar.xz
manaplus-9020af071e467fd15ac3d5568c2c95a73da4a7d6.zip
Add some other surface flags into dumping surface format function.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/imagehelper.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp
index fc1f3e0de..be6f96ab3 100644
--- a/src/resources/imagehelper.cpp
+++ b/src/resources/imagehelper.cpp
@@ -183,8 +183,12 @@ void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image)
{
const SDL_PixelFormat * const format = image->format;
logger->log("Bytes per pixel: %d", format->BytesPerPixel);
-#ifndef USE_SDL2
+#ifdef USE_SDL2
+ logger->log("Format: %u", format->format);
+#else // USE_SDL2
+
logger->log("Alpha: %d", format->alpha);
+ logger->log("Color key: %u", format->colorkey);
#endif // USE_SDL2
logger->log("Loss: %02x, %02x, %02x, %02x",
@@ -200,6 +204,11 @@ void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image)
logger->log("Mask: %08x, %08x, %08x, %08x", format->Rmask,
format->Gmask, format->Bmask, format->Amask);
}
+ logger->log("Flags: %u", image->flags);
+ logger->log("Pitch: %d", CAST_S32(image->pitch));
+#ifndef USE_SDL2
+ logger->log("Offset: %d", image->offset);
+#endif // USE_SDL2
}
SDL_Surface *ImageHelper::loadPng(SDL_RWops *const rw)