From 7e1d603080146047bade80ee70982dbe569cdf30 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 26 Oct 2014 19:58:16 +0100 Subject: Added new biomegen: Grown --- Tools/QtBiomeVisualiser/GeneratorSetup.cpp | 1 + Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro | 135 +++++++++++++------------- 2 files changed, 69 insertions(+), 67 deletions(-) (limited to 'Tools') diff --git a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp index a6490d9fe..753f61141 100644 --- a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp +++ b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp @@ -14,6 +14,7 @@ static const QString s_GeneratorNames[] = QString("Checkerboard"), QString("Constant"), QString("DistortedVoronoi"), + QString("Grown"), QString("MultiStepMap"), QString("TwoLevel"), QString("Voronoi"), diff --git a/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro b/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro index f3a5255fb..569fca5f0 100644 --- a/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro +++ b/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro @@ -13,75 +13,76 @@ TEMPLATE = app SOURCES +=\ - MainWindow.cpp \ - BiomeView.cpp \ - ../../src/Generating/BioGen.cpp \ - ../../src/VoronoiMap.cpp \ - ../../src/Noise.cpp \ - ../../src/StringUtils.cpp \ - ../../src/LoggerListeners.cpp \ - ../../src/Logger.cpp \ - ../../src/IniFile.cpp \ - ../../src/OSSupport/File.cpp \ - ../../src/OSSupport/CriticalSection.cpp \ - ../../src/OSSupport/IsThread.cpp \ - ../../src/BiomeDef.cpp \ - ChunkCache.cpp \ - ChunkSource.cpp \ - ChunkLoader.cpp \ - ../../src/StringCompression.cpp \ - ../../src/WorldStorage/FastNBT.cpp \ - ../../lib/zlib/adler32.c \ - ../../lib/zlib/compress.c \ - ../../lib/zlib/crc32.c \ - ../../lib/zlib/deflate.c \ - ../../lib/zlib/gzclose.c \ - ../../lib/zlib/gzlib.c \ - ../../lib/zlib/gzread.c \ - ../../lib/zlib/gzwrite.c \ - ../../lib/zlib/infback.c \ - ../../lib/zlib/inffast.c \ - ../../lib/zlib/inflate.c \ - ../../lib/zlib/inftrees.c \ - ../../lib/zlib/trees.c \ - ../../lib/zlib/uncompr.c \ - ../../lib/zlib/zutil.c \ - GeneratorSetup.cpp \ - QtBiomeVisualiser.cpp \ - QtChunk.cpp + MainWindow.cpp \ + BiomeView.cpp \ + ../../src/Generating/BioGen.cpp \ + ../../src/VoronoiMap.cpp \ + ../../src/Noise.cpp \ + ../../src/StringUtils.cpp \ + ../../src/LoggerListeners.cpp \ + ../../src/Logger.cpp \ + ../../src/IniFile.cpp \ + ../../src/OSSupport/File.cpp \ + ../../src/OSSupport/CriticalSection.cpp \ + ../../src/OSSupport/IsThread.cpp \ + ../../src/BiomeDef.cpp \ + ChunkCache.cpp \ + ChunkSource.cpp \ + ChunkLoader.cpp \ + ../../src/StringCompression.cpp \ + ../../src/WorldStorage/FastNBT.cpp \ + ../../lib/zlib/adler32.c \ + ../../lib/zlib/compress.c \ + ../../lib/zlib/crc32.c \ + ../../lib/zlib/deflate.c \ + ../../lib/zlib/gzclose.c \ + ../../lib/zlib/gzlib.c \ + ../../lib/zlib/gzread.c \ + ../../lib/zlib/gzwrite.c \ + ../../lib/zlib/infback.c \ + ../../lib/zlib/inffast.c \ + ../../lib/zlib/inflate.c \ + ../../lib/zlib/inftrees.c \ + ../../lib/zlib/trees.c \ + ../../lib/zlib/uncompr.c \ + ../../lib/zlib/zutil.c \ + GeneratorSetup.cpp \ + QtBiomeVisualiser.cpp \ + QtChunk.cpp HEADERS += MainWindow.h \ - Globals.h \ - BiomeView.h \ - ../../src/Generating/BioGen.h \ - ../../src/VoronoiMap.h \ - ../../src/Noise.h \ - ../../src/StringUtils.h \ - ../../src/LoggerListeners.h \ - ../../src/Logger.h \ - ../../src/IniFile.h \ - ../../src/OSSupport/File.h \ - ../../src/OSSupport/CriticalSection.h \ - ../../src/OSSupport/IsThread.h \ - ../../src/BiomeDef.h \ - ChunkCache.h \ - ChunkSource.h \ - ChunkLoader.h \ - ../../src/StringCompression.h \ - ../../src/WorldStorage/FastNBT.h \ - ../../lib/zlib/crc32.h \ - ../../lib/zlib/deflate.h \ - ../../lib/zlib/gzguts.h \ - ../../lib/zlib/inffast.h \ - ../../lib/zlib/inffixed.h \ - ../../lib/zlib/inflate.h \ - ../../lib/zlib/inftrees.h \ - ../../lib/zlib/trees.h \ - ../../lib/zlib/zconf.h \ - ../../lib/zlib/zlib.h \ - ../../lib/zlib/zutil.h \ - GeneratorSetup.h \ - QtChunk.h + Globals.h \ + BiomeView.h \ + ../../src/Generating/BioGen.h \ + ../../src/Generating/IntGen.h \ + ../../src/VoronoiMap.h \ + ../../src/Noise.h \ + ../../src/StringUtils.h \ + ../../src/LoggerListeners.h \ + ../../src/Logger.h \ + ../../src/IniFile.h \ + ../../src/OSSupport/File.h \ + ../../src/OSSupport/CriticalSection.h \ + ../../src/OSSupport/IsThread.h \ + ../../src/BiomeDef.h \ + ChunkCache.h \ + ChunkSource.h \ + ChunkLoader.h \ + ../../src/StringCompression.h \ + ../../src/WorldStorage/FastNBT.h \ + ../../lib/zlib/crc32.h \ + ../../lib/zlib/deflate.h \ + ../../lib/zlib/gzguts.h \ + ../../lib/zlib/inffast.h \ + ../../lib/zlib/inffixed.h \ + ../../lib/zlib/inflate.h \ + ../../lib/zlib/inftrees.h \ + ../../lib/zlib/trees.h \ + ../../lib/zlib/zconf.h \ + ../../lib/zlib/zlib.h \ + ../../lib/zlib/zutil.h \ + GeneratorSetup.h \ + QtChunk.h INCLUDEPATH += $$_PRO_FILE_PWD_ \ $$_PRO_FILE_PWD_/../../lib \ -- cgit v1.2.3 From 8c04abf9aa749af3b15bc92f517b636c9593109e Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 30 Oct 2014 16:24:35 +0100 Subject: QtBiomeVisualiser: Added a prototyping int generator flavor. This generator is easier to manipulate, since it doesn't require rewriting the sizes in the template parameters. On the other hand, it doesn't optimize so well, so it's a bit slower. --- Tools/QtBiomeVisualiser/GeneratorSetup.cpp | 1 + Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro | 2 ++ 2 files changed, 3 insertions(+) (limited to 'Tools') diff --git a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp index 753f61141..8f97e1f37 100644 --- a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp +++ b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp @@ -15,6 +15,7 @@ static const QString s_GeneratorNames[] = QString("Constant"), QString("DistortedVoronoi"), QString("Grown"), + QString("GrownProt"), QString("MultiStepMap"), QString("TwoLevel"), QString("Voronoi"), diff --git a/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro b/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro index ae3131064..9522491a8 100644 --- a/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro +++ b/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro @@ -59,6 +59,8 @@ HEADERS += \ Globals.h \ BiomeView.h \ ../../src/Generating/BioGen.h \ + ../../src/Generating/IntGen.h \ + ../../src/Generating/ProtIntGen.h \ ../../src/VoronoiMap.h \ ../../src/Noise.h \ ../../src/StringUtils.h \ -- cgit v1.2.3 From f25e268ca0641362dac80c0095730b2f17839607 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 30 Oct 2014 16:54:23 +0100 Subject: QtBiomeVisualiser: Set start zoom to 25%, just like AMIDST. --- Tools/QtBiomeVisualiser/MainWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Tools') diff --git a/Tools/QtBiomeVisualiser/MainWindow.cpp b/Tools/QtBiomeVisualiser/MainWindow.cpp index e6e951b60..481e49cea 100644 --- a/Tools/QtBiomeVisualiser/MainWindow.cpp +++ b/Tools/QtBiomeVisualiser/MainWindow.cpp @@ -32,7 +32,8 @@ const double MainWindow::m_ViewZooms[] = MainWindow::MainWindow(QWidget * parent) : QMainWindow(parent), m_GeneratorSetup(nullptr), - m_LineSeparator(nullptr) + m_LineSeparator(nullptr), + m_CurrentZoomLevel(2) { initMinecraftPath(); @@ -41,6 +42,7 @@ MainWindow::MainWindow(QWidget * parent) : connect(m_BiomeView, SIGNAL(decreaseZoom()), this, SLOT(decreaseZoom())); connect(m_BiomeView, SIGNAL(wheelUp()), this, SLOT(increaseZoom())); connect(m_BiomeView, SIGNAL(wheelDown()), this, SLOT(decreaseZoom())); + m_BiomeView->setZoomLevel(m_ViewZooms[m_CurrentZoomLevel]); m_StatusBar = new QStatusBar(); this->setStatusBar(m_StatusBar); -- cgit v1.2.3 From c6e8da893e5ccb87555563941d5b4100e370e385 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 31 Oct 2014 12:26:12 +0100 Subject: QtBiomeVisualiser: Fixed default zoom selection. --- Tools/QtBiomeVisualiser/MainWindow.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Tools') diff --git a/Tools/QtBiomeVisualiser/MainWindow.cpp b/Tools/QtBiomeVisualiser/MainWindow.cpp index 481e49cea..c6ea8656e 100644 --- a/Tools/QtBiomeVisualiser/MainWindow.cpp +++ b/Tools/QtBiomeVisualiser/MainWindow.cpp @@ -288,15 +288,11 @@ void MainWindow::createActions() { m_actViewZoom[i] = new QAction(tr("&Zoom %1%").arg(std::floor(m_ViewZooms[i] * 100)), this); m_actViewZoom[i]->setCheckable(true); - if ((int)(m_ViewZooms[i] * 16) == 16) - { - m_actViewZoom[i]->setChecked(true); - m_CurrentZoomLevel = i; - } m_actViewZoom[i]->setData(QVariant(i)); zoomGroup->addAction(m_actViewZoom[i]); connect(m_actViewZoom[i], SIGNAL(triggered()), this, SLOT(setViewZoom())); } + m_actViewZoom[m_CurrentZoomLevel]->setChecked(true); } -- cgit v1.2.3