diff options
author | madmaxoft <github@xoft.cz> | 2014-09-22 18:33:18 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-22 21:52:37 +0200 |
commit | 583532e1b927e1b9af9782e35c7f2d089e997254 (patch) | |
tree | 89eee174088c08acca9e250507adf669274b1540 /Tools/QtBiomeVisualiser/ChunkSource.cpp | |
parent | QtBiomeVisualiser: Moved the generator setup into a side-pane. (diff) | |
download | cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.tar cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.tar.gz cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.tar.bz2 cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.tar.lz cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.tar.xz cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.tar.zst cuberite-583532e1b927e1b9af9782e35c7f2d089e997254.zip |
Diffstat (limited to 'Tools/QtBiomeVisualiser/ChunkSource.cpp')
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkSource.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Tools/QtBiomeVisualiser/ChunkSource.cpp b/Tools/QtBiomeVisualiser/ChunkSource.cpp index 54da2afe5..d8cecbaa4 100644 --- a/Tools/QtBiomeVisualiser/ChunkSource.cpp +++ b/Tools/QtBiomeVisualiser/ChunkSource.cpp @@ -142,8 +142,8 @@ static void biomesToImage(cChunkDef::BiomeMap & a_Biomes, Chunk::Image & a_Image //////////////////////////////////////////////////////////////////////////////// // BioGenSource: -BioGenSource::BioGenSource(QString a_WorldIniPath) : - m_WorldIniPath(a_WorldIniPath), +BioGenSource::BioGenSource(cIniFilePtr a_IniFile) : + m_IniFile(a_IniFile), m_Mtx(QMutex::Recursive) { reload(); @@ -171,14 +171,10 @@ void BioGenSource::getChunkBiomes(int a_ChunkX, int a_ChunkZ, ChunkPtr a_DestChu void BioGenSource::reload() { - cIniFile ini; - ini.ReadFile(m_WorldIniPath.toStdString()); - int seed = ini.GetValueSetI("Seed", "Seed", 0); + int seed = m_IniFile->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()); + m_BiomeGen.reset(cBiomeGen::CreateBiomeGen(*m_IniFile, seed, unused)); } |