summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.h
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-09-16 04:59:25 +0100
committerparamat <mat.gregory@virginmedia.com>2016-11-15 23:07:06 +0000
commitbc3980e1d69ca9f848f80eb7386525fa4fb326cd (patch)
tree77064112a86b42a28c64cd8feacf979c484e918f /src/mapgen_v7.h
parent5fd1ef9b589419e2464f5599ea47a2f28f4d7b7b (diff)
downloadminetest-bc3980e1d69ca9f848f80eb7386525fa4fb326cd.tar.gz
minetest-bc3980e1d69ca9f848f80eb7386525fa4fb326cd.tar.bz2
minetest-bc3980e1d69ca9f848f80eb7386525fa4fb326cd.zip
Mgv7: Add optional floatlands, disabled by default
Diffstat (limited to 'src/mapgen_v7.h')
-rw-r--r--src/mapgen_v7.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/mapgen_v7.h b/src/mapgen_v7.h
index 3a6bc0801..3972387a7 100644
--- a/src/mapgen_v7.h
+++ b/src/mapgen_v7.h
@@ -23,9 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h"
-/////////////////// Mapgen V7 flags
-#define MGV7_MOUNTAINS 0x01
-#define MGV7_RIDGES 0x02
+////////////// Mapgen V7 flags
+#define MGV7_MOUNTAINS 0x01
+#define MGV7_RIDGES 0x02
+#define MGV7_FLOATLANDS 0x04
class BiomeManager;
@@ -35,6 +36,11 @@ extern FlagDesc flagdesc_mapgen_v7[];
struct MapgenV7Params : public MapgenParams {
u32 spflags;
float cave_width;
+ float float_mount_density;
+ float float_mount_height;
+ s16 floatland_level;
+ s16 shadow_limit;
+
NoiseParams np_terrain_base;
NoiseParams np_terrain_alt;
NoiseParams np_terrain_persist;
@@ -42,6 +48,8 @@ struct MapgenV7Params : public MapgenParams {
NoiseParams np_filler_depth;
NoiseParams np_mount_height;
NoiseParams np_ridge_uwater;
+ NoiseParams np_floatland_base;
+ NoiseParams np_float_base_height;
NoiseParams np_mountain;
NoiseParams np_ridge;
NoiseParams np_cave1;
@@ -68,16 +76,26 @@ public:
float baseTerrainLevelFromMap(int index);
bool getMountainTerrainAtPoint(s16 x, s16 y, s16 z);
bool getMountainTerrainFromMap(int idx_xyz, int idx_xz, s16 y);
+ bool getFloatlandMountainFromMap(int idx_xyz, int idx_xz, s16 y);
+ void floatBaseExtentFromMap(s16 *float_base_min, s16 *float_base_max, int idx_xz);
+
int generateTerrain();
void generateRidgeTerrain();
private:
+ float float_mount_density;
+ float float_mount_height;
+ s16 floatland_level;
+ s16 shadow_limit;
+
Noise *noise_terrain_base;
Noise *noise_terrain_alt;
Noise *noise_terrain_persist;
Noise *noise_height_select;
Noise *noise_mount_height;
Noise *noise_ridge_uwater;
+ Noise *noise_floatland_base;
+ Noise *noise_float_base_height;
Noise *noise_mountain;
Noise *noise_ridge;
};