Fix texture atlas not being created correctly
authorPerttu Ahola <celeron55@gmail.com>
Thu, 1 Dec 2011 10:43:17 +0000 (12:43 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 1 Dec 2011 10:43:17 +0000 (12:43 +0200)
src/nodedef.cpp
src/tile.cpp

index bb08871df371890cdf2685d96c59b9bd70254a3c..8506d95aa2e6c64ffd535df637d5a4e7e3bac73e 100644 (file)
@@ -216,7 +216,8 @@ void ContentFeatures::deSerialize(std::istream &is, IGameDef *gamedef)
        if(readU8(is) != 6)
                throw SerializationError("unsupported tile count");
        for(u32 i=0; i<6; i++)
-               tname_tiles[i] = deSerializeString(is);
+               setTexture(i, deSerializeString(is));
+               //tname_tiles[i] = deSerializeString(is);
        tname_inventory = deSerializeString(is);
        if(readU8(is) != CF_SPECIAL_COUNT)
                throw SerializationError("unsupported CF_SPECIAL_COUNT");
index bf0e264c6424ad09e02e8cf2e516481d13b3241a..29c6b3e671d476238fbd3850ca72052525037e28 100644 (file)
@@ -906,10 +906,14 @@ void TextureSource::buildMainAtlas(class IGameDef *gamedef)
                for(u32 j=0; j<xwise_tiling; j++)
                {
                        // Copy the copy to the atlas
-                       img2->copyToWithAlpha(atlas_img,
+                       /*img2->copyToWithAlpha(atlas_img,
                                        pos_in_atlas + v2s32(j*dim.Width,0),
                                        core::rect<s32>(v2s32(0,0), dim),
                                        video::SColor(255,255,255,255),
+                                       NULL);*/
+                       img2->copyTo(atlas_img,
+                                       pos_in_atlas + v2s32(j*dim.Width,0),
+                                       core::rect<s32>(v2s32(0,0), dim),
                                        NULL);
                }