We're using the alpha component of the palette entries, let's name it appropriately.
This commit is contained in:
parent
8f9ae94235
commit
e09b99c523
4 changed files with 11 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue