1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

centralize key color management

This commit is contained in:
AlexVinS
2014-07-02 22:20:54 +04:00
parent 082c9a506e
commit 638dac90af
6 changed files with 48 additions and 22 deletions

View File

@ -639,9 +639,7 @@ SDLImage::SDLImage(std::string filename, bool compressed):
#else
if (surf->format->palette)
{
const SDL_Color &c = temp->format->palette->colors[0];
uint32_t key = SDL_MapRGBA(temp -> format, c.r, c.g, c.b,c.a);
SDL_SetColorKey(temp, SDL_TRUE, key);
CSDL_Ext::setColorKey(temp,temp->format->palette->colors[0]);
}
SDL_SetSurfaceRLE(temp, SDL_RLEACCEL);
#endif