summaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-15 21:00:39 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:44 +0200
commitba762bcd49c9f3ffa3cc4ecac73b13365c2047ec (patch)
tree434f3a74df5dd382434df5b655fee7843e45e004 /src/mapnode.cpp
parent6da8cb00e27106221e013aa6d93965b95e630a18 (diff)
downloadminetest-ba762bcd49c9f3ffa3cc4ecac73b13365c2047ec.tar.gz
minetest-ba762bcd49c9f3ffa3cc4ecac73b13365c2047ec.tar.bz2
minetest-ba762bcd49c9f3ffa3cc4ecac73b13365c2047ec.zip
Clean mapnode.h and fix other files accordingly
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r--src/mapnode.cpp56
1 files changed, 1 insertions, 55 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index 1e8915b03..2fbc81dd2 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "main.h" // For g_settings
#include "nodedef.h"
#include "content_mapnode.h" // For mapnode_translate_*_internal
+#include "serialization.h" // For ser_ver_supported
#ifndef SERVER
/*
@@ -208,61 +209,6 @@ u8 MapNode::getLightBanksWithSource(INodeDefManager *nodemgr) const
return (lightday&0x0f) | ((lightnight<<4)&0xf0);
}
-#ifndef SERVER
-TileSpec MapNode::getTile(v3s16 dir, ITextureSource *tsrc,
- INodeDefManager *nodemgr) const
-{
- if(nodemgr->get(*this).param_type == CPT_FACEDIR_SIMPLE)
- dir = facedir_rotate(param1, dir);
-
- TileSpec spec;
-
- s32 dir_i = -1;
-
- if(dir == v3s16(0,0,0))
- dir_i = -1;
- else if(dir == v3s16(0,1,0))
- dir_i = 0;
- else if(dir == v3s16(0,-1,0))
- dir_i = 1;
- else if(dir == v3s16(1,0,0))
- dir_i = 2;
- else if(dir == v3s16(-1,0,0))
- dir_i = 3;
- else if(dir == v3s16(0,0,1))
- dir_i = 4;
- else if(dir == v3s16(0,0,-1))
- dir_i = 5;
-
- if(dir_i == -1)
- // Non-directional
- spec = nodemgr->get(*this).tiles[0];
- else
- spec = nodemgr->get(*this).tiles[dir_i];
-
- /*
- If it contains some mineral, change texture id
- */
- if(nodemgr->get(*this).param_type == CPT_MINERAL && tsrc)
- {
- u8 mineral = getMineral(nodemgr);
- std::string mineral_texture_name = mineral_block_texture(mineral);
- if(mineral_texture_name != "")
- {
- u32 orig_id = spec.texture.id;
- std::string texture_name = tsrc->getTextureName(orig_id);
- //texture_name += "^blit:";
- texture_name += "^";
- texture_name += mineral_texture_name;
- u32 new_id = tsrc->getTextureId(texture_name);
- spec.texture = tsrc->getTexture(new_id);
- }
- }
-
- return spec;
-}
-#endif
-
u8 MapNode::getMineral(INodeDefManager *nodemgr) const
{
if(nodemgr->get(*this).param_type == CPT_MINERAL)