comparison src/video/SDL_bmp.c @ 2920:cdb01906cb7e

indent
author Sam Lantinga <slouken@libsdl.org>
date Thu, 25 Dec 2008 05:26:29 +0000
parents bd518fc76f28
children e4a469d6ddab
comparison
equal deleted inserted replaced
2919:2f91a3847ae8 2920:cdb01906cb7e
216 palette = (surface->format)->palette; 216 palette = (surface->format)->palette;
217 if (palette) { 217 if (palette) {
218 if (biClrUsed == 0) { 218 if (biClrUsed == 0) {
219 biClrUsed = 1 << biBitCount; 219 biClrUsed = 1 << biBitCount;
220 } 220 }
221 if ((int)biClrUsed > palette->ncolors) { 221 if ((int) biClrUsed > palette->ncolors) {
222 palette->ncolors = biClrUsed; 222 palette->ncolors = biClrUsed;
223 palette->colors = 223 palette->colors =
224 (SDL_Color *) SDL_realloc(palette->colors, 224 (SDL_Color *) SDL_realloc(palette->colors,
225 palette->ncolors * 225 palette->ncolors *
226 sizeof(*palette->colors)); 226 sizeof(*palette->colors));
227 if (!palette->colors) { 227 if (!palette->colors) {
228 SDL_OutOfMemory(); 228 SDL_OutOfMemory();
229 was_error = 1; 229 was_error = 1;
230 goto done; 230 goto done;
231 } 231 }
232 } else if ((int)biClrUsed < palette->ncolors) { 232 } else if ((int) biClrUsed < palette->ncolors) {
233 palette->ncolors = biClrUsed; 233 palette->ncolors = biClrUsed;
234 } 234 }
235 if (biSize == 12) { 235 if (biSize == 12) {
236 for (i = 0; i < (int) biClrUsed; ++i) { 236 for (i = 0; i < (int) biClrUsed; ++i) {
237 SDL_RWread(src, &palette->colors[i].b, 1, 1); 237 SDL_RWread(src, &palette->colors[i].b, 1, 1);