aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/mapgen_valleys.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-04-24 01:34:48 +0100
committerGitHub <noreply@github.com>2018-04-24 01:34:48 +0100
commit534971ccd0a2b0bf4bfb6c7345c457e92f252fcc (patch)
tree930dffa2d795c1446b140629694e3aa312df3c3c /src/mapgen/mapgen_valleys.h
parent06dd7c051c7f1a6f5cc5dff0ed5b60a707422ea4 (diff)
downloadhax-minetest-server-534971ccd0a2b0bf4bfb6c7345c457e92f252fcc.tar.gz
hax-minetest-server-534971ccd0a2b0bf4bfb6c7345c457e92f252fcc.zip
Mgvalleys: Code cleanup
Split some long lines. Edit comments. Remove unnecessary comments and unnecessary commented-out code. Use std::fmax/fmin instead of MYMAX/MYMIN. Remove scope-limiting braces. Consistently define literals as floats, except in noise parameters. Cleanup literals in noise parameters. Remove unnecessary 'near_cavern' line. Reduce max spawn y to be consistent with other mapgens.
Diffstat (limited to 'src/mapgen/mapgen_valleys.h')
-rw-r--r--src/mapgen/mapgen_valleys.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mapgen/mapgen_valleys.h b/src/mapgen/mapgen_valleys.h
index c4d92239c..f6a486d86 100644
--- a/src/mapgen/mapgen_valleys.h
+++ b/src/mapgen/mapgen_valleys.h
@@ -32,23 +32,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define MGVALLEYS_ALT_CHILL 0x01
#define MGVALLEYS_HUMID_RIVERS 0x02
-// Feed only one variable into these.
+// Feed only one variable into these
#define MYSQUARE(x) (x) * (x)
#define MYCUBE(x) (x) * (x) * (x)
class BiomeManager;
class BiomeGenOriginal;
-// Global profiler
-//class Profiler;
-//extern Profiler *mapgen_profiler;
-
struct MapgenValleysParams : public MapgenParams {
u32 spflags = MGVALLEYS_HUMID_RIVERS | MGVALLEYS_ALT_CHILL;
- u16 altitude_chill = 90; // The altitude at which temperature drops by 20C.
- u16 river_depth = 4; // How deep to carve river channels.
- u16 river_size = 5; // How wide to make rivers.
+ u16 altitude_chill = 90; // The altitude at which temperature drops by 20C
+ u16 river_depth = 4; // How deep to carve river channels
+ u16 river_size = 5; // How wide to make rivers
float cave_width = 0.09f;
s16 large_cave_depth = -33;
@@ -122,9 +118,7 @@ private:
Noise *noise_valley_profile;
float terrainLevelAtPoint(s16 x, s16 z);
-
void calculateNoise();
-
virtual int generateTerrain();
float terrainLevelFromNoise(TerrainNoise *tn);
float adjustedTerrainLevelFromNoise(TerrainNoise *tn);