summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-15 21:45:35 +0200
committermadmaxoft <github@xoft.cz>2014-09-15 21:45:35 +0200
commit18743540bc5122a42d24148a273ce04717057ed3 (patch)
tree73f86633a4308fbfbe246e2d2abf69e1e3ae457d /Tools/QtBiomeVisualiser
parentQtBiomeVisualiser: Added reloading. (diff)
downloadcuberite-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.cpp11
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());
}