1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-21 18:11:11 +00:00

Initialize base image for [lowpart

fixes #16371
This commit is contained in:
sfan5 2025-08-10 16:19:43 +02:00
parent 81e08fc890
commit e2e571ca1f

View file

@ -1333,8 +1333,10 @@ bool ImageSource::generateImagePart(std::string_view part_of_name,
video::IImage *img = generateImage(filename, source_image_names); video::IImage *img = generateImage(filename, source_image_names);
if (img) { if (img) {
core::dimension2d<u32> dim = img->getDimension(); core::dimension2d<u32> dim = img->getDimension();
if (!baseimg) if (!baseimg) {
baseimg = driver->createImage(video::ECF_A8R8G8B8, dim); baseimg = driver->createImage(video::ECF_A8R8G8B8, dim);
baseimg->fill(video::SColor(0,0,0,0));
}
v2s32 clippos(0, 0); v2s32 clippos(0, 0);
clippos.Y = dim.Height * (100-percent) / 100; clippos.Y = dim.Height * (100-percent) / 100;