]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapgen_fractal.h
Set acceleration only once in falling node
[minetest.git] / src / mapgen_fractal.h
index 5800ae20dfe5db9d5ad8cfe51ef0885fb2945b0e..ffb2acfb9ab40530712c1deb94988f7b4ee024ce 100644 (file)
@@ -3,6 +3,9 @@ Minetest
 Copyright (C) 2010-2015 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
 Copyright (C) 2010-2015 paramat, Matt Gregory
 
+Fractal formulas from http://www.bugman123.com/Hypercomplex/index.html
+by Paul Nylander, and from http://www.fractalforums.com, thank you.
+
 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
 the Free Software Foundation; either version 2.1 of the License, or
@@ -25,9 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #define MGFRACTAL_LARGE_CAVE_DEPTH -33
 
-/////////////////// Mapgen Fractal flags
-#define MGFRACTAL_JULIA 0x01
-
 class BiomeManager;
 
 extern FlagDesc flagdesc_mapgen_fractal[];
@@ -36,7 +36,7 @@ extern FlagDesc flagdesc_mapgen_fractal[];
 struct MapgenFractalParams : public MapgenSpecificParams {
        u32 spflags;
 
-       u16 formula;
+       u16 fractal;
        u16 iterations;
        v3f scale;
        v3f offset;
@@ -66,14 +66,17 @@ class MapgenFractal : public Mapgen {
 
        int ystride;
        int zstride;
-       u32 spflags;
+       u16 formula;
+       bool julia;
 
        v3s16 node_min;
        v3s16 node_max;
        v3s16 full_node_min;
        v3s16 full_node_max;
 
-       u16 formula;
+       u32 spflags;
+
+       u16 fractal;
        u16 iterations;
        v3f scale;
        v3f offset;
@@ -111,7 +114,7 @@ class MapgenFractal : public Mapgen {
        ~MapgenFractal();
 
        virtual void makeChunk(BlockMakeData *data);
-       int getGroundLevelAtPoint(v2s16 p);
+       int getSpawnLevelAtPoint(v2s16 p);
        void calculateNoise();
        bool getFractalAtPoint(s16 x, s16 y, s16 z);
        s16 generateTerrain();