aboutsummaryrefslogtreecommitdiff
path: root/util/updatepo.sh
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-07-24 22:50:42 +0100
committerparamat <mat.gregory@virginmedia.com>2017-07-26 02:41:30 +0100
commitf61928d3fc5ef90bd913af2e633275d65adce057 (patch)
tree504566887ee98d60f9ae6e8612e899f2cb86568b /util/updatepo.sh
parent31b84ce1f2c4f9c6264f32427c3e7be1215360f1 (diff)
downloadminetest-f61928d3fc5ef90bd913af2e633275d65adce057.tar.gz
minetest-f61928d3fc5ef90bd913af2e633275d65adce057.tar.bz2
minetest-f61928d3fc5ef90bd913af2e633275d65adce057.zip
Mgv7: Add 'mount_zero_level' parameter
Allows setting of the mountain 'zero level' (y where density gradient is zero). It is easy to vertically shift smooth terrain by editing noise parameter 'offset', but vertically shifting mountain terrain was complex and imprecise, involving making a calculation based on an average of the mountain height parameter.
Diffstat (limited to 'util/updatepo.sh')
0 files changed, 0 insertions, 0 deletions
an> */ #ifndef MAPGEN_V7_HEADER #define MAPGEN_V7_HEADER #include "mapgen.h" /////////////////// Mapgen V7 flags #define MGV7_MOUNTAINS 0x01 #define MGV7_RIDGES 0x02 class BiomeManager; extern FlagDesc flagdesc_mapgen_v7[]; struct MapgenV7Params : public MapgenParams { u32 spflags; float cave_width; NoiseParams np_terrain_base; NoiseParams np_terrain_alt; NoiseParams np_terrain_persist; NoiseParams np_height_select; NoiseParams np_filler_depth; NoiseParams np_mount_height; NoiseParams np_ridge_uwater; NoiseParams np_mountain; NoiseParams np_ridge; NoiseParams np_cave1; NoiseParams np_cave2; MapgenV7Params(); ~MapgenV7Params() {} void readParams(const Settings *settings); void writeParams(Settings *settings) const; }; class MapgenV7 : public MapgenBasic { public: MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge); ~MapgenV7(); virtual MapgenType getType() const { return MAPGEN_V7; } virtual void makeChunk(BlockMakeData *data); int getSpawnLevelAtPoint(v2s16 p); float baseTerrainLevelAtPoint(s16 x, s16 z); float baseTerrainLevelFromMap(int index); bool getMountainTerrainAtPoint(s16 x, s16 y, s16 z); bool getMountainTerrainFromMap(int idx_xyz, int idx_xz, s16 y); int generateTerrain(); void generateRidgeTerrain(); private: 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_mountain; Noise *noise_ridge; }; #endif