#define MG_BIOME_HEADER
#include "mapgen.h"
-#include "noise.h"
+
+struct NoiseParams;
enum BiomeType
{
BIOME_TYPE_FLAT
};
-extern NoiseParams nparams_biome_def_heat;
-extern NoiseParams nparams_biome_def_humidity;
-
-
-class Biome : public GenElement {
+class Biome : public GenElement, public NodeResolver {
public:
u32 flags;
s16 height_max;
float heat_point;
float humidity_point;
+
+ virtual void resolveNodeNames(NodeResolveInfo *nri);
};
class BiomeManager : public GenElementManager {
static const char *ELEMENT_TITLE;
static const size_t ELEMENT_LIMIT = 0x100;
- NoiseParams *np_heat;
- NoiseParams *np_humidity;
-
BiomeManager(IGameDef *gamedef);
~BiomeManager();
return new Biome;
}
+ 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);