mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +02:00
support loading layer images
This commit is contained in:
parent
3872a3ea89
commit
23709ab217
@ -361,6 +361,18 @@ std::shared_ptr<IImage> RenderHandler::loadImage(const ImageLocator & locator, E
|
||||
}
|
||||
else
|
||||
{
|
||||
if(loc.image)
|
||||
{
|
||||
std::string imgPath = (*loc.image).getName();
|
||||
if(loc.layer == EImageLayer::OVERLAY)
|
||||
imgPath += "-overlay";
|
||||
if(loc.layer == EImageLayer::SHADOW)
|
||||
imgPath += "-shadow";
|
||||
|
||||
if(CResourceHandler::get()->existsResource(ImagePath::builtin(imgPath)))
|
||||
loc.image = ImagePath::builtin(imgPath);
|
||||
}
|
||||
|
||||
return loadImageImpl(loc)->createImageReference(mode);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user