From ec1beaa2ee07368368e9bd45fe400eedc57419eb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Aug 2013 14:37:03 +0300 Subject: first part of fixes for compilation with SDL2 --- src/resources/imagehelper.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/resources/imagehelper.cpp') diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index 6a4a47505..cdd1672f6 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -62,8 +62,10 @@ SDL_Surface* ImageHelper::convertTo32Bit(SDL_Surface *const tmpImage) return nullptr; SDL_PixelFormat RGBAFormat; RGBAFormat.palette = nullptr; +#ifndef USE_SDL2 RGBAFormat.colorkey = 0; RGBAFormat.alpha = 0; +#endif RGBAFormat.BitsPerPixel = 32; RGBAFormat.BytesPerPixel = 4; #if SDL_BYTEORDER == SDL_BIG_ENDIAN @@ -102,7 +104,9 @@ void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image) const { const SDL_PixelFormat * const format = image->format; logger->log("Bytes per pixel: %d", format->BytesPerPixel); +#ifndef USE_SDL2 logger->log("Alpha: %d", format->alpha); +#endif logger->log("Loss: %02x, %02x, %02x, %02x", static_cast(format->Rloss), static_cast(format->Gloss), static_cast(format->Bloss), static_cast(format->Aloss)); -- cgit v1.2.3-70-g09d2