#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 ObjDef, public NodeResolver {
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;
float heat_point;
float humidity_point;
- virtual void resolveNodeNames(NodeResolveInfo *nri);
+ virtual void resolveNodeNames();
};
class BiomeManager : public ObjDefManager {
static const char *OBJECT_TITLE;
BiomeManager(IGameDef *gamedef);
- ~BiomeManager();
+ virtual ~BiomeManager();
const char *getObjectTitle() const
{
return "biome";
}
- Biome *create(int btt)
+ 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