equal
deleted
inserted
replaced
410 |
410 |
411 /* If the surface has a colorkey or alpha channel we'll save a |
411 /* If the surface has a colorkey or alpha channel we'll save a |
412 32-bit BMP with alpha channel, otherwise save a 24-bit BMP. */ |
412 32-bit BMP with alpha channel, otherwise save a 24-bit BMP. */ |
413 if (save32bit) { |
413 if (save32bit) { |
414 SDL_InitFormat(&format, 32, |
414 SDL_InitFormat(&format, 32, |
415 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); |
415 0x00FF0000, 0x0000FF00, 0x000000FF, |
|
416 0xFF000000); |
416 } else { |
417 } else { |
417 SDL_InitFormat(&format, 24, |
418 SDL_InitFormat(&format, 24, |
418 #if SDL_BYTEORDER == SDL_LIL_ENDIAN |
419 #if SDL_BYTEORDER == SDL_LIL_ENDIAN |
419 0x00FF0000, 0x0000FF00, 0x000000FF, |
420 0x00FF0000, 0x0000FF00, 0x000000FF, |
420 #else |
421 #else |
422 #endif |
423 #endif |
423 0); |
424 0); |
424 } |
425 } |
425 surface = SDL_ConvertSurface(saveme, &format, 0); |
426 surface = SDL_ConvertSurface(saveme, &format, 0); |
426 if (!surface) { |
427 if (!surface) { |
427 SDL_SetError("Couldn't convert image to %d bpp", format.BitsPerPixel); |
428 SDL_SetError("Couldn't convert image to %d bpp", |
|
429 format.BitsPerPixel); |
428 } |
430 } |
429 } |
431 } |
430 } |
432 } |
431 |
433 |
432 if (surface && (SDL_LockSurface(surface) == 0)) { |
434 if (surface && (SDL_LockSurface(surface) == 0)) { |