1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

Fix hero flags rendering

This commit is contained in:
AlexVinS 2014-07-02 21:09:49 +04:00
parent 9606aed4a3
commit 7b75b19d1a

View File

@ -265,9 +265,13 @@ void Graphics::loadHeroFlagsDetail(std::pair<std::vector<CDefEssential *> Graphi
}
for(auto & curImg : curImgs)
{
SDL_SetColorKey(curImg.bitmap, SDL_SRCCOLORKEY,
SDL_MapRGB(curImg.bitmap->format, 0, 255, 255)
);
#ifdef VCMI_SDL1
uint32_t key = SDL_MapRGB(curImg.bitmap->format, 0, 255, 255);
#else
uint32_t key = SDL_MapRGBA(curImg.bitmap->format, 0, 255, 255, 0);
#endif
SDL_SetColorKey(curImg.bitmap, SDL_SRCCOLORKEY, key);
#ifndef VCMI_SDL1
SDL_SetSurfaceBlendMode(curImg.bitmap,SDL_BLENDMODE_NONE);
#endif