1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Mgv7: Add optional floatlands, disabled by default

This commit is contained in:
paramat 2016-09-16 04:59:25 +01:00
parent 5fd1ef9b58
commit bc3980e1d6
4 changed files with 218 additions and 65 deletions

View file

@ -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;
};