diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-05-29 11:08:32 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-05-29 11:08:32 +0200 |
commit | 1e6f02437e88495d57249f742526526ee5865777 (patch) | |
tree | af200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/Generating/ChunkDesc.cpp | |
parent | Merge pull request #2157 from beeduck/Issue2106 (diff) | |
parent | Merge branch 'master' into PreventNewWarnings (diff) | |
download | cuberite-1e6f02437e88495d57249f742526526ee5865777.tar cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2 cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst cuberite-1e6f02437e88495d57249f742526526ee5865777.zip |
Diffstat (limited to 'src/Generating/ChunkDesc.cpp')
-rw-r--r-- | src/Generating/ChunkDesc.cpp | 12 |
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)); } } |