aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_valleys.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen_valleys.h')
-rw-r--r--src/mapgen_valleys.h59
1 files changed, 28 insertions, 31 deletions
diff --git a/src/mapgen_valleys.h b/src/mapgen_valleys.h
index 5fd549096..ee4052d71 100644
--- a/src/mapgen_valleys.h
+++ b/src/mapgen_valleys.h
@@ -31,11 +31,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h"
/////////////////// Mapgen Valleys flags
-#define MG_VALLEYS_ALT_CHILL 0x01
-#define MG_VALLEYS_CLIFFS 0x02
-#define MG_VALLEYS_FAST 0x04
-#define MG_VALLEYS_HUMID_RIVERS 0x08
-#define MG_VALLEYS_RUGGED 0x10
+#define MG_VALLEYS_ALT_CHILL 0x01
+#define MG_VALLEYS_HUMID_RIVERS 0x02
+
+// Feed only one variable into these.
+#define MYSQUARE(x) (x) * (x)
+#define MYCUBE(x) (x) * (x) * (x)
class BiomeManager;
@@ -47,28 +48,25 @@ class BiomeManager;
struct MapgenValleysParams : public MapgenSpecificParams {
u32 spflags;
+ s16 large_cave_depth;
+ s16 massive_cave_depth;
u16 altitude_chill;
- s16 cave_water_max_height;
- s16 humidity;
- s16 humidity_break_point;
- s16 lava_max_height;
+ u16 lava_features;
u16 river_depth;
u16 river_size;
- s16 temperature;
u16 water_features;
NoiseParams np_biome_heat;
NoiseParams np_biome_heat_blend;
NoiseParams np_biome_humidity;
NoiseParams np_biome_humidity_blend;
- NoiseParams np_cliffs;
- NoiseParams np_corr;
+ NoiseParams np_cave1;
+ NoiseParams np_cave2;
NoiseParams np_filler_depth;
NoiseParams np_inter_valley_fill;
NoiseParams np_inter_valley_slope;
NoiseParams np_rivers;
- NoiseParams np_simple_caves_1;
- NoiseParams np_simple_caves_2;
+ NoiseParams np_massive_caves;
NoiseParams np_terrain_height;
NoiseParams np_valley_depth;
NoiseParams np_valley_profile;
@@ -89,8 +87,6 @@ struct TerrainNoise {
float valley_profile;
float *slope;
float inter_valley_fill;
- float cliffs;
- float corr;
};
class MapgenValleys : public Mapgen {
@@ -102,6 +98,8 @@ public:
virtual void makeChunk(BlockMakeData *data);
int getGroundLevelAtPoint(v2s16 p);
+ s16 large_cave_depth;
+
private:
EmergeManager *m_emerge;
BiomeManager *bmgr;
@@ -109,10 +107,9 @@ private:
int ystride;
int zstride;
+ float map_gen_limit;
+
u32 spflags;
- bool cliff_terrain;
- bool fast_terrain;
- bool rugged_terrain;
bool humid_rivers;
bool use_altitude_chill;
@@ -123,8 +120,8 @@ private:
Noise *noise_filler_depth;
- Noise *noise_cliffs;
- Noise *noise_corr;
+ Noise *noise_cave1;
+ Noise *noise_cave2;
Noise *noise_heat;
Noise *noise_heat_blend;
Noise *noise_humidity;
@@ -132,21 +129,21 @@ private:
Noise *noise_inter_valley_fill;
Noise *noise_inter_valley_slope;
Noise *noise_rivers;
- Noise *noise_simple_caves_1;
- Noise *noise_simple_caves_2;
+ Noise *noise_massive_caves;
Noise *noise_terrain_height;
Noise *noise_valley_depth;
Noise *noise_valley_profile;
float altitude_chill;
- float cave_water_max_height;
+ s16 cave_water_max_height;
float humidity_adjust;
- float humidity_break_point;
- float lava_max_height;
- float river_depth;
- float river_size;
- float temperature_adjust;
- s16 water_features;
+ s16 lava_features_lim;
+ s16 lava_max_height;
+ s16 massive_cave_depth;
+ float river_depth_bed;
+ float river_size_factor;
+ float *tcave_cache;
+ s16 water_features_lim;
content_t c_cobble;
content_t c_desert_stone;
@@ -176,7 +173,7 @@ private:
MgStoneType generateBiomes(float *heat_map, float *humidity_map);
void dustTopNodes();
- void generateSimpleCaves(s16 max_stone_y);
+ void generateCaves(s16 max_stone_y);
};
struct MapgenFactoryValleys : public MapgenFactory {