Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
mapgen_v7.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2014-2020 paramat
4// Copyright (C) 2013-2016 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
5
6#pragma once
7
8#include "mapgen.h"
9
11#define MGV7_MOUNTAINS 0x01
12#define MGV7_RIDGES 0x02
13#define MGV7_FLOATLANDS 0x04
14#define MGV7_CAVERNS 0x08
15#define MGV7_BIOMEREPEAT 0x10 // Now unused
16
17class BiomeManager;
18
20
21
66
67
68class MapgenV7 : public MapgenBasic {
69public:
70 MapgenV7(MapgenV7Params *params, EmergeParams *emerge);
71 ~MapgenV7();
72
73 virtual MapgenType getType() const { return MAPGEN_V7; }
74
75 virtual void makeChunk(BlockMakeData *data);
77
78 float baseTerrainLevelAtPoint(s16 x, s16 z);
79 float baseTerrainLevelFromMap(int index);
80 bool getMountainTerrainAtPoint(s16 x, s16 y, s16 z);
81 bool getMountainTerrainFromMap(int idx_xyz, int idx_xz, s16 y);
82 bool getRiverChannelFromMap(int idx_xyz, int idx_xz, s16 y);
83 bool getFloatlandTerrainFromMap(int idx_xyz, float float_offset);
84
85 int generateTerrain();
86
87private:
95
96 float *float_offset_cache = nullptr;
97
107};
Definition mg_biome.h:202
Definition emerge.h:85
Definition mapgen.h:281
Definition mapgen_v7.h:68
float float_taper_exp
Definition mapgen_v7.h:92
bool getMountainTerrainFromMap(int idx_xyz, int idx_xz, s16 y)
Definition mapgen_v7.cpp:435
s16 floatland_ywater
Definition mapgen_v7.h:94
bool getMountainTerrainAtPoint(s16 x, s16 y, s16 z)
Definition mapgen_v7.cpp:424
float baseTerrainLevelAtPoint(s16 x, s16 z)
Definition mapgen_v7.cpp:391
MapgenV7(MapgenV7Params *params, EmergeParams *emerge)
Definition mapgen_v7.cpp:39
Noise * noise_ridge_uwater
Definition mapgen_v7.h:103
Noise * noise_height_select
Definition mapgen_v7.h:101
Noise * noise_mount_height
Definition mapgen_v7.h:102
s16 floatland_ymax
Definition mapgen_v7.h:90
s16 floatland_taper
Definition mapgen_v7.h:91
~MapgenV7()
Definition mapgen_v7.cpp:112
Noise * noise_floatland
Definition mapgen_v7.h:106
Noise * noise_ridge
Definition mapgen_v7.h:105
virtual void makeChunk(BlockMakeData *data)
Definition mapgen_v7.cpp:300
float * float_offset_cache
Definition mapgen_v7.h:96
Noise * noise_terrain_persist
Definition mapgen_v7.h:100
s16 floatland_ymin
Definition mapgen_v7.h:89
Noise * noise_terrain_base
Definition mapgen_v7.h:98
bool getFloatlandTerrainFromMap(int idx_xyz, float float_offset)
Definition mapgen_v7.cpp:462
int generateTerrain()
Definition mapgen_v7.cpp:468
virtual MapgenType getType() const
Definition mapgen_v7.h:73
Noise * noise_mountain
Definition mapgen_v7.h:104
s16 mount_zero_level
Definition mapgen_v7.h:88
float floatland_density
Definition mapgen_v7.h:93
float baseTerrainLevelFromMap(int index)
Definition mapgen_v7.cpp:411
Noise * noise_terrain_alt
Definition mapgen_v7.h:99
bool getRiverChannelFromMap(int idx_xyz, int idx_xz, s16 y)
Definition mapgen_v7.cpp:445
int getSpawnLevelAtPoint(v2s16 p)
Definition mapgen_v7.cpp:249
Definition noise.h:146
Definition settings.h:109
static const char * settings[]
Definition fontengine.cpp:27
core::vector2d< s16 > v2s16
Definition irr_v2d.h:12
MapgenType
Definition mapgen.h:102
@ MAPGEN_V7
Definition mapgen.h:103
FlagDesc flagdesc_mapgen_v7[]
Definition mapgen_v7.cpp:27
Definition emerge.h:37
Definition string.h:67
Definition mapgen.h:114
Definition mapgen_v7.h:22
void writeParams(Settings *settings) const
Definition mapgen_v7.cpp:198
float floatland_density
Definition mapgen_v7.h:28
~MapgenV7Params()=default
NoiseParams np_filler_depth
Definition mapgen_v7.h:48
void setDefaultSettings(Settings *settings)
Definition mapgen_v7.cpp:239
s16 cavern_limit
Definition mapgen_v7.h:38
s16 cavern_taper
Definition mapgen_v7.h:39
MapgenV7Params()
Definition mapgen_v7.cpp:138
NoiseParams np_cave2
Definition mapgen_v7.h:56
NoiseParams np_floatland
Definition mapgen_v7.h:53
NoiseParams np_ridge_uwater
Definition mapgen_v7.h:50
u16 small_cave_num_max
Definition mapgen_v7.h:34
NoiseParams np_terrain_persist
Definition mapgen_v7.h:46
s16 floatland_ymin
Definition mapgen_v7.h:24
float cavern_threshold
Definition mapgen_v7.h:40
NoiseParams np_terrain_alt
Definition mapgen_v7.h:45
float cave_width
Definition mapgen_v7.h:31
u16 small_cave_num_min
Definition mapgen_v7.h:33
s16 floatland_taper
Definition mapgen_v7.h:26
NoiseParams np_cavern
Definition mapgen_v7.h:54
NoiseParams np_ridge
Definition mapgen_v7.h:52
NoiseParams np_height_select
Definition mapgen_v7.h:47
NoiseParams np_dungeons
Definition mapgen_v7.h:57
s16 large_cave_depth
Definition mapgen_v7.h:32
NoiseParams np_cave1
Definition mapgen_v7.h:55
NoiseParams np_mount_height
Definition mapgen_v7.h:49
s16 dungeon_ymin
Definition mapgen_v7.h:41
NoiseParams np_mountain
Definition mapgen_v7.h:51
s16 mount_zero_level
Definition mapgen_v7.h:23
s16 floatland_ymax
Definition mapgen_v7.h:25
void readParams(const Settings *settings)
Definition mapgen_v7.cpp:157
float float_taper_exp
Definition mapgen_v7.h:27
float large_cave_flooded
Definition mapgen_v7.h:37
u16 large_cave_num_max
Definition mapgen_v7.h:36
u16 large_cave_num_min
Definition mapgen_v7.h:35
s16 floatland_ywater
Definition mapgen_v7.h:29
s16 dungeon_ymax
Definition mapgen_v7.h:42
NoiseParams np_terrain_base
Definition mapgen_v7.h:44
Definition noise.h:119
static std::string p(std::string path)
Definition test_filesys.cpp:53