Fix random glitches in transparent animations
authorPerttu Ahola <celeron55@gmail.com>
Sun, 17 Jun 2012 21:21:23 +0000 (00:21 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 17 Jun 2012 21:21:23 +0000 (00:21 +0300)
src/tile.cpp

index 731f3712cdc78f8cbd112c859908b726f35f6ad2..6dbe4c63a606b29ba6b8cef22b8816ebf7e373c6 100644 (file)
@@ -1679,6 +1679,9 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
                                return false;
                        }
 
+                       // Fill target image with transparency
+                       img->fill(video::SColor(0,0,0,0));
+
                        core::dimension2d<u32> dim = frame_size;
                        core::position2d<s32> pos_dst(0, 0);
                        core::position2d<s32> pos_src(0, frame_index * frame_size.Y);