diff options
Diffstat (limited to 'src/biome.h')
-rw-r--r-- | src/biome.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/biome.h b/src/biome.h index 5e43ab6d7..bb35dd1c4 100644 --- a/src/biome.h +++ b/src/biome.h @@ -20,12 +20,23 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef BIOME_HEADER #define BIOME_HEADER +#include <string> #include "nodedef.h" #include "gamedef.h" #include "mapnode.h" #include "noise.h" #include "mapgen.h" + +enum BiomeTerrainType +{ + BIOME_TERRAIN_NORMAL, + BIOME_TERRAIN_LIQUID, + BIOME_TERRAIN_NETHER, + BIOME_TERRAIN_AETHER, + BIOME_TERRAIN_FLAT +}; + class Biome { public: MapNode n_top; @@ -38,14 +49,14 @@ public: float heat_max; float humidity_min; float humidity_max; - const char *name; + std::string name; NoiseParams *np; virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2); virtual int getSurfaceHeight(float noise_terrain); }; -class BiomeOcean : public Biome { +class BiomeLiquid : public Biome { virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2); }; @@ -54,6 +65,11 @@ class BiomeHell : public Biome { virtual int getSurfaceHeight(float noise_terrain); }; +class BiomeAether : public Biome { + virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2); + virtual int getSurfaceHeight(float noise_terrain); +}; + class BiomeSuperflat : public Biome { virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2); virtual int getSurfaceHeight(float noise_terrain); @@ -70,9 +86,11 @@ public: BiomeDefManager(IGameDef *gamedef); ~BiomeDefManager(); + Biome *createBiome(BiomeTerrainType btt); Biome *getBiome(float bgfreq, float heat, float humidity); - void addBiome(); + void addBiomeGroup(float freq); + void addBiome(int groupid, Biome *b); void addDefaultBiomes(); }; |