update world generation pipeline

This commit is contained in:
MihailRis
2024-09-21 23:29:19 +03:00
parent f4793ac9db
commit 001b930212
9 changed files with 28 additions and 20 deletions
@@ -39,6 +39,7 @@ namespace lua {
std::shared_ptr<Heightmap> map;
std::unique_ptr<fnl_state> noise;
public:
LuaHeightmap(const std::shared_ptr<Heightmap>& map);
LuaHeightmap(uint width, uint height);
virtual ~LuaHeightmap();
@@ -16,6 +16,10 @@
using namespace lua;
LuaHeightmap::LuaHeightmap(const std::shared_ptr<Heightmap>& map)
: map(map), noise(std::make_unique<fnl_state>(fnlCreateState())) {
}
LuaHeightmap::LuaHeightmap(uint width, uint height)
: map(std::make_shared<Heightmap>(width, height)),
noise(std::make_unique<fnl_state>(fnlCreateState()))