From: Perttu Ahola Date: Thu, 1 Dec 2011 10:43:17 +0000 (+0200) Subject: Fix texture atlas not being created correctly X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=146be1f0b6c058ad0e9fe0aa38e3c1f75a39823b;p=zefram%2Fminetest%2Fminetest_engine.git Fix texture atlas not being created correctly --- diff --git a/src/nodedef.cpp b/src/nodedef.cpp index bb08871d..8506d95a 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -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"); diff --git a/src/tile.cpp b/src/tile.cpp index bf0e264c..29c6b3e6 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -906,10 +906,14 @@ void TextureSource::buildMainAtlas(class IGameDef *gamedef) for(u32 j=0; jcopyToWithAlpha(atlas_img, + /*img2->copyToWithAlpha(atlas_img, pos_in_atlas + v2s32(j*dim.Width,0), core::rect(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(v2s32(0,0), dim), NULL); }