mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	support loading layer images
This commit is contained in:
		| @@ -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); | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user