Mercurial > sdl-ios-xcode
comparison test/testsprite2.c @ 3186:51750b7a966f
indent
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 10 Jun 2009 13:34:20 +0000 |
parents | d1436442215f |
children | 8fe0806637df |
comparison
equal
deleted
inserted
replaced
3185:44d5474c2c8a | 3186:51750b7a966f |
---|---|
59 if (temp->format->palette) { | 59 if (temp->format->palette) { |
60 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint8 *) temp->pixels); | 60 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint8 *) temp->pixels); |
61 } else { | 61 } else { |
62 switch (temp->format->BitsPerPixel) { | 62 switch (temp->format->BitsPerPixel) { |
63 case 15: | 63 case 15: |
64 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, (*(Uint16 *) temp->pixels) & 0x00007FFF); | 64 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, |
65 (*(Uint16 *) temp->pixels) & 0x00007FFF); | |
65 break; | 66 break; |
66 case 16: | 67 case 16: |
67 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint16 *) temp->pixels); | 68 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint16 *) temp->pixels); |
68 break; | 69 break; |
69 case 24: | 70 case 24: |
70 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, (*(Uint32 *) temp->pixels) & 0x00FFFFFF); | 71 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, |
72 (*(Uint32 *) temp->pixels) & 0x00FFFFFF); | |
71 break; | 73 break; |
72 case 32: | 74 case 32: |
73 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint32 *) temp->pixels); | 75 SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint32 *) temp->pixels); |
74 break; | 76 break; |
75 } | 77 } |