summaryrefslogtreecommitdiff
path: root/src/mapgen_valleys.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2016-04-28 03:43:09 -0400
committerkwolekr <kwolekr@minetest.net>2016-05-27 23:23:58 -0400
commit76f485647983ebd7eb4c3abbca0869d13f76920b (patch)
tree6e6f4745311f2ac834780b5bf142dfeeea3aceb0 /src/mapgen_valleys.h
parentfa6b21a15b415cd82dce6896b94a5341b7dd76f0 (diff)
downloadminetest-76f485647983ebd7eb4c3abbca0869d13f76920b.tar.gz
minetest-76f485647983ebd7eb4c3abbca0869d13f76920b.tar.bz2
minetest-76f485647983ebd7eb4c3abbca0869d13f76920b.zip
Move biome calculation to BiomeGen
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes for a given area using the algorithm implemented by that specific BiomeGen. This abstracts away the old system where each mapgen supplied the noises required for biome generation.
Diffstat (limited to 'src/mapgen_valleys.h')
-rw-r--r--src/mapgen_valleys.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mapgen_valleys.h b/src/mapgen_valleys.h
index 5224ea54b..0e268c1cf 100644
--- a/src/mapgen_valleys.h
+++ b/src/mapgen_valleys.h
@@ -39,6 +39,7 @@ 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;
@@ -98,6 +99,7 @@ public:
private:
EmergeManager *m_emerge;
BiomeManager *bmgr;
+ BiomeGenOriginal *m_bgen;
int ystride;
int zstride;
@@ -136,11 +138,6 @@ private:
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;
@@ -164,9 +161,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);
+ MgStoneType generateBiomes();
void dustTopNodes();
void generateCaves(s16 max_stone_y);