1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Flipped images are now tracked by RenderHandler

This commit is contained in:
Ivan Savenko
2024-06-05 20:16:12 +00:00
parent 230add02e4
commit b850b6339f
10 changed files with 208 additions and 114 deletions

View File

@@ -202,7 +202,7 @@ std::shared_ptr<IImage> SDLImageConst::createImageReference()
return std::make_shared<SDLImageRGB>(shared_from_this());
}
std::shared_ptr<SDLImageConst> SDLImageConst::horizontalFlip() const
std::shared_ptr<IConstImage> SDLImageConst::horizontalFlip() const
{
SDL_Surface * flipped = CSDL_Ext::horizontalFlip(surf);
auto ret = std::make_shared<SDLImageConst>(flipped, EImageBlitMode::ALPHA);
@@ -214,7 +214,7 @@ std::shared_ptr<SDLImageConst> SDLImageConst::horizontalFlip() const
return ret;
}
std::shared_ptr<SDLImageConst> SDLImageConst::verticalFlip() const
std::shared_ptr<IConstImage> SDLImageConst::verticalFlip() const
{
SDL_Surface * flipped = CSDL_Ext::verticalFlip(surf);
auto ret = std::make_shared<SDLImageConst>(flipped, EImageBlitMode::ALPHA);
@@ -342,16 +342,6 @@ void SDLImageBase::setBlitMode(EImageBlitMode mode)
blitMode = mode;
}
void SDLImageBase::horizontalFlip()
{
image = image->horizontalFlip();
}
void SDLImageBase::verticalFlip()
{
image = image->verticalFlip();
}
void SDLImageRGB::setSpecialPallete(const SpecialPalette & SpecialPalette, uint32_t colorsToSkipMask)
{}