Skip to content

Commit a80ecbe

Browse files
vlapsleynerzhul
authored andcommittedJul 6, 2017
Mapgen: Add Carpathian mapgen (#6015)
1 parent 6bedb6d commit a80ecbe

File tree

9 files changed

+725
-0
lines changed

9 files changed

+725
-0
lines changed
 

Diff for: ‎build/android/jni/Android.mk

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ LOCAL_SRC_FILES := \
175175
jni/src/mapblock.cpp \
176176
jni/src/mapblock_mesh.cpp \
177177
jni/src/mapgen.cpp \
178+
jni/src/mapgen_carpathian.cpp \
178179
jni/src/mapgen_flat.cpp \
179180
jni/src/mapgen_fractal.cpp \
180181
jni/src/mapgen_singlenode.cpp \

Diff for: ‎builtin/settingtypes.txt

+70
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,76 @@ mgv7_np_cave1 (Cave1 noise) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0
12201220
# Second of 2 3D noises that together define tunnels.
12211221
mgv7_np_cave2 (Cave2 noise) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0
12221222

1223+
[***Mapgen carpathian]
1224+
1225+
# Map generation attributes specific to Mapgen Carpathian.
1226+
# Flags that are not specified in the flag string are not modified from the default.
1227+
# Flags starting with 'no' are used to explicitly disable them.
1228+
mgcarpathian_spflags (Mapgen Carpathian specific flags) flags caverns caverns,nocaverns
1229+
1230+
# Controls width of tunnels, a smaller value creates wider tunnels.
1231+
mgcarpathian_cave_width (Cave width) float 0.09
1232+
1233+
# Y of upper limit of large pseudorandom caves.
1234+
mgcarpathian_large_cave_depth (Large cave depth) int -33
1235+
1236+
# Y-level of cavern upper limit.
1237+
mgcarpathian_cavern_limit (Cavern limit) int -256
1238+
1239+
# Y-distance over which caverns expand to full size.
1240+
mgcarpathian_cavern_taper (Cavern taper) int 256
1241+
1242+
# Defines full size of caverns, smaller values create larger caverns.
1243+
mgcarpathian_cavern_threshold (Cavern threshold) float 0.7
1244+
1245+
# 2D noise that defines the base ground level.
1246+
mgcarpathian_np_base (Base ground noise) noise_params 12, 1, (2557, 2557, 2557), 6538, 4, 0.8, 0.5
1247+
1248+
# Variation of biome filler depth.
1249+
mgcarpathian_np_filler_depth (Filler depth noise) noise_params 0, 1, (128, 128, 128), 261, 3, 0.7, 2.0
1250+
1251+
# First of 4 3D noises that together define hill/mountain range height.
1252+
mgcarpathian_np_height1 (Hilliness1 noise) noise_params 0, 5, (251, 251, 251), 9613, 5, 0.5, 2.0
1253+
1254+
# Second of 4 3D noises that together define hill/mountain range height.
1255+
mgcarpathian_np_height2 (Hilliness2 noise) noise_params 0, 5, (383, 383, 383), 1949, 5, 0.5, 2.0
1256+
1257+
# Third of 4 3D noises that together define hill/mountain range height.
1258+
mgcarpathian_np_height3 (Hilliness3 noise) noise_params 0, 5, (509, 509, 509), 3211, 5, 0.5, 2.0
1259+
1260+
# Fourth of 4 3D noises that together define hill/mountain range height.
1261+
mgcarpathian_np_height4 (Hilliness4 noise) noise_params 0, 5, (631, 631, 631), 1583, 5, 0.5, 2.0
1262+
1263+
# 2D noise that controls the size/occurance of rolling hills.
1264+
mgcarpathian_np_hills_terrain (Rolling hills spread noise) noise_params 1, 1, (1301, 1301, 1301), 1692, 3, 0.5, 2.0
1265+
1266+
# 2D noise that controls the size/occurance of ridged mountain ranges.
1267+
mgcarpathian_np_ridge_terrain (Ridge mountain spread noise) noise_params 1, 1, (1889, 1889, 1889), 3568, 3, 0.5, 2.0
1268+
1269+
# 2D noise that controls the size/occurance of step mountain ranges.
1270+
mgcarpathian_np_step_terrain (Step mountain spread noise) noise_params 1, 1, (1889, 1889, 1889), 4157, 3, 0.5, 2.0
1271+
1272+
# 2D noise that controls the shape/size of rolling hills.
1273+
mgcarpathian_np_hills (Rolling hill size noise) noise_params 0, 3, (257, 257, 257), 6604, 6, 0.5, 2.0
1274+
1275+
# 2D noise that controls the shape/size of ridged mountains.
1276+
mgcarpathian_np_ridge_mnt (Ridged mountain size noise) noise_params 0, 12, (743, 743, 743), 5520, 6, 0.7, 2.0
1277+
1278+
# 2D noise that controls the shape/size of step mountains.
1279+
mgcarpathian_np_step_mnt (Step mountain size noise) noise_params 0, 8, (509, 509, 509), 2590, 6, 0.6, 2.0
1280+
1281+
# 3D noise for mountain overhangs, cliffs, etc. Usually small variations.
1282+
mgcarpathian_np_mnt_var (Mountain variation noise) noise_params 0, 1, (499, 499, 499), 2490, 5, 0.6, 2.0
1283+
1284+
# First of 2 3D noises that together define tunnels.
1285+
mgcarpathian_np_cave1 (Cave1 noise) noise_params 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0
1286+
1287+
# Second of 2 3D noises that together define tunnels.
1288+
mgcarpathian_np_cave2 (Cave2 noise) noise_params 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0
1289+
1290+
# 3D noise defining giant caverns.
1291+
mgcarpathian_np_cavern (Cavern noise) noise_params 0, 1, (384, 128, 384), 723, 5, 0.63, 2.0
1292+
12231293
[***Mapgen flat]
12241294

12251295
# Map generation attributes specific to Mapgen flat.

Diff for: ‎minetest.conf.example

+92
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,98 @@
14841484
# type: noise_params
14851485
# mgv7_np_cave2 = 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0
14861486

1487+
#### Mapgen carpathian
1488+
1489+
# Map generation attributes specific to Mapgen Carpathian.
1490+
# Flags that are not specified in the flag string are not modified from the default.
1491+
# Flags starting with 'no' are used to explicitly disable them.
1492+
# type: flags possible values: caverns, nocaverns
1493+
# mgcarpathian_spflags = caverns
1494+
1495+
# Controls width of tunnels, a smaller value creates wider tunnels.
1496+
# type: float
1497+
# mgcarpathian_cave_width = 0.09
1498+
1499+
# Y of upper limit of large pseudorandom caves.
1500+
# type: int
1501+
# mgcarpathian_large_cave_depth = -33
1502+
1503+
# Y-level of cavern upper limit.
1504+
# type: int
1505+
# mgcarpathian_cavern_limit = -256
1506+
1507+
# Y-distance over which caverns expand to full size.
1508+
# type: int
1509+
# mgcarpathian_cavern_taper = 256
1510+
1511+
# Defines full size of caverns, smaller values create larger caverns.
1512+
# type: float
1513+
# mgcarpathian_cavern_threshold = 0.7
1514+
1515+
# 2D noise that defines the base ground level.
1516+
# type: noise_params
1517+
# mgcarpathian_np_base = 12, 1, (2557, 2557, 2557), 6538, 4, 0.8, 0.5
1518+
1519+
# Variation of biome filler depth.
1520+
# type: noise_params
1521+
# mgcarpathian_np_filler_depth = 0, 1, (128, 128, 128), 261, 3, 0.7, 2.0
1522+
1523+
# First of 4 3D noises that together define hill/mountain range height.
1524+
# type: noise_params
1525+
# mgcarpathian_np_height1 = 0, 5, (251, 251, 251), 9613, 5, 0.5, 2.0
1526+
1527+
# Second of 4 3D noises that together define hill/mountain range height.
1528+
# type: noise_params
1529+
# mgcarpathian_np_height2 = 0, 5, (383, 383, 383), 1949, 5, 0.5, 2.0
1530+
1531+
# Third of 4 3D noises that together definehill/mountain range height.
1532+
# type: noise_params
1533+
# mgcarpathian_np_height3 = 0, 5, (509, 509, 509), 3211, 5, 0.5, 2.0
1534+
1535+
# Fourth of 4 3D noises that together define hill/mountain range height.
1536+
# type: noise_params
1537+
# mgcarpathian_np_height4 = 0, 5, (631, 631, 631), 1583, 5, 0.5, 2.0
1538+
1539+
# 2D noise that controls the size/occurance of rolling hills.
1540+
# type: noise_params
1541+
# mgcarpathian_np_hills_terrain = 1, 1, (1301, 1301, 1301), 1692, 3, 0.5, 2.0
1542+
1543+
# 2D noise that controls the size/occurance of ridged mountain ranges.
1544+
# type: noise_params
1545+
# mgcarpathian_np_ridge_terrain = 1, 1, (1889, 1889, 1889), 3568, 3, 0.5, 2.0
1546+
1547+
# 2D noise that controls the size/occurance of step mountain ranges.
1548+
# type: noise_params
1549+
# mgcarpathian_np_step_terrain = 1, 1, (1889, 1889, 1889), 4157, 3, 0.5, 2.0
1550+
1551+
# 2D noise that controls the shape/size of rolling hills.
1552+
# type: noise_params
1553+
# mgcarpathian_np_hills = 0, 3, (257, 257, 257), 6604, 6, 0.5, 2.0
1554+
1555+
# 2D noise that controls the shape/size of ridged mountains.
1556+
# type: noise_params
1557+
# mgcarpathian_np_ridge_mnt = 0, 12, (743, 743, 743), 5520, 6, 0.7, 2.0
1558+
1559+
# 2D noise that controls the shape/size of step mountains.
1560+
# type: noise_params
1561+
# mgcarpathian_np_step_mnt = 0, 8, (509, 509, 509), 2590, 6, 0.6, 2.0
1562+
1563+
# 3D noise for mountain overhangs, cliffs, etc. Usually small variations.
1564+
# type: noise_params
1565+
# mgcarpathian_np_mnt_var = 0, 1, (499, 499, 499), 2490, 5, 0.6, 2.0
1566+
1567+
# First of 2 3D noises that together define tunnels.
1568+
# type: noise_params
1569+
# mgcarpathian_np_cave1 = 0, 12, (61, 61, 61), 52534, 3, 0.5, 2.0
1570+
1571+
# Second of 2 3D noises that together define tunnels.
1572+
# type: noise_params
1573+
# mgcarpathian_np_cave2 = 0, 12, (67, 67, 67), 10325, 3, 0.5, 2.0
1574+
1575+
# 3D noise defining giant caverns.
1576+
# type: noise_params
1577+
# mgcarpathian_np_cavern = 0, 1, (384, 128, 384), 723, 5, 0.63, 2.0
1578+
14871579
#### Mapgen flat
14881580

14891581
# Map generation attributes specific to Mapgen flat.

Diff for: ‎src/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ set(common_SRCS
400400
map_settings_manager.cpp
401401
mapblock.cpp
402402
mapgen.cpp
403+
mapgen_carpathian.cpp
403404
mapgen_flat.cpp
404405
mapgen_fractal.cpp
405406
mapgen_singlenode.cpp

Diff for: ‎src/mapgen.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
4040
#include "util/numeric.h"
4141
#include "filesys.h"
4242
#include "log.h"
43+
#include "mapgen_carpathian.h"
4344
#include "mapgen_flat.h"
4445
#include "mapgen_fractal.h"
4546
#include "mapgen_v5.h"
@@ -86,6 +87,7 @@ static MapgenDesc g_reg_mapgens[] = {
8687
{"fractal", true},
8788
{"valleys", true},
8889
{"singlenode", true},
90+
{"carpathian", true},
8991
};
9092

9193
STATIC_ASSERT(
@@ -159,6 +161,8 @@ Mapgen *Mapgen::createMapgen(MapgenType mgtype, int mgid,
159161
MapgenParams *params, EmergeManager *emerge)
160162
{
161163
switch (mgtype) {
164+
case MAPGEN_CARPATHIAN:
165+
return new MapgenCarpathian(mgid, (MapgenCarpathianParams *)params, emerge);
162166
case MAPGEN_FLAT:
163167
return new MapgenFlat(mgid, (MapgenFlatParams *)params, emerge);
164168
case MAPGEN_FRACTAL:
@@ -182,6 +186,8 @@ Mapgen *Mapgen::createMapgen(MapgenType mgtype, int mgid,
182186
MapgenParams *Mapgen::createMapgenParams(MapgenType mgtype)
183187
{
184188
switch (mgtype) {
189+
case MAPGEN_CARPATHIAN:
190+
return new MapgenCarpathianParams;
185191
case MAPGEN_FLAT:
186192
return new MapgenFlatParams;
187193
case MAPGEN_FRACTAL:

Diff for: ‎src/mapgen.h

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ enum MapgenType {
118118
MAPGEN_FRACTAL,
119119
MAPGEN_VALLEYS,
120120
MAPGEN_SINGLENODE,
121+
MAPGEN_CARPATHIAN,
121122
MAPGEN_INVALID,
122123
};
123124

0 commit comments

Comments
 (0)
Please sign in to comment.