]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapgen_fractal.h
Fix missing #include
[minetest.git] / src / mapgen_fractal.h
index 71729cbed6c170f73970727710a4671520053002..8e52dafeced64594001688e57fcb02b2a5f6ef62 100644 (file)
@@ -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
 
@@ -34,19 +36,21 @@ extern FlagDesc flagdesc_mapgen_fractal[];
 struct MapgenFractalParams : public MapgenSpecificParams {
        u32 spflags;
 
-       u16 iterations;
-       float scale_x;
-       float scale_y;
-       float scale_z;
-       float offset_x;
-       float offset_y;
-       float offset_z;
-       float slice_w;
+       u16 m_iterations;
+       v3f m_scale;
+       v3f m_offset;
+       float m_slice_w;
+
+       u16 j_iterations;
+       v3f j_scale;
+       v3f j_offset;
+       float j_slice_w;
        float julia_x;
        float julia_y;
        float julia_z;
        float julia_w;
 
+       NoiseParams np_seabed;
        NoiseParams np_cave1;
        NoiseParams np_cave2;
 
@@ -71,19 +75,22 @@ class MapgenFractal : public Mapgen {
        v3s16 full_node_min;
        v3s16 full_node_max;
 
-       u16 iterations;
-       float scale_x;
-       float scale_y;
-       float scale_z;
-       float offset_x;
-       float offset_y;
-       float offset_z;
-       float slice_w;
+       u16 m_iterations;
+       v3f m_scale;
+       v3f m_offset;
+       float m_slice_w;
+
+       u16 j_iterations;
+       v3f j_scale;
+       v3f j_offset;
+       float j_slice_w;
        float julia_x;
        float julia_y;
        float julia_z;
        float julia_w;
 
+       Noise *noise_seabed;
+
        Noise *noise_cave1;
        Noise *noise_cave2;
 
@@ -111,7 +118,7 @@ class MapgenFractal : public Mapgen {
        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();