diff options
Diffstat (limited to 'src/mg_biome.h')
-rw-r--r-- | src/mg_biome.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/mg_biome.h b/src/mg_biome.h index 3577960a9..8d519f808 100644 --- a/src/mg_biome.h +++ b/src/mg_biome.h @@ -20,36 +20,32 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef MG_BIOME_HEADER #define MG_BIOME_HEADER -#include "mapgen.h" - -struct NoiseParams; +#include "objdef.h" +#include "nodedef.h" enum BiomeType { - BIOME_TYPE_NORMAL, - BIOME_TYPE_LIQUID, - BIOME_TYPE_NETHER, - BIOME_TYPE_AETHER, - BIOME_TYPE_FLAT + BIOME_NORMAL, + BIOME_LIQUID, + BIOME_NETHER, + BIOME_AETHER, + BIOME_FLAT }; -class Biome : public GenElement, public NodeResolver { +class Biome : public ObjDef, public NodeResolver { public: u32 flags; content_t c_top; content_t c_filler; - content_t c_shore_top; - content_t c_shore_filler; - content_t c_underwater; content_t c_stone; content_t c_water_top; content_t c_water; + content_t c_river_water; content_t c_dust; s16 depth_top; s16 depth_filler; - s16 height_shore; s16 depth_water_top; s16 y_min; @@ -57,27 +53,34 @@ public: float heat_point; float humidity_point; - virtual void resolveNodeNames(NodeResolveInfo *nri); + virtual void resolveNodeNames(); }; -class BiomeManager : public GenElementManager { +class BiomeManager : public ObjDefManager { public: - static const char *ELEMENT_TITLE; - static const size_t ELEMENT_LIMIT = 0x100; + static const char *OBJECT_TITLE; BiomeManager(IGameDef *gamedef); - ~BiomeManager(); + virtual ~BiomeManager(); - Biome *create(int btt) + const char *getObjectTitle() const + { + return "biome"; + } + + static Biome *create(BiomeType type) { return new Biome; } - void clear(); + virtual void clear(); void calcBiomes(s16 sx, s16 sy, float *heat_map, float *humidity_map, s16 *height_map, u8 *biomeid_map); Biome *getBiome(float heat, float humidity, s16 y); + +private: + IGameDef *m_gamedef; }; #endif |