diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-17 01:45:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-17 01:45:09 +0300 |
commit | 9020af071e467fd15ac3d5568c2c95a73da4a7d6 (patch) | |
tree | f571ee810c3584494acc7d1c56402d34098b7864 | |
parent | f084a76075d63d70eff0a6fc198a475b2ea428f2 (diff) | |
download | manaverse-9020af071e467fd15ac3d5568c2c95a73da4a7d6.tar.gz manaverse-9020af071e467fd15ac3d5568c2c95a73da4a7d6.tar.bz2 manaverse-9020af071e467fd15ac3d5568c2c95a73da4a7d6.tar.xz manaverse-9020af071e467fd15ac3d5568c2c95a73da4a7d6.zip |
Add some other surface flags into dumping surface format function.
-rw-r--r-- | src/resources/imagehelper.cpp | 11 |
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) |