diff options
Diffstat (limited to 'src/mapgen_v5.h')
-rw-r--r-- | src/mapgen_v5.h | 66 |
1 files changed, 9 insertions, 57 deletions
diff --git a/src/mapgen_v5.h b/src/mapgen_v5.h index fd2f7f4d8..ddb090a9c 100644 --- a/src/mapgen_v5.h +++ b/src/mapgen_v5.h @@ -30,7 +30,7 @@ class BiomeManager; extern FlagDesc flagdesc_mapgen_v5[]; -struct MapgenV5Params : public MapgenSpecificParams { +struct MapgenV5Params : public MapgenParams { u32 spflags; float cave_width; NoiseParams np_filler_depth; @@ -48,69 +48,21 @@ struct MapgenV5Params : public MapgenSpecificParams { }; -class MapgenV5 : public Mapgen { +class MapgenV5 : public MapgenBasic { public: - EmergeManager *m_emerge; - BiomeManager *bmgr; - - int ystride; - int zstride_1d; - - v3s16 node_min; - v3s16 node_max; - v3s16 full_node_min; - v3s16 full_node_max; - - u32 spflags; - float cave_width; - Noise *noise_filler_depth; - Noise *noise_factor; - Noise *noise_height; - Noise *noise_cave1; - Noise *noise_cave2; - Noise *noise_ground; - - Noise *noise_heat; - Noise *noise_humidity; - Noise *noise_heat_blend; - Noise *noise_humidity_blend; - - content_t c_stone; - content_t c_water_source; - content_t c_lava_source; - content_t c_desert_stone; - content_t c_ice; - content_t c_sandstone; - - content_t c_cobble; - content_t c_stair_cobble; - content_t c_mossycobble; - content_t c_sandstonebrick; - content_t c_stair_sandstonebrick; - - MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge); + MapgenV5(int mapgenid, MapgenV5Params *params, EmergeManager *emerge); ~MapgenV5(); + virtual MapgenType getType() const { return MAPGEN_V5; } + virtual void makeChunk(BlockMakeData *data); int getSpawnLevelAtPoint(v2s16 p); - void calculateNoise(); int generateBaseTerrain(); - MgStoneType generateBiomes(float *heat_map, float *humidity_map); - void generateCaves(int max_stone_y); - void dustTopNodes(); -}; - -struct MapgenFactoryV5 : public MapgenFactory { - Mapgen *createMapgen(int mgid, MapgenParams *params, EmergeManager *emerge) - { - return new MapgenV5(mgid, params, emerge); - }; - - MapgenSpecificParams *createMapgenParams() - { - return new MapgenV5Params(); - }; +private: + Noise *noise_factor; + Noise *noise_height; + Noise *noise_ground; }; #endif |