From 9020af071e467fd15ac3d5568c2c95a73da4a7d6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Aug 2017 01:45:09 +0300 Subject: Add some other surface flags into dumping surface format function. --- src/resources/imagehelper.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/resources/imagehelper.cpp') 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) -- cgit v1.2.3-70-g09d2