We're using the alpha component of the palette entries, let's name it appropriately.

This commit is contained in:
Sam Lantinga 2013-03-24 09:56:45 -07:00
parent 8f9ae94235
commit e09b99c523
4 changed files with 11 additions and 11 deletions

View file

@ -188,11 +188,11 @@ SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
surface->map->info.flags |= SDL_COPY_COLORKEY;
surface->map->info.colorkey = key;
if (surface->format->palette) {
surface->format->palette->colors[surface->map->info.colorkey].unused = SDL_ALPHA_TRANSPARENT;
surface->format->palette->colors[surface->map->info.colorkey].a = SDL_ALPHA_TRANSPARENT;
}
} else {
if (surface->format->palette) {
surface->format->palette->colors[surface->map->info.colorkey].unused = SDL_ALPHA_OPAQUE;
surface->format->palette->colors[surface->map->info.colorkey].a = SDL_ALPHA_OPAQUE;
}
surface->map->info.flags &= ~SDL_COPY_COLORKEY;
}