From 2b8180a417465845759096670f498bf71cd39403 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Fri, 12 Dec 2014 02:02:26 -0500 Subject: Add support for NoiseParams in minetest.get_perlin() and add docs on NoiseParams to lua_api.txt --- src/script/lua_api/l_noise.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/script/lua_api/l_noise.h') diff --git a/src/script/lua_api/l_noise.h b/src/script/lua_api/l_noise.h index 6f6173fc2..6e3029aef 100644 --- a/src/script/lua_api/l_noise.h +++ b/src/script/lua_api/l_noise.h @@ -29,10 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc., */ class LuaPerlinNoise : public ModApiBase { private: - int seed; - int octaves; - float persistence; - float scale; + NoiseParams np; + static const char className[]; static const luaL_reg methods[]; @@ -45,9 +43,7 @@ private: static int l_get3d(lua_State *L); public: - LuaPerlinNoise(int a_seed, int a_octaves, float a_persistence, - float a_scale); - + LuaPerlinNoise(NoiseParams *params); ~LuaPerlinNoise(); // LuaPerlinNoise(seed, octaves, persistence, scale) -- cgit v1.2.3