X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgenerator.hpp;h=dedfb72b7c94fc5461bf795accf09d33f9b86542;hb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;hp=b3e8ffb0ad2f55045986eaca85d95d365fa80722;hpb=774253e509ce13881229efda8849bf6f3c47b665;p=blank.git diff --git a/src/generator.hpp b/src/generator.hpp index b3e8ffb..dedfb72 100644 --- a/src/generator.hpp +++ b/src/generator.hpp @@ -13,12 +13,19 @@ namespace blank { class Generator { public: - explicit Generator(unsigned int seed); + struct Config { + unsigned int solid_seed = 0; + unsigned int type_seed = 0; + float stretch = 64.0f; + float solid_threshold = 0.5f; + }; - void operator ()(Chunk &) const; + explicit Generator(const Config &) noexcept; - void Space(Block::Type t) { space = t; } - void Light(Block::Type t) { light = t; } + void operator ()(Chunk &) const noexcept; + + void Space(Block::Type t) noexcept { space = t; } + void Light(Block::Type t) noexcept { light = t; } void Solids(const std::vector &s) { solids = s; } private: