add generator layers

This commit is contained in:
MihailRis
2024-08-17 18:11:52 +03:00
parent 30925df319
commit 2a767a3638
7 changed files with 125 additions and 14 deletions
+18
View File
@@ -6,12 +6,30 @@
#include "typedefs.hpp"
#include "maths/Heightmap.hpp"
class Content;
struct BlocksLayer {
std::string block;
int height;
struct {
blockid_t id;
} rt;
};
class GeneratorScript {
public:
virtual ~GeneratorScript() = default;
virtual std::shared_ptr<Heightmap> generateHeightmap(
const glm::ivec2& offset, const glm::ivec2& size) = 0;
virtual const std::vector<BlocksLayer>& getLayers() const = 0;
/// @brief Total height of all layers after resizeable one
virtual uint getLastLayersHeight() const = 0;
virtual void prepare(const Content* content) = 0;
};
struct GeneratorDef {