summaryrefslogtreecommitdiff
path: root/src/mapgen/mg_biome.h
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2018-02-23 08:54:03 +0000
committerparamat <mat.gregory@virginmedia.com>2018-03-09 03:16:25 +0000
commitcbb9301bea9d869a7d11f810fb320d93f6d31460 (patch)
tree8aa8761e21d9a27e501214c61af4f5a6cf865095 /src/mapgen/mg_biome.h
parentc7c03ad7a60b77040d0dfc360a79f065e0c2c971 (diff)
downloadminetest-cbb9301bea9d869a7d11f810fb320d93f6d31460.tar.gz
minetest-cbb9301bea9d869a7d11f810fb320d93f6d31460.tar.bz2
minetest-cbb9301bea9d869a7d11f810fb320d93f6d31460.zip
Biomes: Add 'min_pos'/'max_pos' xyz biome limits
'y_min' and 'y_max' are still accepted for compatibility.
Diffstat (limited to 'src/mapgen/mg_biome.h')
-rw-r--r--src/mapgen/mg_biome.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mapgen/mg_biome.h b/src/mapgen/mg_biome.h
index a2bfaf5b9..ad90f28f8 100644
--- a/src/mapgen/mg_biome.h
+++ b/src/mapgen/mg_biome.h
@@ -63,8 +63,8 @@ public:
s16 depth_water_top;
s16 depth_riverbed;
- s16 y_min;
- s16 y_max;
+ v3s16 min_pos;
+ v3s16 max_pos;
float heat_point;
float humidity_point;
s16 vertical_blend;
@@ -108,14 +108,14 @@ public:
// Gets all biomes in current chunk using each corresponding element of
// heightmap as the y position, then stores the results by biome index in
// biomemap (also returned)
- virtual biome_t *getBiomes(s16 *heightmap) = 0;
+ virtual biome_t *getBiomes(s16 *heightmap, v3s16 pmin) = 0;
// Gets a single biome at the specified position, which must be contained
// in the region formed by m_pmin and (m_pmin + m_csize - 1).
virtual Biome *getBiomeAtPoint(v3s16 pos) const = 0;
// Same as above, but uses a raw numeric index correlating to the (x,z) position.
- virtual Biome *getBiomeAtIndex(size_t index, s16 y) const = 0;
+ virtual Biome *getBiomeAtIndex(size_t index, v3s16 pos) const = 0;
// Result of calcBiomes bulk computation.
biome_t *biomemap = nullptr;
@@ -164,11 +164,11 @@ public:
Biome *calcBiomeAtPoint(v3s16 pos) const;
void calcBiomeNoise(v3s16 pmin);
- biome_t *getBiomes(s16 *heightmap);
+ biome_t *getBiomes(s16 *heightmap, v3s16 pmin);
Biome *getBiomeAtPoint(v3s16 pos) const;
- Biome *getBiomeAtIndex(size_t index, s16 y) const;
+ Biome *getBiomeAtIndex(size_t index, v3s16 pos) const;
- Biome *calcBiomeFromNoise(float heat, float humidity, s16 y) const;
+ Biome *calcBiomeFromNoise(float heat, float humidity, v3s16 pos) const;
float *heatmap;
float *humidmap;
@@ -230,7 +230,7 @@ public:
NoiseParams &np_heat_blend, u64 seed);
float getHumidityAtPosOriginal(v3s16 pos, NoiseParams &np_humidity,
NoiseParams &np_humidity_blend, u64 seed);
- Biome *getBiomeFromNoiseOriginal(float heat, float humidity, s16 y);
+ Biome *getBiomeFromNoiseOriginal(float heat, float humidity, v3s16 pos);
private:
Server *m_server;