summaryrefslogtreecommitdiffstats
path: root/src/Generating/ChunkDesc.cpp
diff options
context:
space:
mode:
authorHaoTNN <haotnn@gmail.com>2015-06-03 01:08:57 +0200
committerHaoTNN <haotnn@gmail.com>2015-06-03 01:08:57 +0200
commit3142598dee31acc23c738a1a728638665c8940b8 (patch)
tree2eb837ed785678d536d677ff5020fabca089f2e5 /src/Generating/ChunkDesc.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
parentMerge pull request #2182 from birkett/master (diff)
downloadcuberite-3142598dee31acc23c738a1a728638665c8940b8.tar
cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.gz
cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.bz2
cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.lz
cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.xz
cuberite-3142598dee31acc23c738a1a728638665c8940b8.tar.zst
cuberite-3142598dee31acc23c738a1a728638665c8940b8.zip
Diffstat (limited to 'src/Generating/ChunkDesc.cpp')
-rw-r--r--src/Generating/ChunkDesc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Generating/ChunkDesc.cpp b/src/Generating/ChunkDesc.cpp
index 4a5ac5a18..07855b1d0 100644
--- a/src/Generating/ChunkDesc.cpp
+++ b/src/Generating/ChunkDesc.cpp
@@ -134,7 +134,7 @@ EMCSBiome cChunkDesc::GetBiome(int a_RelX, int a_RelZ)
-void cChunkDesc::SetHeight(int a_RelX, int a_RelZ, int a_Height)
+void cChunkDesc::SetHeight(int a_RelX, int a_RelZ, HEIGHTTYPE a_Height)
{
cChunkDef::SetHeight(m_HeightMap, a_RelX, a_RelZ, a_Height);
}
@@ -143,7 +143,7 @@ void cChunkDesc::SetHeight(int a_RelX, int a_RelZ, int a_Height)
-int cChunkDesc::GetHeight(int a_RelX, int a_RelZ)
+HEIGHTTYPE cChunkDesc::GetHeight(int a_RelX, int a_RelZ)
{
return cChunkDef::GetHeight(m_HeightMap, a_RelX, a_RelZ);
}
@@ -158,7 +158,7 @@ void cChunkDesc::SetHeightFromShape(const Shape & a_Shape)
{
for (int x = 0; x < cChunkDef::Width; x++)
{
- for (int y = cChunkDef::Height - 1; y > 0; y--)
+ for (HEIGHTTYPE y = cChunkDef::Height - 1; y > 0; y--)
{
if (a_Shape[y + x * 256 + z * 16 * 256] != 0)
{
@@ -612,8 +612,8 @@ void cChunkDesc::UpdateHeightmap(void)
{
for (int z = 0; z < cChunkDef::Width; z++)
{
- int Height = 0;
- for (int y = cChunkDef::Height - 1; y > 0; y--)
+ HEIGHTTYPE Height = 0;
+ for (HEIGHTTYPE y = cChunkDef::Height - 1; y > 0; y--)
{
BLOCKTYPE BlockType = GetBlockType(x, y, z);
if (BlockType != E_BLOCK_AIR)
@@ -636,7 +636,7 @@ void cChunkDesc::CompressBlockMetas(cChunkDef::BlockNibbles & a_DestMetas)
const NIBBLETYPE * AreaMetas = m_BlockArea.GetBlockMetas();
for (size_t i = 0; i < ARRAYCOUNT(a_DestMetas); i++)
{
- a_DestMetas[i] = AreaMetas[2 * i] | (AreaMetas[2 * i + 1] << 4);
+ a_DestMetas[i] = static_cast<NIBBLETYPE>(AreaMetas[2 * i] | (AreaMetas[2 * i + 1] << 4));
}
}