mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Properly initialize baseimg for texture modifier [combine:WxH:X,Y=filename:X,Y=filename2
This commit is contained in:
parent
1d7408a7b8
commit
8887105ffd
1 changed files with 5 additions and 1 deletions
|
@ -1344,7 +1344,11 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
|
||||||
u32 h0 = stoi(sf.next(":"));
|
u32 h0 = stoi(sf.next(":"));
|
||||||
infostream<<"combined w="<<w0<<" h="<<h0<<std::endl;
|
infostream<<"combined w="<<w0<<" h="<<h0<<std::endl;
|
||||||
core::dimension2d<u32> dim(w0,h0);
|
core::dimension2d<u32> dim(w0,h0);
|
||||||
baseimg = driver->createImage(video::ECF_A8R8G8B8, dim);
|
if(baseimg == NULL)
|
||||||
|
{
|
||||||
|
baseimg = driver->createImage(video::ECF_A8R8G8B8, dim);
|
||||||
|
baseimg->fill(video::SColor(0,0,0,0));
|
||||||
|
}
|
||||||
while(sf.atend() == false)
|
while(sf.atend() == false)
|
||||||
{
|
{
|
||||||
u32 x = stoi(sf.next(","));
|
u32 x = stoi(sf.next(","));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue