aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_valleys.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-12-22 23:16:00 +0100
committerest31 <MTest31@outlook.com>2016-12-22 23:16:00 +0100
commit81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (patch)
tree1e9ef1be1b3295a8673d6e4f0bdeb4c2d3a6015f /src/mapgen_valleys.h
parent8077612dcb48221281e726a60eb97bf73fde462b (diff)
parent231ac33d34dfaaddf292c5f31b1eae43eeefba2d (diff)
downloadminetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.gz
minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.bz2
minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.zip
Merge 0.4.15 changes into stable-0.4
0.4.15 release!
Diffstat (limited to 'src/mapgen_valleys.h')
-rw-r--r--src/mapgen_valleys.h65
1 files changed, 10 insertions, 55 deletions
diff --git a/src/mapgen_valleys.h b/src/mapgen_valleys.h
index 5224ea54b..6dd7ebc47 100644
--- a/src/mapgen_valleys.h
+++ b/src/mapgen_valleys.h
@@ -39,13 +39,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define MYCUBE(x) (x) * (x) * (x)
class BiomeManager;
+class BiomeGenOriginal;
// Global profiler
//class Profiler;
//extern Profiler *mapgen_profiler;
-struct MapgenValleysParams : public MapgenSpecificParams {
+struct MapgenValleysParams : public MapgenParams {
u32 spflags;
s16 large_cave_depth;
s16 massive_cave_depth;
@@ -84,24 +85,21 @@ struct TerrainNoise {
float inter_valley_fill;
};
-class MapgenValleys : public Mapgen {
+class MapgenValleys : public MapgenBasic {
public:
- MapgenValleys(int mapgenid, MapgenParams *params, EmergeManager *emerge);
+ MapgenValleys(int mapgenid, MapgenValleysParams *params, EmergeManager *emerge);
~MapgenValleys();
+ virtual MapgenType getType() const { return MAPGEN_VALLEYS; }
+
virtual void makeChunk(BlockMakeData *data);
int getSpawnLevelAtPoint(v2s16 p);
s16 large_cave_depth;
private:
- EmergeManager *m_emerge;
- BiomeManager *bmgr;
-
- int ystride;
- int zstride;
- int zstride_1d;
+ BiomeGenOriginal *m_bgen;
float map_gen_limit;
@@ -111,12 +109,6 @@ private:
s16 cave_water_max_height;
s16 lava_max_height;
- v3s16 node_min;
- v3s16 node_max;
- v3s16 full_node_min;
- v3s16 full_node_max;
-
- u32 spflags;
float altitude_chill;
s16 lava_features_lim;
s16 massive_cave_depth;
@@ -124,37 +116,17 @@ private:
float river_size_factor;
float *tcave_cache;
s16 water_features_lim;
- float cave_width;
- Noise *noise_filler_depth;
- Noise *noise_cave1;
- Noise *noise_cave2;
Noise *noise_inter_valley_fill;
Noise *noise_inter_valley_slope;
Noise *noise_rivers;
+ Noise *noise_cave1;
+ Noise *noise_cave2;
Noise *noise_massive_caves;
Noise *noise_terrain_height;
Noise *noise_valley_depth;
Noise *noise_valley_profile;
- Noise *noise_heat;
- Noise *noise_heat_blend;
- Noise *noise_humidity;
- Noise *noise_humidity_blend;
-
- content_t c_cobble;
- content_t c_desert_stone;
- content_t c_dirt;
- content_t c_ice;
content_t c_lava_source;
- content_t c_mossycobble;
- content_t c_river_water_source;
- content_t c_sand;
- content_t c_sandstone;
- content_t c_sandstonebrick;
- content_t c_stair_cobble;
- content_t c_stair_sandstonebrick;
- content_t c_stone;
- content_t c_water_source;
float terrainLevelAtPoint(s16 x, s16 z);
@@ -164,24 +136,7 @@ private:
float terrainLevelFromNoise(TerrainNoise *tn);
float adjustedTerrainLevelFromNoise(TerrainNoise *tn);
- float humidityByTerrain(float humidity_base, float mount, float rivers, float valley);
-
- MgStoneType generateBiomes(float *heat_map, float *humidity_map);
- void dustTopNodes();
-
- void generateCaves(s16 max_stone_y);
-};
-
-struct MapgenFactoryValleys : public MapgenFactory {
- Mapgen *createMapgen(int mgid, MapgenParams *params, EmergeManager *emerge)
- {
- return new MapgenValleys(mgid, params, emerge);
- };
-
- MapgenSpecificParams *createMapgenParams()
- {
- return new MapgenValleysParams();
- };
+ virtual void generateCaves(s16 max_stone_y, s16 large_cave_depth);
};
#endif