Some minor cleanups from the last commit
authorkwolekr <kwolekr@minetest.net>
Sun, 17 Mar 2013 02:34:12 +0000 (22:34 -0400)
committerkwolekr <kwolekr@minetest.net>
Sun, 17 Mar 2013 02:34:12 +0000 (22:34 -0400)
src/mapgen_indev.cpp
src/mapgen_v6.cpp
src/mapgen_v6.h
src/noise.cpp

index e9ab36ae9e74fd5640305cce11092aac7903fedf..4de4fd55fedff812de47c723cc19664d7d9bc099 100644 (file)
@@ -191,6 +191,7 @@ float MapgenIndev::baseTerrainLevelFromNoise(v2s16 p) {
                                                        steepness,    height_select);
 }
 
+
 float MapgenIndev::baseTerrainLevelFromMap(int index) {
        if (flags & MG_FLAT)
                return water_level;
@@ -204,6 +205,7 @@ float MapgenIndev::baseTerrainLevelFromMap(int index) {
                                                        steepness,    height_select);
 }
 
+
 float MapgenIndev::getMudAmount(int index)
 {
        if (flags & MG_FLAT)
@@ -216,6 +218,7 @@ float MapgenIndev::getMudAmount(int index)
        return noiseindev_mud->result[index];
 }
 
+
 void MapgenIndev::defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool large_cave) {
        cave.min_tunnel_diameter = 2;
        cave.max_tunnel_diameter = ps.range(2,6);
@@ -243,4 +246,4 @@ void MapgenIndev::defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool
                cave.tunnel_routepoints = ps.range(10, ps.range(15,30));
        }
        cave.large_cave_is_flat = (ps.range(0,1) == 0);
-};
+}
index 91947df846bb35c3a5ef460b3962569656f59d43..5f428bb8f2e417e260190b8b2fcdada6b85a90f2 100644 (file)
@@ -878,13 +878,12 @@ void MapgenV6::growGrass() {
        }
 }
 
-void MapgenV6::defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool large_cave) {
+void MapgenV6::defineCave(Cave &cave, PseudoRandom ps,
+                                                v3s16 node_min, bool large_cave) {
                cave.min_tunnel_diameter = 2;
                cave.max_tunnel_diameter = ps.range(2,6);
                cave.dswitchint = ps.range(1,14);
-               //cave.tunnel_routepoints = 0;
-               //cave.part_max_length_rs = 0;
-               cave.flooded = large_cave && ps.range(0,4);
+               cave.flooded = true; //large_cave && ps.range(0,4);
                if(large_cave){
                        cave.part_max_length_rs = ps.range(2,4);
                        cave.tunnel_routepoints = ps.range(5, ps.range(15,30));
@@ -895,7 +894,8 @@ void MapgenV6::defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool lar
                        cave.tunnel_routepoints = ps.range(10, ps.range(15,30));
                }
                cave.large_cave_is_flat = (ps.range(0,1) == 0);
-};
+}
+
 
 void MapgenV6::generateCaves(int max_stone_y) {
        // 24ms @cs=8
index 34de7c0ed6e87fbf25c0213f4edb8b8da8d345a0..662aed2ce8ec67af9ad730b59b0769e091f22f17 100644 (file)
@@ -157,7 +157,6 @@ public:
        
        u32 get_blockseed(u64 seed, v3s16 p);
        
-       
        virtual void calculateNoise();
        int generateGround();
        void addMud();
@@ -165,7 +164,8 @@ public:
        void addDirtGravelBlobs();
        void growGrass();
        void placeTrees();
-       virtual void defineCave(Cave & cave, PseudoRandom ps, v3s16 node_min, bool large_cave);
+       virtual void defineCave(Cave &cave, PseudoRandom ps,
+                                                       v3s16 node_min, bool large_cave);
        void generateCaves(int max_stone_y);
 };
 
index ba7c30574a8cbd5357d3dbf1860a8e40c6a63b4e..49b5f7e581d742a2138387694e844c00faea9fa0 100644 (file)
@@ -524,7 +524,6 @@ float *Noise::perlinMap2D(float x, float y) {
                for (j = 0; j != sy; j++) {
                        for (i = 0; i != sx; i++) {
                                result[index] += g * buf[index];
-//dstream << "pm2d i="<<index<<" r="<< result[index]<<std::endl;
                                index++;
                        }
                }