The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404309
This commit is contained in:
Sam Lantinga 2009-12-14 23:29:37 +00:00
parent 1bd0c772d9
commit 0158b925d3
6 changed files with 64 additions and 64 deletions

View file

@ -57,22 +57,20 @@ LoadSprite(char *file)
/* Set transparent pixel as the pixel at (0,0) */
if (temp->format->palette) {
SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint8 *) temp->pixels);
SDL_SetColorKey(temp, 1, *(Uint8 *) temp->pixels);
} else {
switch (temp->format->BitsPerPixel) {
case 15:
SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
(*(Uint16 *) temp->pixels) & 0x00007FFF);
SDL_SetColorKey(temp, 1, (*(Uint16 *) temp->pixels) & 0x00007FFF);
break;
case 16:
SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint16 *) temp->pixels);
SDL_SetColorKey(temp, 1, *(Uint16 *) temp->pixels);
break;
case 24:
SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
(*(Uint32 *) temp->pixels) & 0x00FFFFFF);
SDL_SetColorKey(temp, 1, (*(Uint32 *) temp->pixels) & 0x00FFFFFF);
break;
case 32:
SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint32 *) temp->pixels);
SDL_SetColorKey(temp, 1, *(Uint32 *) temp->pixels);
break;
}
}