diff options
author | paramat <mat.gregory@virginmedia.com> | 2015-10-07 02:05:03 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2015-10-07 06:43:46 +0100 |
commit | 706e7cebeada1f3f1f060de8a4c6f1127f4209ad (patch) | |
tree | e535f1bcdc0a8a06a7822d7f7943fe0558ba2419 /src/mapgen_fractal.h | |
parent | d152b55971a57f76211f3db07e864cac015edff2 (diff) | |
download | minetest-706e7cebeada1f3f1f060de8a4c6f1127f4209ad.tar.gz minetest-706e7cebeada1f3f1f060de8a4c6f1127f4209ad.tar.bz2 minetest-706e7cebeada1f3f1f060de8a4c6f1127f4209ad.zip |
Fractal mapgen: Add seabed and large pseudorandom caves
Diffstat (limited to 'src/mapgen_fractal.h')
-rw-r--r-- | src/mapgen_fractal.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mapgen_fractal.h b/src/mapgen_fractal.h index 71729cbed..75243f4f1 100644 --- a/src/mapgen_fractal.h +++ b/src/mapgen_fractal.h @@ -1,7 +1,7 @@ /* Minetest -Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net> -Additional development and fractal code by paramat +Copyright (C) 2010-2015 kwolekr, Ryan Kwolek <kwolekr@minetest.net> +Copyright (C) 2010-2015 paramat, Matt Gregory This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -23,6 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapgen.h" +#define MGFRACTAL_LARGE_CAVE_DEPTH -32 + /////////////////// Mapgen Fractal flags #define MGFRACTAL_JULIA 0x01 @@ -47,6 +49,7 @@ struct MapgenFractalParams : public MapgenSpecificParams { float julia_z; float julia_w; + NoiseParams np_seabed; NoiseParams np_cave1; NoiseParams np_cave2; @@ -84,6 +87,8 @@ public: float julia_z; float julia_w; + Noise *noise_seabed; + Noise *noise_cave1; Noise *noise_cave2; @@ -111,7 +116,7 @@ public: virtual void makeChunk(BlockMakeData *data); int getGroundLevelAtPoint(v2s16 p); void calculateNoise(); - bool getTerrainAtPoint(s16 x, s16 y, s16 z); + bool getFractalAtPoint(s16 x, s16 y, s16 z); s16 generateTerrain(); MgStoneType generateBiomes(float *heat_map, float *humidity_map); void dustTopNodes(); |