summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Generating/BioGen.cpp6
-rw-r--r--src/Generating/IntGen.h23
2 files changed, 13 insertions, 16 deletions
diff --git a/src/Generating/BioGen.cpp b/src/Generating/BioGen.cpp
index c9405040f..fcb4d74ed 100644
--- a/src/Generating/BioGen.cpp
+++ b/src/Generating/BioGen.cpp
@@ -969,10 +969,8 @@ public:
std::make_shared<cIntGenAddIslands <6>> (a_Seed + 2000, 70,
std::make_shared<cIntGenSmooth <6>> (a_Seed + 1004,
std::make_shared<cIntGenZoom <8>> (a_Seed + 10,
- std::make_shared<cIntGenAddIslands <6>> (a_Seed + 2003, 50,
- std::make_shared<cIntGenZoom <6>> (a_Seed + 11,
- std::make_shared<cIntLandOcean <5>> (a_Seed + 100, 65
- ))))))))))))))))))))))))))))));
+ std::make_shared<cIntGenLandOcean <6>> (a_Seed + 100, 65
+ ))))))))))))))))))))))))))));
m_Gen =
std::make_shared<cIntGenSmooth <16>>(a_Seed,
diff --git a/src/Generating/IntGen.h b/src/Generating/IntGen.h
index a0064715f..1eb20711d 100644
--- a/src/Generating/IntGen.h
+++ b/src/Generating/IntGen.h
@@ -124,7 +124,7 @@ public:
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
{
for (int z = 0; z < SizeZ; z++)
{
@@ -146,13 +146,13 @@ public:
Has a threshold (in percent) of how much land, the larger the threshold, the more land.
Generates 0 for ocean, biome group ID for landmass. */
template <int SizeX, int SizeZ = SizeX>
-class cIntLandOcean :
+class cIntGenLandOcean :
public cIntGenWithNoise<SizeX, SizeZ>
{
typedef cIntGenWithNoise<SizeX, SizeZ> super;
public:
- cIntLandOcean(int a_Seed, int a_Threshold) :
+ cIntGenLandOcean(int a_Seed, int a_Threshold) :
super(a_Seed),
m_Threshold(a_Threshold)
{
@@ -170,6 +170,12 @@ public:
a_Values[x + SizeX * z] = ((rnd % 100) < m_Threshold) ? ((rnd / 128) % bgMax + 1) : 0;
}
}
+
+ // If the centerpoint of the world is within the area, set it to bgTemperate, always:
+ if ((a_MinX <= 0) && (a_MinZ <= 0) && (a_MinX + SizeX > 0) && (a_MinZ + SizeZ > 0))
+ {
+ a_Values[-a_MinX - a_MinZ * SizeX] = bgTemperate;
+ }
}
protected:
@@ -451,12 +457,12 @@ public:
{
for (int x = 0; x < SizeX; x++)
{
- if (a_Values[x + z * SizeX] == 0)
+ if (a_Values[x + z * SizeX] == bgOcean)
{
int rnd = m_Noise.IntNoise2DInt(a_MinX + x, a_MinZ + z) / 7;
if (rnd % 100 < m_Threshold)
{
- a_Values[x + z * SizeX] = (rnd / 100) % 4;
+ a_Values[x + z * SizeX] = (rnd / 100) % bgMax;
}
}
}
@@ -511,13 +517,6 @@ public:
int Right = Cache[x + 2 + (z + 1) * m_UnderlyingSizeX];
switch (v)
{
- // Oceans don't need any edges:
- case bgOcean:
- {
- v = bgOcean;
- break;
- }
-
// Desert should neighbor only oceans, desert and temperates; change to temperate when another:
case bgDesert:
{