1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +02:00

* next part of campaign support

This commit is contained in:
mateuszb
2010-02-18 12:34:44 +00:00
parent 968148c4dc
commit db755622b3
8 changed files with 208 additions and 97 deletions

View File

@ -1046,4 +1046,16 @@ std::string CSDL_Ext::processStr(std::string str, std::vector<std::string> & tor
return str;
}
bool CSDL_Ext::isTransparent( SDL_Surface * srf, int x, int y )
{
if(srf->format->BytesPerPixel == 1)
{
return ((ui8*)srf->pixels)[x + srf->pitch * y] == 0;
}
else
{
assert(!"isTransparent called with non-8bpp surface!");
}
}
SDL_Surface * CSDL_Ext::std32bppSurface = NULL;