From abceeee92f99b84ebb79968269835a4f509bfb90 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 14 Nov 2011 00:19:48 +0200 Subject: Create framework for getting rid of global definitions of node/tool/item/whatever types --- src/mapnode.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mapnode.cpp') diff --git a/src/mapnode.cpp b/src/mapnode.cpp index 3e44f5047..829147839 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -220,7 +220,7 @@ u8 MapNode::getLightBanksWithSource() } #ifndef SERVER -TileSpec MapNode::getTile(v3s16 dir) +TileSpec MapNode::getTile(v3s16 dir, ITextureSource *tsrc) { if(content_features(*this).param_type == CPT_FACEDIR_SIMPLE) dir = facedir_rotate(param1, dir); @@ -253,19 +253,19 @@ TileSpec MapNode::getTile(v3s16 dir) /* If it contains some mineral, change texture id */ - if(content_features(*this).param_type == CPT_MINERAL && g_texturesource) + if(content_features(*this).param_type == CPT_MINERAL && tsrc) { u8 mineral = getMineral(); std::string mineral_texture_name = mineral_block_texture(mineral); if(mineral_texture_name != "") { u32 orig_id = spec.texture.id; - std::string texture_name = g_texturesource->getTextureName(orig_id); + std::string texture_name = tsrc->getTextureName(orig_id); //texture_name += "^blit:"; texture_name += "^"; texture_name += mineral_texture_name; - u32 new_id = g_texturesource->getTextureId(texture_name); - spec.texture = g_texturesource->getTexture(new_id); + u32 new_id = tsrc->getTextureId(texture_name); + spec.texture = tsrc->getTexture(new_id); } } -- cgit v1.2.3