/*
-Minetest-c55
-Copyright (C) 2010-2011 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
+Minetest
+Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
#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;
MapNode n_filler;
s16 ntopnodes;
- s16 flags;
+ s8 groupid;
+ s8 flags;
s16 height_min;
s16 height_max;
float heat_min;
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);
};
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);
BiomeDefManager(IGameDef *gamedef);
~BiomeDefManager();
+ Biome *createBiome(BiomeTerrainType btt);
Biome *getBiome(float bgfreq, float heat, float humidity);
- void addBiome();
+ void addBiomeGroup(float freq);
+ void addBiome(Biome *b);
void addDefaultBiomes();
};