1
0
mirror of https://github.com/luanti-org/minetestmapper.git synced 2025-10-06 13:55:22 +02:00

night rendering

This commit is contained in:
sfan5
2020-05-08 18:50:00 +02:00
parent 2979dc5b6b
commit 55e407c130
3 changed files with 44 additions and 4 deletions

View File

@@ -151,3 +151,10 @@ std::string BlockDecoder::getNode(u8 x, u8 y, u8 z) const
}
return it->second;
}
u8 BlockDecoder::getParam1(u8 x, u8 y, u8 z) const
{
unsigned int position = x + (y << 4) + (z << 8);
unsigned int offset = (m_contentWidth == 2) ? 0x2000 : 0x1000;
return m_mapData.c_str()[offset + position];
}