mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
CSDL_Ext::alphaTransform does not need to return the modified surface.
This commit is contained in:
parent
78d62481e4
commit
c75bbc359e
@ -384,7 +384,7 @@ CTerrainRect::CTerrainRect()
|
||||
arrows = CDefHandler::giveDef("ADAG.DEF");
|
||||
for(size_t y=0; y < arrows->ourImages.size(); ++y)
|
||||
{
|
||||
arrows->ourImages[y].bitmap = CSDL_Ext::alphaTransform(arrows->ourImages[y].bitmap);
|
||||
CSDL_Ext::alphaTransform(arrows->ourImages[y].bitmap);
|
||||
}
|
||||
}
|
||||
CTerrainRect::~CTerrainRect()
|
||||
@ -1605,4 +1605,4 @@ void CAdvMapInt::select(const CArmedInstance *sel )
|
||||
townList.draw(screen);
|
||||
heroList.draw(screen);
|
||||
infoBar.draw(screen);
|
||||
}
|
||||
}
|
||||
|
@ -2451,7 +2451,7 @@ CBattleHero::CBattleHero(const std::string & defName, int phaseG, int imageG, bo
|
||||
SDL_FreeSurface(dh->ourImages[i].bitmap);
|
||||
dh->ourImages[i].bitmap = hlp;
|
||||
}
|
||||
dh->ourImages[i].bitmap = CSDL_Ext::alphaTransform(dh->ourImages[i].bitmap);
|
||||
CSDL_Ext::alphaTransform(dh->ourImages[i].bitmap);
|
||||
}
|
||||
dh->alphaTransformed = true;
|
||||
|
||||
@ -2463,7 +2463,7 @@ CBattleHero::CBattleHero(const std::string & defName, int phaseG, int imageG, bo
|
||||
//coloring flag and adding transparency
|
||||
for(int i=0; i<flag->ourImages.size(); ++i)
|
||||
{
|
||||
flag->ourImages[i].bitmap = CSDL_Ext::alphaTransform(flag->ourImages[i].bitmap);
|
||||
CSDL_Ext::alphaTransform(flag->ourImages[i].bitmap);
|
||||
graphics->blueToPlayersAdv(flag->ourImages[i].bitmap, player);
|
||||
}
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ Uint32 CSDL_Ext::SDL_GetPixel(SDL_Surface *surface, const int & x, const int & y
|
||||
}
|
||||
}
|
||||
|
||||
SDL_Surface * CSDL_Ext::alphaTransform(SDL_Surface *src)
|
||||
void CSDL_Ext::alphaTransform(SDL_Surface *src)
|
||||
{
|
||||
Uint32 trans = SDL_MapRGBA(src->format, 0, 255, 255, 255);
|
||||
SDL_SetColorKey(src, 0, trans);
|
||||
@ -443,7 +443,6 @@ SDL_Surface * CSDL_Ext::alphaTransform(SDL_Surface *src)
|
||||
}
|
||||
}
|
||||
}
|
||||
return src;
|
||||
}
|
||||
// <=>
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace CSDL_Ext
|
||||
SDL_Cursor * SurfaceToCursor(SDL_Surface *image, int hx, int hy); //creates cursor from bitmap
|
||||
Uint32 SDL_GetPixel(SDL_Surface *surface, const int & x, const int & y, bool colorByte = false);
|
||||
SDL_Color SDL_GetPixelColor(SDL_Surface *surface, int x, int y); //returns color of pixel at given position
|
||||
SDL_Surface * alphaTransform(SDL_Surface * src); //adds transparency and shadows (partial handling only; see examples of using for details)
|
||||
void alphaTransform(SDL_Surface * src); //adds transparency and shadows (partial handling only; see examples of using for details)
|
||||
void blitWithRotate1(const SDL_Surface *src, const SDL_Rect * srcRect, SDL_Surface * dst, SDL_Rect * dstRect);//srcRect is not used, works with 8bpp sources and 24bpp dests
|
||||
void blitWithRotate2(const SDL_Surface *src, const SDL_Rect * srcRect, SDL_Surface * dst, const SDL_Rect * dstRect);//srcRect is not used, works with 8bpp sources and 24bpp dests
|
||||
void blitWithRotate3(const SDL_Surface *src, const SDL_Rect * srcRect, SDL_Surface * dst, const SDL_Rect * dstRect);//srcRect is not used, works with 8bpp sources and 24bpp dests
|
||||
|
Loading…
Reference in New Issue
Block a user