diff options
author | Samuel Barney <samjbarney@gmail.com> | 2015-07-29 17:04:03 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2015-07-29 17:49:30 +0200 |
commit | 804805d35a87c2acc9425d1762ad26b1ba2ec9ac (patch) | |
tree | 13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Generating/CompoGen.cpp | |
parent | Merge pull request #2376 from mjhanninen/fix-freebsd-build (diff) | |
download | cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.gz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.bz2 cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.lz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.xz cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.zst cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/CompoGen.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Generating/CompoGen.cpp b/src/Generating/CompoGen.cpp index 7cadc881a..f55228b80 100644 --- a/src/Generating/CompoGen.cpp +++ b/src/Generating/CompoGen.cpp @@ -53,7 +53,7 @@ void cCompoGenSameBlock::ComposeTerrain(cChunkDesc & a_ChunkDesc, const cChunkDe void cCompoGenSameBlock::InitializeCompoGen(cIniFile & a_IniFile) { - m_BlockType = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "SameBlockType", "stone").m_ItemType); + m_BlockType = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "SameBlockType", "stone").m_ItemType); m_IsBedrocked = (a_IniFile.GetValueSetI("Generator", "SameBlockBedrocked", 1) != 0); } @@ -200,12 +200,12 @@ void cCompoGenClassic::InitializeCompoGen(cIniFile & a_IniFile) m_SeaLevel = a_IniFile.GetValueSetI("Generator", "SeaLevel", m_SeaLevel); m_BeachHeight = a_IniFile.GetValueSetI("Generator", "ClassicBeachHeight", m_BeachHeight); m_BeachDepth = a_IniFile.GetValueSetI("Generator", "ClassicBeachDepth", m_BeachDepth); - m_BlockTop = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockTop", "grass").m_ItemType); - m_BlockMiddle = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockMiddle", "dirt").m_ItemType); - m_BlockBottom = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockBottom", "stone").m_ItemType); - m_BlockBeach = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockBeach", "sand").m_ItemType); - m_BlockBeachBottom = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockBeachBottom", "sandstone").m_ItemType); - m_BlockSea = (BLOCKTYPE)(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockSea", "stationarywater").m_ItemType); + m_BlockTop = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockTop", "grass").m_ItemType); + m_BlockMiddle = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockMiddle", "dirt").m_ItemType); + m_BlockBottom = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockBottom", "stone").m_ItemType); + m_BlockBeach = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockBeach", "sand").m_ItemType); + m_BlockBeachBottom = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockBeachBottom", "sandstone").m_ItemType); + m_BlockSea = static_cast<BLOCKTYPE>(GetIniItemSet(a_IniFile, "Generator", "ClassicBlockSea", "stationarywater").m_ItemType); } @@ -307,7 +307,7 @@ void cCompoGenNether::ComposeTerrain(cChunkDesc & a_ChunkDesc, const cChunkDesc: int Height = a_ChunkDesc.GetHeight(x, z); a_ChunkDesc.SetBlockType(x, Height, z, E_BLOCK_BEDROCK); - NOISE_DATATYPE CeilingDisguise = (m_Noise1.CubicNoise2D((float)(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x) / 10, (float)(a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z) / 10)); + NOISE_DATATYPE CeilingDisguise = (m_Noise1.CubicNoise2D(static_cast<float>(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x) / 10, static_cast<float>(a_ChunkDesc.GetChunkZ() * cChunkDef::Width + z) / 10)); if (CeilingDisguise < 0) { CeilingDisguise = -CeilingDisguise; |