diff options
author | tycho <work.tycho@gmail.com> | 2015-05-19 12:50:59 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-19 12:50:59 +0200 |
commit | f2689c4887e6bd66af34de81cd793322f1dd57c4 (patch) | |
tree | b8b78c3f7715797a640dc77b4474e1d2fe347e0c /src/Generating/ChunkDesc.cpp | |
parent | Merge branch 'master' of https://github.com/mc-server/MCServer (diff) | |
download | cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.gz cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.bz2 cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.lz cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.xz cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.tar.zst cuberite-f2689c4887e6bd66af34de81cd793322f1dd57c4.zip |
Diffstat (limited to '')
-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..fe5182004 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 (unsigned char 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)); } } |