summaryrefslogtreecommitdiff
path: root/src/mapblock.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-20 22:03:49 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-20 22:03:49 +0200
commit123e8fdf53ffb40c7464d0559a49e048fed79d7d (patch)
tree98df766999e684e46629bfa886195427adda2967 /src/mapblock.cpp
parent6350c5d7a606924a12ba41468d126ff94d9e6d36 (diff)
downloadminetest-123e8fdf53ffb40c7464d0559a49e048fed79d7d.tar.gz
minetest-123e8fdf53ffb40c7464d0559a49e048fed79d7d.tar.bz2
minetest-123e8fdf53ffb40c7464d0559a49e048fed79d7d.zip
framework for modifying textures
Diffstat (limited to 'src/mapblock.cpp')
-rw-r--r--src/mapblock.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index 9372c8fb1..af08cadaa 100644
--- a/src/mapblock.cpp
+++ b/src/mapblock.cpp
@@ -646,7 +646,9 @@ void MapBlock::updateMesh(u32 daynight_ratio)
if(f.tile.feature == TILEFEAT_NONE)
{
- collector.append(g_tile_materials[f.tile.id], f.vertices, 4,
+ /*collector.append(g_tile_materials[f.tile.id], f.vertices, 4,
+ indices, 6);*/
+ collector.append(tile_material_get(f.tile.id), f.vertices, 4,
indices, 6);
}
else
@@ -748,16 +750,21 @@ void MapBlock::updateMesh(u32 daynight_ratio)
= video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
if(dir == v3s16(0,-1,0))
buf->getMaterial().setTexture(0,
- g_texturecache.get("torch_on_floor"));
+ g_irrlicht->getTexture("../data/torch_on_floor.png"));
+ //g_texturecache.get("torch_on_floor"));
else if(dir == v3s16(0,1,0))
buf->getMaterial().setTexture(0,
- g_texturecache.get("torch_on_ceiling"));
+ g_irrlicht->getTexture("../data/torch_on_ceiling.png"));
+ //g_texturecache.get("torch_on_ceiling"));
// For backwards compatibility
else if(dir == v3s16(0,0,0))
buf->getMaterial().setTexture(0,
- g_texturecache.get("torch_on_floor"));
+ g_irrlicht->getTexture("../data/torch_on_floor.png"));
+ //g_texturecache.get("torch_on_floor"));
else
- buf->getMaterial().setTexture(0, g_texturecache.get("torch"));
+ buf->getMaterial().setTexture(0,
+ g_irrlicht->getTexture("../data/torch.png"));
+ //buf->getMaterial().setTexture(0, g_texturecache.get("torch"));
// Add to mesh
mesh_new->addMeshBuffer(buf);