diff options
author | madmaxoft <github@xoft.cz> | 2014-09-15 21:45:35 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-15 21:45:35 +0200 |
commit | 18743540bc5122a42d24148a273ce04717057ed3 (patch) | |
tree | 73f86633a4308fbfbe246e2d2abf69e1e3ae457d /Tools/QtBiomeVisualiser | |
parent | QtBiomeVisualiser: Added reloading. (diff) | |
download | cuberite-18743540bc5122a42d24148a273ce04717057ed3.tar cuberite-18743540bc5122a42d24148a273ce04717057ed3.tar.gz cuberite-18743540bc5122a42d24148a273ce04717057ed3.tar.bz2 cuberite-18743540bc5122a42d24148a273ce04717057ed3.tar.lz cuberite-18743540bc5122a42d24148a273ce04717057ed3.tar.xz cuberite-18743540bc5122a42d24148a273ce04717057ed3.tar.zst cuberite-18743540bc5122a42d24148a273ce04717057ed3.zip |
Diffstat (limited to 'Tools/QtBiomeVisualiser')
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkSource.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Tools/QtBiomeVisualiser/ChunkSource.cpp b/Tools/QtBiomeVisualiser/ChunkSource.cpp index 7da36c39b..9e0ea5751 100644 --- a/Tools/QtBiomeVisualiser/ChunkSource.cpp +++ b/Tools/QtBiomeVisualiser/ChunkSource.cpp @@ -103,9 +103,9 @@ public: for (size_t i = 0; i < ARRAYCOUNT(biomeColors); i++) { uchar * color = &biomeToColor[4 * biomeColors[i].m_Biome]; - color[0] = biomeColors[i].m_Color[0]; + color[0] = biomeColors[i].m_Color[2]; color[1] = biomeColors[i].m_Color[1]; - color[2] = biomeColors[i].m_Color[2]; + color[2] = biomeColors[i].m_Color[0]; color[3] = 0xff; } } @@ -170,14 +170,13 @@ void BioGenSource::getChunkBiomes(int a_ChunkX, int a_ChunkZ, ChunkPtr a_DestChu void BioGenSource::reload() { cIniFile ini; - if (!ini.ReadFile(m_WorldIniPath.toStdString())) - { - return; - } + ini.ReadFile(m_WorldIniPath.toStdString()); int seed = ini.GetValueSetI("Seed", "Seed", 0); bool unused = false; QMutexLocker lock(&m_Mtx); m_BiomeGen.reset(cBiomeGen::CreateBiomeGen(ini, seed, unused)); + lock.unlock(); + ini.WriteFile(m_WorldIniPath.toStdString()); } |