]> git.localhorst.tv Git - blank.git/blobdiff - src/generator.hpp
minor optimizations in chunk
[blank.git] / src / generator.hpp
index b3e8ffb0ad2f55045986eaca85d95d365fa80722..dedfb72b7c94fc5461bf795accf09d33f9b86542 100644 (file)
@@ -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<Block::Type> &s) { solids = s; }
 
 private: