1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-13 11:40:38 +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) for(auto & curImg : curImgs)
{ {
SDL_SetColorKey(curImg.bitmap, SDL_SRCCOLORKEY, #ifdef VCMI_SDL1
SDL_MapRGB(curImg.bitmap->format, 0, 255, 255) 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 #ifndef VCMI_SDL1
SDL_SetSurfaceBlendMode(curImg.bitmap,SDL_BLENDMODE_NONE); SDL_SetSurfaceBlendMode(curImg.bitmap,SDL_BLENDMODE_NONE);
#endif #endif