1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Refactoring of CPicture class to improve encapsulation

This commit is contained in:
Ivan Savenko
2023-01-30 13:58:13 +02:00
parent 42df5626d9
commit e35a669eeb
14 changed files with 84 additions and 109 deletions

View File

@@ -213,11 +213,14 @@ void CWindowObject::setShadow(bool on)
{
OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255-DISPOSE);
shadowParts.push_back(std::make_shared<CPicture>(shadowCorner, shadowPos.x, shadowPos.y));
shadowParts.push_back(std::make_shared<CPicture>(shadowRight, shadowPos.x, shadowStart.y));
shadowParts.push_back(std::make_shared<CPicture>(shadowBottom, shadowStart.x, shadowPos.y));
shadowParts.push_back(std::make_shared<CPicture>(shadowCorner, Point(shadowPos.x, shadowPos.y)));
shadowParts.push_back(std::make_shared<CPicture>(shadowRight, Point(shadowPos.x, shadowStart.y)));
shadowParts.push_back(std::make_shared<CPicture>(shadowBottom, Point(shadowStart.x, shadowPos.y)));
}
SDL_FreeSurface(shadowCorner);
SDL_FreeSurface(shadowBottom);
SDL_FreeSurface(shadowRight);
}
}