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:
@ -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;
|
||||
|
Reference in New Issue
Block a user