From 5bef3393889e0a29155a7e777d19344eaaae96b7 Mon Sep 17 00:00:00 2001 From: Dharkael Date: Sun, 3 Sep 2017 19:33:22 +0200 Subject: [PATCH] Use member initialization list instead of the constructor's body (#6371) * Use member initialization list instead of the constructor's body --- src/mapgen_carpathian.cpp | 34 +++++++++++++++++----------------- src/mapgen_flat.cpp | 10 +++++----- src/mapgen_fractal.cpp | 10 +++++----- src/mapgen_v5.cpp | 16 ++++++++-------- src/mapgen_v6.cpp | 24 ++++++++++++------------ src/mapgen_v7.cpp | 30 +++++++++++++++--------------- src/mapgen_valleys.cpp | 22 +++++++++++----------- 7 files changed, 73 insertions(+), 73 deletions(-) diff --git a/src/mapgen_carpathian.cpp b/src/mapgen_carpathian.cpp index c11a97abb..b416065c7 100644 --- a/src/mapgen_carpathian.cpp +++ b/src/mapgen_carpathian.cpp @@ -106,24 +106,24 @@ MapgenCarpathian::~MapgenCarpathian() } -MapgenCarpathianParams::MapgenCarpathianParams() +MapgenCarpathianParams::MapgenCarpathianParams(): + np_base (12, 1, v3f(2557, 2557, 2557), 6538, 4, 0.8, 0.5), + np_filler_depth (0, 1, v3f(128, 128, 128), 261, 3, 0.7, 2.0), + np_height1 (0, 5, v3f(251, 251, 251), 9613, 5, 0.5, 2.0), + np_height2 (0, 5, v3f(383, 383, 383), 1949, 5, 0.5, 2.0), + np_height3 (0, 5, v3f(509, 509, 509), 3211, 5, 0.5, 2.0), + np_height4 (0, 5, v3f(631, 631, 631), 1583, 5, 0.5, 2.0), + np_hills_terrain (1, 1, v3f(1301, 1301, 1301), 1692, 5, 0.5, 2.0), + np_ridge_terrain (1, 1, v3f(1889, 1889, 1889), 3568, 5, 0.5, 2.0), + np_step_terrain (1, 1, v3f(1889, 1889, 1889), 4157, 5, 0.5, 2.0), + np_hills (0, 3, v3f(257, 257, 257), 6604, 6, 0.5, 2.0), + np_ridge_mnt (0, 12, v3f(743, 743, 743), 5520, 6, 0.7, 2.0), + np_step_mnt (0, 8, v3f(509, 509, 509), 2590, 6, 0.6, 2.0), + np_mnt_var (0, 1, v3f(499, 499, 499), 2490, 5, 0.55, 2.0), + np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0), + np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0), + np_cavern (0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0) { - np_base = NoiseParams(12, 1, v3f(2557, 2557, 2557), 6538, 4, 0.8, 0.5); - np_filler_depth = NoiseParams(0, 1, v3f(128, 128, 128), 261, 3, 0.7, 2.0); - np_height1 = NoiseParams(0, 5, v3f(251, 251, 251), 9613, 5, 0.5, 2.0); - np_height2 = NoiseParams(0, 5, v3f(383, 383, 383), 1949, 5, 0.5, 2.0); - np_height3 = NoiseParams(0, 5, v3f(509, 509, 509), 3211, 5, 0.5, 2.0); - np_height4 = NoiseParams(0, 5, v3f(631, 631, 631), 1583, 5, 0.5, 2.0); - np_hills_terrain = NoiseParams(1, 1, v3f(1301, 1301, 1301), 1692, 5, 0.5, 2.0); - np_ridge_terrain = NoiseParams(1, 1, v3f(1889, 1889, 1889), 3568, 5, 0.5, 2.0); - np_step_terrain = NoiseParams(1, 1, v3f(1889, 1889, 1889), 4157, 5, 0.5, 2.0); - np_hills = NoiseParams(0, 3, v3f(257, 257, 257), 6604, 6, 0.5, 2.0); - np_ridge_mnt = NoiseParams(0, 12, v3f(743, 743, 743), 5520, 6, 0.7, 2.0); - np_step_mnt = NoiseParams(0, 8, v3f(509, 509, 509), 2590, 6, 0.6, 2.0); - np_mnt_var = NoiseParams(0, 1, v3f(499, 499, 499), 2490, 5, 0.55, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); - np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0); } diff --git a/src/mapgen_flat.cpp b/src/mapgen_flat.cpp index 0343492d8..93f7f73ec 100644 --- a/src/mapgen_flat.cpp +++ b/src/mapgen_flat.cpp @@ -81,12 +81,12 @@ MapgenFlat::~MapgenFlat() } -MapgenFlatParams::MapgenFlatParams() +MapgenFlatParams::MapgenFlatParams(): + np_terrain (0, 1, v3f(600, 600, 600), 7244, 5, 0.6, 2.0), + np_filler_depth (0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0), + np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0), + np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0) { - np_terrain = NoiseParams(0, 1, v3f(600, 600, 600), 7244, 5, 0.6, 2.0); - np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } diff --git a/src/mapgen_fractal.cpp b/src/mapgen_fractal.cpp index 50cb93d8c..eed2239e3 100644 --- a/src/mapgen_fractal.cpp +++ b/src/mapgen_fractal.cpp @@ -82,12 +82,12 @@ MapgenFractal::~MapgenFractal() } -MapgenFractalParams::MapgenFractalParams() +MapgenFractalParams::MapgenFractalParams(): + np_seabed (-14, 9, v3f(600, 600, 600), 41900, 5, 0.6, 2.0), + np_filler_depth (0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0), + np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0), + np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0) { - np_seabed = NoiseParams(-14, 9, v3f(600, 600, 600), 41900, 5, 0.6, 2.0); - np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } diff --git a/src/mapgen_v5.cpp b/src/mapgen_v5.cpp index d7e9d6664..c02d1c125 100644 --- a/src/mapgen_v5.cpp +++ b/src/mapgen_v5.cpp @@ -80,15 +80,15 @@ MapgenV5::~MapgenV5() } -MapgenV5Params::MapgenV5Params() +MapgenV5Params::MapgenV5Params(): + np_filler_depth (0, 1, v3f(150, 150, 150), 261, 4, 0.7, 2.0), + np_factor (0, 1, v3f(250, 250, 250), 920381, 3, 0.45, 2.0), + np_height (0, 10, v3f(250, 250, 250), 84174, 4, 0.5, 2.0), + np_ground (0, 40, v3f(80, 80, 80), 983240, 4, 0.55, 2.0, NOISE_FLAG_EASED), + np_cave1 (0, 12, v3f(50, 50, 50), 52534, 4, 0.5, 2.0), + np_cave2 (0, 12, v3f(50, 50, 50), 10325, 4, 0.5, 2.0), + np_cavern (0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0) { - np_filler_depth = NoiseParams(0, 1, v3f(150, 150, 150), 261, 4, 0.7, 2.0); - np_factor = NoiseParams(0, 1, v3f(250, 250, 250), 920381, 3, 0.45, 2.0); - np_height = NoiseParams(0, 10, v3f(250, 250, 250), 84174, 4, 0.5, 2.0); - np_ground = NoiseParams(0, 40, v3f(80, 80, 80), 983240, 4, 0.55, 2.0, NOISE_FLAG_EASED); - np_cave1 = NoiseParams(0, 12, v3f(50, 50, 50), 52534, 4, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(50, 50, 50), 10325, 4, 0.5, 2.0); - np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0); } diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp index ec097074f..cd337b380 100644 --- a/src/mapgen_v6.cpp +++ b/src/mapgen_v6.cpp @@ -145,19 +145,19 @@ MapgenV6::~MapgenV6() } -MapgenV6Params::MapgenV6Params() +MapgenV6Params::MapgenV6Params(): + np_terrain_base (-4, 20.0, v3f(250.0, 250.0, 250.0), 82341, 5, 0.6, 2.0), + np_terrain_higher (20, 16.0, v3f(500.0, 500.0, 500.0), 85039, 5, 0.6, 2.0), + np_steepness (0.85, 0.5, v3f(125.0, 125.0, 125.0), -932, 5, 0.7, 2.0), + np_height_select (0, 1.0, v3f(250.0, 250.0, 250.0), 4213, 5, 0.69, 2.0), + np_mud (4, 2.0, v3f(200.0, 200.0, 200.0), 91013, 3, 0.55, 2.0), + np_beach (0, 1.0, v3f(250.0, 250.0, 250.0), 59420, 3, 0.50, 2.0), + np_biome (0, 1.0, v3f(500.0, 500.0, 500.0), 9130, 3, 0.50, 2.0), + np_cave (6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0), + np_humidity (0.5, 0.5, v3f(500.0, 500.0, 500.0), 72384, 3, 0.50, 2.0), + np_trees (0, 1.0, v3f(125.0, 125.0, 125.0), 2, 4, 0.66, 2.0), + np_apple_trees (0, 1.0, v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0) { - np_terrain_base = NoiseParams(-4, 20.0, v3f(250.0, 250.0, 250.0), 82341, 5, 0.6, 2.0); - np_terrain_higher = NoiseParams(20, 16.0, v3f(500.0, 500.0, 500.0), 85039, 5, 0.6, 2.0); - np_steepness = NoiseParams(0.85, 0.5, v3f(125.0, 125.0, 125.0), -932, 5, 0.7, 2.0); - np_height_select = NoiseParams(0, 1.0, v3f(250.0, 250.0, 250.0), 4213, 5, 0.69, 2.0); - np_mud = NoiseParams(4, 2.0, v3f(200.0, 200.0, 200.0), 91013, 3, 0.55, 2.0); - np_beach = NoiseParams(0, 1.0, v3f(250.0, 250.0, 250.0), 59420, 3, 0.50, 2.0); - np_biome = NoiseParams(0, 1.0, v3f(500.0, 500.0, 500.0), 9130, 3, 0.50, 2.0); - np_cave = NoiseParams(6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0); - np_humidity = NoiseParams(0.5, 0.5, v3f(500.0, 500.0, 500.0), 72384, 3, 0.50, 2.0); - np_trees = NoiseParams(0, 1.0, v3f(125.0, 125.0, 125.0), 2, 4, 0.66, 2.0); - np_apple_trees = NoiseParams(0, 1.0, v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0); } diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index d27e339ce..53f385b53 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -128,22 +128,22 @@ MapgenV7::~MapgenV7() } -MapgenV7Params::MapgenV7Params() +MapgenV7Params::MapgenV7Params(): + np_terrain_base (4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0), + np_terrain_alt (4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0), + np_terrain_persist (0.6, 0.1, v3f(2000, 2000, 2000), 539, 3, 0.6, 2.0), + np_height_select (-8, 16, v3f(500, 500, 500), 4213, 6, 0.7, 2.0), + np_filler_depth (0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0), + np_mount_height (256, 112, v3f(1000, 1000, 1000), 72449, 3, 0.6, 2.0), + np_ridge_uwater (0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0), + np_floatland_base (-0.6, 1.5, v3f(600, 600, 600), 114, 5, 0.6, 2.0), + np_float_base_height (48, 24, v3f(300, 300, 300), 907, 4, 0.7, 2.0), + np_mountain (-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0), + np_ridge (0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0), + np_cavern (0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0), + np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0), + np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0) { - np_terrain_base = NoiseParams(4, 70, v3f(600, 600, 600), 82341, 5, 0.6, 2.0); - np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0); - np_terrain_persist = NoiseParams(0.6, 0.1, v3f(2000, 2000, 2000), 539, 3, 0.6, 2.0); - np_height_select = NoiseParams(-8, 16, v3f(500, 500, 500), 4213, 6, 0.7, 2.0); - np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 3, 0.7, 2.0); - np_mount_height = NoiseParams(256, 112, v3f(1000, 1000, 1000), 72449, 3, 0.6, 2.0); - np_ridge_uwater = NoiseParams(0, 1, v3f(1000, 1000, 1000), 85039, 5, 0.6, 2.0); - np_floatland_base = NoiseParams(-0.6, 1.5, v3f(600, 600, 600), 114, 5, 0.6, 2.0); - np_float_base_height = NoiseParams(48, 24, v3f(300, 300, 300), 907, 4, 0.7, 2.0); - np_mountain = NoiseParams(-0.6, 1, v3f(250, 350, 250), 5333, 5, 0.63, 2.0); - np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0); - np_cavern = NoiseParams(0, 1, v3f(384, 128, 384), 723, 5, 0.63, 2.0); - np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); } diff --git a/src/mapgen_valleys.cpp b/src/mapgen_valleys.cpp index e4ddc164b..2a9652700 100644 --- a/src/mapgen_valleys.cpp +++ b/src/mapgen_valleys.cpp @@ -124,18 +124,18 @@ MapgenValleys::~MapgenValleys() } -MapgenValleysParams::MapgenValleysParams() +MapgenValleysParams::MapgenValleysParams(): + np_cave1 (0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0), + np_cave2 (0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0), + np_filler_depth (0.f, 1.2f, v3f(256, 256, 256), 1605, 3, 0.5f, 2.f), + np_inter_valley_fill (0.f, 1.f, v3f(256, 512, 256), 1993, 6, 0.8f, 2.f), + np_inter_valley_slope (0.5f, 0.5f, v3f(128, 128, 128), 746, 1, 1.f, 2.f), + np_rivers (0.f, 1.f, v3f(256, 256, 256), -6050, 5, 0.6f, 2.f), + np_massive_caves (0.f, 1.f, v3f(768, 256, 768), 59033, 6, 0.63f, 2.f), + np_terrain_height (-10.f, 50.f, v3f(1024, 1024, 1024), 5202, 6, 0.4f, 2.f), + np_valley_depth (5.f, 4.f, v3f(512, 512, 512), -1914, 1, 1.f, 2.f), + np_valley_profile (0.6f, 0.5f, v3f(512, 512, 512), 777, 1, 1.f, 2.f) { - np_cave1 = NoiseParams(0, 12, v3f(61, 61, 61), 52534, 3, 0.5, 2.0); - np_cave2 = NoiseParams(0, 12, v3f(67, 67, 67), 10325, 3, 0.5, 2.0); - np_filler_depth = NoiseParams(0.f, 1.2f, v3f(256, 256, 256), 1605, 3, 0.5f, 2.f); - np_inter_valley_fill = NoiseParams(0.f, 1.f, v3f(256, 512, 256), 1993, 6, 0.8f, 2.f); - np_inter_valley_slope = NoiseParams(0.5f, 0.5f, v3f(128, 128, 128), 746, 1, 1.f, 2.f); - np_rivers = NoiseParams(0.f, 1.f, v3f(256, 256, 256), -6050, 5, 0.6f, 2.f); - np_massive_caves = NoiseParams(0.f, 1.f, v3f(768, 256, 768), 59033, 6, 0.63f, 2.f); - np_terrain_height = NoiseParams(-10.f, 50.f, v3f(1024, 1024, 1024), 5202, 6, 0.4f, 2.f); - np_valley_depth = NoiseParams(5.f, 4.f, v3f(512, 512, 512), -1914, 1, 1.f, 2.f); - np_valley_profile = NoiseParams(0.6f, 0.5f, v3f(512, 512, 512), 777, 1, 1.f, 2.f); } -- 2.25.1