Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
mapgen_v5.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2014-2018 paramat
4Copyright (C) 2014-2018 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation; either version 2.1 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License along
17with this program; if not, write to the Free Software Foundation, Inc.,
1851 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20
21#pragma once
22
23#include "mapgen.h"
24
26#define MGV5_CAVERNS 0x01
27
28class BiomeManager;
29
31
33{
34 float cave_width = 0.09f;
35 s16 large_cave_depth = -256;
40 float large_cave_flooded = 0.5f;
41 s16 cavern_limit = -256;
42 s16 cavern_taper = 256;
43 float cavern_threshold = 0.7f;
44 s16 dungeon_ymin = -31000;
45 s16 dungeon_ymax = 31000;
46
55
57 ~MapgenV5Params() = default;
58
59 void readParams(const Settings *settings);
60 void writeParams(Settings *settings) const;
61 void setDefaultSettings(Settings *settings);
62};
63
64class MapgenV5 : public MapgenBasic
65{
66public:
68 ~MapgenV5();
69
70 virtual MapgenType getType() const { return MAPGEN_V5; }
71
72 virtual void makeChunk(BlockMakeData *data);
75
76private:
80};
Definition: mg_biome.h:211
Definition: emerge.h:98
Definition: mapgen.h:294
Definition: mapgen_v5.h:65
Noise * noise_height
Definition: mapgen_v5.h:78
int generateBaseTerrain()
Definition: mapgen_v5.cpp:284
virtual MapgenType getType() const
Definition: mapgen_v5.h:70
int getSpawnLevelAtPoint(v2s16 p)
Definition: mapgen_v5.cpp:165
virtual void makeChunk(BlockMakeData *data)
Definition: mapgen_v5.cpp:199
Noise * noise_factor
Definition: mapgen_v5.h:77
~MapgenV5()
Definition: mapgen_v5.cpp:80
Noise * noise_ground
Definition: mapgen_v5.h:79
Definition: noise.h:146
Definition: settings.h:124
core::vector2d< s16 > v2s16
Definition: irr_v2d.h:27
static LightingParams params
Definition: light.cpp:40
MapgenType
Definition: mapgen.h:117
@ MAPGEN_V5
Definition: mapgen.h:121
FlagDesc flagdesc_mapgen_v5[]
Definition: mapgen_v5.cpp:41
Definition: emerge.h:51
Definition: string.h:80
Definition: mapgen.h:129
Definition: mapgen_v5.h:33
s16 large_cave_depth
Definition: mapgen_v5.h:35
void setDefaultSettings(Settings *settings)
Definition: mapgen_v5.cpp:156
u16 small_cave_num_min
Definition: mapgen_v5.h:36
NoiseParams np_dungeons
Definition: mapgen_v5.h:54
NoiseParams np_factor
Definition: mapgen_v5.h:48
s16 dungeon_ymax
Definition: mapgen_v5.h:45
NoiseParams np_cavern
Definition: mapgen_v5.h:53
s16 dungeon_ymin
Definition: mapgen_v5.h:44
void readParams(const Settings *settings)
Definition: mapgen_v5.cpp:102
NoiseParams np_height
Definition: mapgen_v5.h:49
NoiseParams np_cave1
Definition: mapgen_v5.h:51
float cavern_threshold
Definition: mapgen_v5.h:43
NoiseParams np_ground
Definition: mapgen_v5.h:50
s16 cavern_taper
Definition: mapgen_v5.h:42
float large_cave_flooded
Definition: mapgen_v5.h:40
u16 large_cave_num_min
Definition: mapgen_v5.h:38
NoiseParams np_cave2
Definition: mapgen_v5.h:52
s16 cavern_limit
Definition: mapgen_v5.h:41
void writeParams(Settings *settings) const
Definition: mapgen_v5.cpp:129
MapgenV5Params()
Definition: mapgen_v5.cpp:89
u16 small_cave_num_max
Definition: mapgen_v5.h:37
~MapgenV5Params()=default
NoiseParams np_filler_depth
Definition: mapgen_v5.h:47
u16 large_cave_num_max
Definition: mapgen_v5.h:39
float cave_width
Definition: mapgen_v5.h:34
Definition: noise.h:119
static std::string p(std::string path)
Definition: test_filesys.cpp:64