summaryrefslogtreecommitdiff
path: root/src/mapgen_indev.h
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-06-01 13:18:52 +0200
committerWeblate <42@minetest.ru>2013-06-01 13:18:52 +0200
commit1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124 (patch)
tree54660f353f3342f89b6259ea6a5dfedfa20dc16f /src/mapgen_indev.h
parentec039a3d123120f9918812b13f5971e94546b9af (diff)
parent64627817fcca52f20948c24b60ce192b218f6ce2 (diff)
downloadminetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.tar.gz
minetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.tar.bz2
minetest-1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124.zip
Merge remote-tracking branch 'origin/master'
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;
}