/*
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
#include "mapgen.h"
+#define MGFRACTAL_LARGE_CAVE_DEPTH -32
+
/////////////////// Mapgen Fractal flags
#define MGFRACTAL_JULIA 0x01
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;
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;
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();