summaryrefslogtreecommitdiffstats
path: root/BiomeVisualiser
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-20 11:58:34 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-20 11:58:34 +0100
commit9f9a79068e85ddc3cc0a085bb74a2c1abe507065 (patch)
tree63392f28c5e1a0ad278ff673f5db712ba9f36b5a /BiomeVisualiser
parentOptimized BioGen-MultiStepMap's performance by using linear interpolation, about 25 % increase in total chunk generation speed. (diff)
downloadcuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.tar
cuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.tar.gz
cuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.tar.bz2
cuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.tar.lz
cuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.tar.xz
cuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.tar.zst
cuberite-9f9a79068e85ddc3cc0a085bb74a2c1abe507065.zip
Diffstat (limited to 'BiomeVisualiser')
-rw-r--r--BiomeVisualiser/BiomeCache.cpp8
-rw-r--r--BiomeVisualiser/BiomeRenderer.cpp4
-rw-r--r--BiomeVisualiser/BiomeViewWnd.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/BiomeVisualiser/BiomeCache.cpp b/BiomeVisualiser/BiomeCache.cpp
index 962f4a3f0..12133b8b6 100644
--- a/BiomeVisualiser/BiomeCache.cpp
+++ b/BiomeVisualiser/BiomeCache.cpp
@@ -34,8 +34,8 @@ static int GetNumCores(void)
cBiomeCache::cBiomeCache(void) :
m_Source(NULL),
- m_BaseX(MAXINT),
- m_BaseZ(MAXINT),
+ m_BaseX(-100000),
+ m_BaseZ(-100000),
m_Available(NULL),
m_IsTerminatingThreads(false)
{
@@ -222,8 +222,8 @@ void cBiomeCache::SetSource(cBiomeSource * a_Source)
// Invalidate cache contents:
cCSLock Lock(m_CS);
- m_BaseX = MAXINT;
- m_BaseZ = MAXINT;
+ m_BaseX = -10000;
+ m_BaseZ = -10000;
m_Pool.splice(m_Pool.end(), m_Queue);
}
diff --git a/BiomeVisualiser/BiomeRenderer.cpp b/BiomeVisualiser/BiomeRenderer.cpp
index 00d6d684d..7c4302d70 100644
--- a/BiomeVisualiser/BiomeRenderer.cpp
+++ b/BiomeVisualiser/BiomeRenderer.cpp
@@ -46,8 +46,8 @@ bool cBiomeRenderer::Render(cPixmap & a_Pixmap)
m_Cache.HintViewArea(MinBlockX / 16 - 1, MaxBlockX / 16 + 1, MinBlockZ / 16 - 1, MaxBlockZ / 16 + 1);
// Hold one current chunk of biome data:
- int CurChunkX = MAXINT32;
- int CurChunkZ = MAXINT32;
+ int CurChunkX = -10000;
+ int CurChunkZ = -10000;
cChunkDef::BiomeMap CurBiomes;
bool res = false;
diff --git a/BiomeVisualiser/BiomeViewWnd.cpp b/BiomeVisualiser/BiomeViewWnd.cpp
index cb634034c..503b94f0c 100644
--- a/BiomeVisualiser/BiomeViewWnd.cpp
+++ b/BiomeVisualiser/BiomeViewWnd.cpp
@@ -44,7 +44,7 @@ bool cBiomeViewWnd::Create(HWND a_ParentWnd, LPCTSTR a_Title)
SetWindowLongPtr(m_Wnd, GWLP_WNDPROC, m_Thunk);
cIniFile IniFile;
- cBiomeGen * BioGen = new cBioGenMultiStepMap(0);
+ cBiomeGen * BioGen = new cBioGenMultiStepMap(2);
BioGen->Initialize(IniFile);
m_Renderer.SetSource(new cGeneratorBiomeSource(BioGen));