summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-07 21:57:12 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-07 21:59:32 -0500
commit2fd3d5202051e03303ac2b8e76976a7c4c8477f3 (patch)
treec461272b8eef33846cf5773e38c6a8b7716e1d0d /src/mapgen_v7.cpp
parent638f3a8454941d3f561b1834d47fa07a611454a3 (diff)
downloadminetest-2fd3d5202051e03303ac2b8e76976a7c4c8477f3.tar.gz
minetest-2fd3d5202051e03303ac2b8e76976a7c4c8477f3.tar.bz2
minetest-2fd3d5202051e03303ac2b8e76976a7c4c8477f3.zip
Add flags and lacunarity as new noise parameters
Add 'absolute value' option to noise map functions Extend persistence modulation to 3D noise Extend 'eased' option to noise2d_perlin* functions Some noise.cpp formatting fixups
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index 82bc4aae8..7b7377611 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -122,15 +122,15 @@ MapgenV7::~MapgenV7() {
MapgenV7Params::MapgenV7Params() {
spflags = MGV7_MOUNTAINS | MGV7_RIDGES;
- np_terrain_base = NoiseParams(4, 70, v3f(300, 300, 300), 82341, 6, 0.7);
- np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6);
- np_terrain_persist = NoiseParams(0.6, 0.1, v3f(500, 500, 500), 539, 3, 0.6);
- np_height_select = NoiseParams(-0.5, 1, v3f(250, 250, 250), 4213, 5, 0.69);
- np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 4, 0.7);
- np_mount_height = NoiseParams(100, 30, v3f(500, 500, 500), 72449, 4, 0.6);
- np_ridge_uwater = NoiseParams(0, 1, v3f(500, 500, 500), 85039, 4, 0.6);
- np_mountain = NoiseParams(0, 1, v3f(250, 350, 250), 5333, 5, 0.68);
- np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75);
+ np_terrain_base = NoiseParams(4, 70, v3f(300, 300, 300), 82341, 6, 0.7, 2.0);
+ np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0);
+ np_terrain_persist = NoiseParams(0.6, 0.1, v3f(500, 500, 500), 539, 3, 0.6, 2.0);
+ np_height_select = NoiseParams(-0.5, 1, v3f(250, 250, 250), 4213, 5, 0.69, 2.0);
+ np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 4, 0.7, 2.0);
+ np_mount_height = NoiseParams(100, 30, v3f(500, 500, 500), 72449, 4, 0.6, 2.0);
+ np_ridge_uwater = NoiseParams(0, 1, v3f(500, 500, 500), 85039, 4, 0.6, 2.0);
+ np_mountain = NoiseParams(0, 1, v3f(250, 350, 250), 5333, 5, 0.68, 2.0);
+ np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0);
}
@@ -278,10 +278,10 @@ void MapgenV7::calculateNoise() {
for (int i = 0; i != csize.X * csize.Z; i++)
persistmap[i] = rangelim(persistmap[i], 0.4, 0.9);
- noise_terrain_base->perlinMap2DModulated(x, z, persistmap);
+ noise_terrain_base->perlinMap2D(x, z, persistmap);
noise_terrain_base->transformNoiseMap();
- noise_terrain_alt->perlinMap2DModulated(x, z, persistmap);
+ noise_terrain_alt->perlinMap2D(x, z, persistmap);
noise_terrain_alt->transformNoiseMap();
noise_filler_depth->perlinMap2D(x, z);
@@ -728,7 +728,7 @@ void MapgenV7::addTopNodes() {
#endif
-NoiseParams nparams_v7_def_cave(6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50);
+NoiseParams nparams_v7_def_cave(6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0);
void MapgenV7::generateCaves(int max_stone_y) {
PseudoRandom ps(blockseed + 21343);