From 3570f3e396acad4a6b5381d06c2dae5cf4e95fbd Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 15 Feb 2014 18:20:15 -0500 Subject: Add minetest.set_noiseparam_defaults() Lua API --- src/noise.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/noise.h') diff --git a/src/noise.h b/src/noise.h index 074bedb92..9f9e2af6d 100644 --- a/src/noise.h +++ b/src/noise.h @@ -85,8 +85,11 @@ struct NoiseParams { // Convenience macros for getting/setting NoiseParams in Settings -#define getNoiseParams(x, y) getStruct((x), "f,f,v3,s32,s32,f", &(y), sizeof(y)) -#define setNoiseParams(x, y) setStruct((x), "f,f,v3,s32,s32,f", &(y)) + +#define NOISEPARAMS_FMT_STR "f,f,v3,s32,s32,f" + +#define getNoiseParams(x, y) getStruct((x), NOISEPARAMS_FMT_STR, &(y), sizeof(y)) +#define setNoiseParams(x, y) setStruct((x), NOISEPARAMS_FMT_STR, &(y)) class Noise { public: -- cgit v1.2.3