1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Create framework for getting rid of global definitions of node/tool/item/whatever types

This commit is contained in:
Perttu Ahola 2011-11-14 00:19:48 +02:00
parent 5fc791ac9a
commit abceeee92f
60 changed files with 1017 additions and 743 deletions

View file

@ -138,7 +138,7 @@ MapNode MapBlock::getNodeParentNoEx(v3s16 p)
#ifndef SERVER
#if 1
void MapBlock::updateMesh(u32 daynight_ratio)
void MapBlock::updateMesh(u32 daynight_ratio, ITextureSource *tsrc)
{
#if 0
/*
@ -154,7 +154,7 @@ void MapBlock::updateMesh(u32 daynight_ratio)
MeshMakeData data;
data.fill(daynight_ratio, this);
scene::SMesh *mesh_new = makeMapBlockMesh(&data);
scene::SMesh *mesh_new = makeMapBlockMesh(&data, tsrc);
/*
Replace the mesh
@ -655,7 +655,7 @@ void MapBlock::serialize(std::ostream &os, u8 version)
}
}
void MapBlock::deSerialize(std::istream &is, u8 version)
void MapBlock::deSerialize(std::istream &is, u8 version, IGameDef *gamedef)
{
if(!ser_ver_supported(version))
throw VersionMismatchException("ERROR: MapBlock format not supported");
@ -786,7 +786,7 @@ void MapBlock::deSerialize(std::istream &is, u8 version)
{
std::string data = deSerializeString(is);
std::istringstream iss(data, std::ios_base::binary);
m_node_metadata->deSerialize(iss);
m_node_metadata->deSerialize(iss, gamedef);
}
else
{
@ -794,7 +794,7 @@ void MapBlock::deSerialize(std::istream &is, u8 version)
std::ostringstream oss(std::ios_base::binary);
decompressZlib(is, oss);
std::istringstream iss(oss.str(), std::ios_base::binary);
m_node_metadata->deSerialize(iss);
m_node_metadata->deSerialize(iss, gamedef);
}
}
catch(SerializationError &e)