projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d7408a
)
Properly initialize baseimg for texture modifier [combine:WxH:X,Y=filename:X,Y=filename2
author
Perttu Ahola
<celeron55@gmail.com>
Fri, 31 Aug 2012 14:58:55 +0000
(17:58 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Fri, 31 Aug 2012 14:58:55 +0000
(17:58 +0300)
src/tile.cpp
patch
|
blob
|
history
diff --git
a/src/tile.cpp
b/src/tile.cpp
index 6dbe4c63a606b29ba6b8cef22b8816ebf7e373c6..a9ded3891783e0474ff348709c28bf21e614c7a2 100644
(file)
--- a/
src/tile.cpp
+++ b/
src/tile.cpp
@@
-1344,7
+1344,11
@@
bool generate_image(std::string part_of_name, video::IImage *& baseimg,
u32 h0 = stoi(sf.next(":"));
infostream<<"combined w="<<w0<<" h="<<h0<<std::endl;
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)
{
u32 x = stoi(sf.next(","));