Mercurial > sdl-ios-xcode
comparison src/video/SDL_bmp.c @ 1670:eef792d31de8 SDL-1.3
Work in progress. :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 07 Jun 2006 16:10:28 +0000 |
parents | 4da1ee79c9af |
children | 396a35389351 |
comparison
equal
deleted
inserted
replaced
1669:9857d21967bb | 1670:eef792d31de8 |
---|---|
201 was_error = 1; | 201 was_error = 1; |
202 goto done; | 202 goto done; |
203 } | 203 } |
204 | 204 |
205 /* Create a compatible surface, note that the colors are RGB ordered */ | 205 /* Create a compatible surface, note that the colors are RGB ordered */ |
206 surface = SDL_CreateRGBSurface(SDL_SWSURFACE, | 206 surface = |
207 biWidth, biHeight, biBitCount, Rmask, | 207 SDL_CreateRGBSurface(0, biWidth, biHeight, biBitCount, Rmask, Gmask, |
208 Gmask, Bmask, 0); | 208 Bmask, 0); |
209 if (surface == NULL) { | 209 if (surface == NULL) { |
210 was_error = 1; | 210 was_error = 1; |
211 goto done; | 211 goto done; |
212 } | 212 } |
213 | 213 |
384 surface = saveme; | 384 surface = saveme; |
385 } else { | 385 } else { |
386 SDL_Rect bounds; | 386 SDL_Rect bounds; |
387 | 387 |
388 /* Convert to 24 bits per pixel */ | 388 /* Convert to 24 bits per pixel */ |
389 surface = SDL_CreateRGBSurface(SDL_SWSURFACE, | 389 surface = SDL_CreateRGBSurface(0, saveme->w, saveme->h, 24, |
390 saveme->w, saveme->h, 24, | |
391 #if SDL_BYTEORDER == SDL_LIL_ENDIAN | 390 #if SDL_BYTEORDER == SDL_LIL_ENDIAN |
392 0x00FF0000, 0x0000FF00, 0x000000FF, | 391 0x00FF0000, 0x0000FF00, 0x000000FF, |
393 #else | 392 #else |
394 0x000000FF, 0x0000FF00, 0x00FF0000, | 393 0x000000FF, 0x0000FF00, 0x00FF0000, |
395 #endif | 394 #endif |