aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_v6.h
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-04-03 00:56:29 +0100
committerparamat <mat.gregory@virginmedia.com>2015-04-12 04:27:26 +0100
commit75cbd80e5b78af52eae2ec9960d408e64d33adca (patch)
treeacd5a1b4476f0b65b7e2e9d17b44db9dc649ecb3 /src/mapgen_v6.h
parentce8a9ed94b7a3a4cbce04bee27bf8d4167ac6161 (diff)
downloadminetest-75cbd80e5b78af52eae2ec9960d408e64d33adca.tar.gz
minetest-75cbd80e5b78af52eae2ec9960d408e64d33adca.tar.bz2
minetest-75cbd80e5b78af52eae2ec9960d408e64d33adca.zip
Mgv6: Add optional snow biomes
Diffstat (limited to 'src/mapgen_v6.h')
-rw-r--r--src/mapgen_v6.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/mapgen_v6.h b/src/mapgen_v6.h
index 6fd9d5e70..c729c04e7 100644
--- a/src/mapgen_v6.h
+++ b/src/mapgen_v6.h
@@ -25,11 +25,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define AVERAGE_MUD_AMOUNT 4
#define DESERT_STONE_BASE -32
+#define ICE_BASE 0
+#define FREQ_HOT 0.4
+#define FREQ_SNOW -0.4
+#define FREQ_TAIGA 0.5
+#define FREQ_JUNGLE 0.7
-/////////////////// Mapgen V6 flags
+//////////// Mapgen V6 flags
#define MGV6_JUNGLES 0x01
#define MGV6_BIOMEBLEND 0x02
#define MGV6_MUDFLOW 0x04
+#define MGV6_SNOWBIOMES 0x08
extern FlagDesc flagdesc_mapgen_v6[];
@@ -38,9 +44,13 @@ extern FlagDesc flagdesc_mapgen_v6[];
enum BiomeV6Type
{
BT_NORMAL,
- BT_DESERT
+ BT_DESERT,
+ BT_JUNGLE,
+ BT_TUNDRA,
+ BT_TAIGA,
};
+
struct MapgenV6Params : public MapgenSpecificParams {
u32 spflags;
float freq_desert;
@@ -64,6 +74,7 @@ struct MapgenV6Params : public MapgenSpecificParams {
void writeParams(Settings *settings) const;
};
+
class MapgenV6 : public Mapgen {
public:
EmergeManager *m_emerge;
@@ -85,6 +96,7 @@ public:
Noise *noise_mud;
Noise *noise_beach;
Noise *noise_biome;
+ Noise *noise_humidity;
NoiseParams *np_cave;
NoiseParams *np_humidity;
NoiseParams *np_trees;
@@ -102,6 +114,10 @@ public:
content_t c_cobble;
content_t c_desert_sand;
content_t c_desert_stone;
+ content_t c_dirt_with_snow;
+ content_t c_snow;
+ content_t c_snowblock;
+ content_t c_ice;
content_t c_mossycobble;
content_t c_sandbrick;
@@ -145,6 +161,7 @@ public:
virtual void generateCaves(int max_stone_y);
};
+
struct MapgenFactoryV6 : public MapgenFactory {
Mapgen *createMapgen(int mgid, MapgenParams *params, EmergeManager *emerge)
{
@@ -157,4 +174,5 @@ struct MapgenFactoryV6 : public MapgenFactory {
};
};
+
#endif