summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser/RegionLoader.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-27 23:58:09 +0100
committerMattes D <github@xoft.cz>2014-10-27 23:58:09 +0100
commitc53b7e5d38c24bce7ba55abf3060ffd012783086 (patch)
treee592eeadadbd41cede746f8729bd70c275552eb5 /Tools/QtBiomeVisualiser/RegionLoader.cpp
parentFixed typo. (diff)
downloadcuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar
cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.gz
cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.bz2
cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.lz
cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.xz
cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.tar.zst
cuberite-c53b7e5d38c24bce7ba55abf3060ffd012783086.zip
Diffstat (limited to 'Tools/QtBiomeVisualiser/RegionLoader.cpp')
-rw-r--r--Tools/QtBiomeVisualiser/RegionLoader.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/Tools/QtBiomeVisualiser/RegionLoader.cpp b/Tools/QtBiomeVisualiser/RegionLoader.cpp
new file mode 100644
index 000000000..8c298da1e
--- /dev/null
+++ b/Tools/QtBiomeVisualiser/RegionLoader.cpp
@@ -0,0 +1,37 @@
+#include "Globals.h"
+#include "RegionLoader.h"
+#include "ChunkSource.h"
+#include "Region.h"
+
+
+
+
+
+RegionLoader::RegionLoader(int a_RegionX, int a_RegionZ, RegionPtr a_Region, ChunkSourcePtr a_ChunkSource) :
+ m_RegionX(a_RegionX),
+ m_RegionZ(a_RegionZ),
+ m_Region(a_Region),
+ m_ChunkSource(a_ChunkSource)
+{
+}
+
+
+
+
+
+void RegionLoader::run()
+{
+ // Load all the chunks in this region:
+ for (int z = 0; z < 32; z++)
+ {
+ for (int x = 0; x < 32; x++)
+ {
+ m_ChunkSource->getChunkBiomes(m_RegionX * 32 + x, m_RegionZ * 32 + z, m_Region->getRelChunk(x, z));
+ }
+ }
+ emit loaded(m_RegionX, m_RegionZ);
+}
+
+
+
+