diff options
-rw-r--r-- | minetest.conf.example | 6 | ||||
-rw-r--r-- | src/mapgen_v5.cpp | 39 | ||||
-rw-r--r-- | src/mapgen_v5.h | 2 |
3 files changed, 26 insertions, 21 deletions
diff --git a/minetest.conf.example b/minetest.conf.example index 992b7ded9..345a52bcd 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -425,15 +425,17 @@ # Perlin noise attributes for different map generation parameters # Offset, scale, spread factor, seed offset, number of octaves, persistence +#mgv5_spflags = blobs #mgv5_np_filler_depth = 0, 1, (150, 150, 150), 261, 4, 0.7 #mgv5_np_factor = 0, 1, (250, 250, 250), 920381, 3, 0.45 #mgv5_np_height = 0, 10, (250, 250, 250), 84174, 4, 0.5 -#mgv5_np_cave1 = 0, 7.5, (50, 50, 50), 52534, 4, 0.5 -#mgv5_np_cave2 = 0, 7.5, (50, 50, 50), 10325, 4, 0.5 +#mgv5_np_cave1 = 0, 6, (50, 50, 50), 52534, 4, 0.5 +#mgv5_np_cave2 = 0, 6, (50, 50, 50), 10325, 4, 0.5 #mgv5_np_ground = 0, 40, (80, 80, 80), 983240, 4, 0.55 #mgv5_np_crumble = 0, 1, (20, 20, 20), 34413, 3, 1.3 #mgv5_np_wetness = 0, 1, (40, 40, 40), 32474, 4, 1.1 +#mgv6_spflags = biomeblend, jungles, mudflow #mgv6_np_terrain_base = -4, 20, (250, 250, 250), 82341, 5, 0.6 #mgv6_np_terrain_higher = 20, 16, (500, 500, 500), 85039, 5, 0.6 #mgv6_np_steepness = 0.85, 0.5, (125, 125, 125), -932, 5, 0.7 diff --git a/src/mapgen_v5.cpp b/src/mapgen_v5.cpp index 152537eed..4cc382807 100644 --- a/src/mapgen_v5.cpp +++ b/src/mapgen_v5.cpp @@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc., FlagDesc flagdesc_mapgen_v5[] = { - //{"blobs", MGV5_BLOBS}, + {"blobs", MGV5_BLOBS}, {NULL, 0} }; @@ -70,6 +70,8 @@ MapgenV5::MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge_) { MapgenV5Params *sp = (MapgenV5Params *)params->sparams; + this->spflags = sp->spflags; + // Terrain noise noise_filler_depth = new Noise(&sp->np_filler_depth, seed, csize.X, csize.Z); noise_factor = new Noise(&sp->np_factor, seed, csize.X, csize.Z); @@ -134,31 +136,32 @@ MapgenV5::~MapgenV5() { MapgenV5Params::MapgenV5Params() { - //spflags = MGV5_BLOBS; - spflags = 0; - - np_filler_depth = NoiseParams(0, 1, v3f(150, 150, 150), 261, 4, 0.7); - np_factor = NoiseParams(0, 1, v3f(250, 250, 250), 920381, 3, 0.45); - np_height = NoiseParams(0, 10, v3f(250, 250, 250), 84174, 4, 0.5); - np_cave1 = NoiseParams(0, 7.5, v3f(50, 50, 50), 52534, 4, 0.5); - np_cave2 = NoiseParams(0, 7.5, v3f(50, 50, 50), 10325, 4, 0.5); - np_ground = NoiseParams(0, 40, v3f(80, 80, 80), 983240, 4, 0.55); - np_crumble = NoiseParams(0, 1, v3f(20, 20, 20), 34413, 3, 1.3); - np_wetness = NoiseParams(0, 1, v3f(40, 40, 40), 32474, 4, 1.1); + spflags = MGV5_BLOBS; + + np_filler_depth = NoiseParams(0, 1, v3f(150, 150, 150), 261, 4, 0.7); + np_factor = NoiseParams(0, 1, v3f(250, 250, 250), 920381, 3, 0.45); + np_height = NoiseParams(0, 10, v3f(250, 250, 250), 84174, 4, 0.5); + np_cave1 = NoiseParams(0, 6, v3f(50, 50, 50), 52534, 4, 0.5); + np_cave2 = NoiseParams(0, 6, v3f(50, 50, 50), 10325, 4, 0.5); + np_ground = NoiseParams(0, 40, v3f(80, 80, 80), 983240, 4, 0.55); + np_crumble = NoiseParams(0, 1, v3f(20, 20, 20), 34413, 3, 1.3); + np_wetness = NoiseParams(0, 1, v3f(40, 40, 40), 32474, 4, 1.1); } +// Current caves noise scale default is 6 to compensate for new eased 3d noise amplitude + // Scaling the output of the noise function affects the overdrive of the // contour function, which affects the shape of the output considerably. //#define CAVE_NOISE_SCALE 12.0 < original default //#define CAVE_NOISE_SCALE 10.0 -//#define CAVE_NOISE_SCALE 7.5 < current default to compensate for new eased 3d noise +//#define CAVE_NOISE_SCALE 7.5 //#define CAVE_NOISE_SCALE 5.0 //#define CAVE_NOISE_SCALE 1.0 //#define CAVE_NOISE_THRESHOLD (2.5/CAVE_NOISE_SCALE) -//#define CAVE_NOISE_THRESHOLD (1.5/CAVE_NOISE_SCALE) < original and current default +//#define CAVE_NOISE_THRESHOLD (1.5/CAVE_NOISE_SCALE) < original and current code void MapgenV5Params::readParams(Settings *settings) { @@ -222,9 +225,9 @@ void MapgenV5::makeChunk(BlockMakeData *data) { updateHeightmap(node_min, node_max); // Generate underground dirt, sand, gravel and lava blobs - //if (spflags & MGV5_BLOBS) { + if (spflags & MGV5_BLOBS) { generateBlobs(); - //} + } // Calculate biomes BiomeNoiseInput binput; @@ -290,10 +293,10 @@ void MapgenV5::calculateNoise() { noise_ground->perlinMap3D(x, y, z, true); noise_ground->transformNoiseMap(); - //if (spflags & MGV5_BLOBS) { + if (spflags & MGV5_BLOBS) { noise_crumble->perlinMap3D(x, y, z, true); noise_wetness->perlinMap3D(x, y, z, false); - //} + } noise_heat->perlinMap2D(x, z); noise_humidity->perlinMap2D(x, z); diff --git a/src/mapgen_v5.h b/src/mapgen_v5.h index c38113fec..6f98ad2e4 100644 --- a/src/mapgen_v5.h +++ b/src/mapgen_v5.h @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapgen.h" /////////////////// Mapgen V5 flags -//#define MGV5_BLOBS 0x01 +#define MGV5_BLOBS 0x01 extern FlagDesc flagdesc_mapgen_v5[]; |