summaryrefslogtreecommitdiff
path: root/src/mapgen_indev.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen_indev.h')
-rw-r--r--src/mapgen_indev.h59
1 files changed, 31 insertions, 28 deletions
diff --git a/src/mapgen_indev.h b/src/mapgen_indev.h
index 87ae39d09..cfef59041 100644
--- a/src/mapgen_indev.h
+++ b/src/mapgen_indev.h
@@ -32,30 +32,33 @@ struct NoiseIndevParams : public NoiseParams {
float farscale;
float farspread;
- NoiseIndevParams(){}
- NoiseIndevParams(float offset_, float scale_, v3f spread_, int seed_, int octaves_, float persist_, float farscale_ = 1, float farspread_ = 1)
+ NoiseIndevParams() {}
+ NoiseIndevParams(float offset_, float scale_, v3f spread_,
+ int seed_, int octaves_, float persist_,
+ float farscale_ = 1, float farspread_ = 1)
{
- offset = offset_;
- scale = scale_;
- spread = spread_;
- seed = seed_;
+ offset = offset_;
+ scale = scale_;
+ spread = spread_;
+ seed = seed_;
octaves = octaves_;
persist = persist_;
- farscale = farscale_;
+ farscale = farscale_;
farspread = farspread_;
}
-
+
+ ~NoiseIndevParams() {}
};
-#define getNoiseIndevParams(x) getStruct<NoiseIndevParams>((x), "f,f,v3,s32,s32,f,f,f")
-#define setNoiseIndevParams(x, y) setStruct((x), "f,f,v3,s32,s32,f,f,f", (y))
+#define getNoiseIndevParams(x, y) getStruct((x), "f,f,v3,s32,s32,f,f,f", &(y), sizeof(y))
+#define setNoiseIndevParams(x, y) setStruct((x), "f,f,v3,s32,s32,f,f,f", &(y))
class NoiseIndev : public Noise {
- public:
+public:
NoiseIndevParams *npindev;
- //NoiseIndev() {};
+ virtual ~NoiseIndev() {};
NoiseIndev(NoiseIndevParams *np, int seed, int sx, int sy);
NoiseIndev(NoiseIndevParams *np, int seed, int sx, int sy, int sz);
void init(NoiseIndevParams *np, int seed, int sx, int sy, int sz);
@@ -77,34 +80,34 @@ extern NoiseIndevParams nparams_indev_def_float_islands;
*/
struct MapgenIndevParams : public MapgenV6Params {
- NoiseIndevParams *npindev_terrain_base;
- NoiseIndevParams *npindev_terrain_higher;
- NoiseIndevParams *npindev_steepness;
+ NoiseIndevParams npindev_terrain_base;
+ NoiseIndevParams npindev_terrain_higher;
+ NoiseIndevParams npindev_steepness;
//NoiseParams *np_height_select;
//NoiseParams *np_trees;
- NoiseIndevParams *npindev_mud;
+ NoiseIndevParams npindev_mud;
//NoiseParams *np_beach;
- NoiseIndevParams *npindev_biome;
+ NoiseIndevParams npindev_biome;
//NoiseParams *np_cave;
- NoiseIndevParams *npindev_float_islands1;
- NoiseIndevParams *npindev_float_islands2;
- NoiseIndevParams *npindev_float_islands3;
+ NoiseIndevParams npindev_float_islands1;
+ NoiseIndevParams npindev_float_islands2;
+ NoiseIndevParams npindev_float_islands3;
MapgenIndevParams() {
//freq_desert = 0.45;
//freq_beach = 0.15;
- npindev_terrain_base = &nparams_indev_def; //&nparams_indev_def_terrain_base;
- npindev_terrain_higher = &nparams_indev_def; //&nparams_indev_def_terrain_higher;
- npindev_steepness = &nparams_indev_def; //&nparams_indev_def_steepness;
+ npindev_terrain_base = nparams_indev_def; //&nparams_indev_def_terrain_base;
+ npindev_terrain_higher = nparams_indev_def; //&nparams_indev_def_terrain_higher;
+ npindev_steepness = nparams_indev_def; //&nparams_indev_def_steepness;
//np_height_select = &nparams_v6_def_height_select;
//np_trees = &nparams_v6_def_trees;
- npindev_mud = &nparams_indev_def; //&nparams_indev_def_mud;
+ npindev_mud = nparams_indev_def; //&nparams_indev_def_mud;
//np_beach = &nparams_v6_def_beach;
- npindev_biome = &nparams_indev_def; //&nparams_indev_def_biome;
+ npindev_biome = nparams_indev_def; //&nparams_indev_def_biome;
//np_cave = &nparams_v6_def_cave;
- npindev_float_islands1 = &nparams_indev_def; //&nparams_indev_def_float_islands;
- npindev_float_islands2 = &nparams_indev_def; //&nparams_indev_def_float_islands;
- npindev_float_islands3 = &nparams_indev_def; //&nparams_indev_def_float_islands;
+ npindev_float_islands1 = nparams_indev_def; //&nparams_indev_def_float_islands;
+ npindev_float_islands2 = nparams_indev_def; //&nparams_indev_def_float_islands;
+ npindev_float_islands3 = nparams_indev_def; //&nparams_indev_def_float_islands;
}