From 841ac10e5c20ad152f375f43bceb992fc3945041 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 10 Feb 2011 15:55:15 +0200 Subject: fixes toward mingw compatibility --- src/tile.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/tile.cpp') diff --git a/src/tile.cpp b/src/tile.cpp index d71055c7a..7b19b3651 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -387,10 +387,16 @@ void TextureSource::buildMainAtlas() sourcelist.push_back("sand.png^mineral_coal.png"); sourcelist.push_back("sand.png^mineral_iron.png"); + // Padding to disallow texture bleeding + s32 padding = 8; + /* First pass: generate almost everything */ core::position2d pos_in_atlas(0,0); + + pos_in_atlas.Y += padding; + for(u32 i=0; igetPixel(x, src_y); + atlas_img->setPixel(x,dst_y,c); + } + img2->drop(); /* @@ -447,7 +475,7 @@ void TextureSource::buildMainAtlas() m_name_to_id.insert(name, id); // Increment position - pos_in_atlas.Y += dim.Height; + pos_in_atlas.Y += dim.Height + padding * 2; } /* -- cgit v1.2.3