summaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-14 00:19:48 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:41 +0200
commitabceeee92f99b84ebb79968269835a4f509bfb90 (patch)
tree669edeca68fae4eb086ac4e4c1846b55d3aa779d /src/mapnode.cpp
parent5fc791ac9a15ea6f234ca2d23041c83679255746 (diff)
downloadminetest-abceeee92f99b84ebb79968269835a4f509bfb90.tar.gz
minetest-abceeee92f99b84ebb79968269835a4f509bfb90.tar.bz2
minetest-abceeee92f99b84ebb79968269835a4f509bfb90.zip
Create framework for getting rid of global definitions of node/tool/item/whatever types
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r--src/mapnode.cpp10
1 files changed, 5 insertions, 5 deletions
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);
}
}