add generator layers
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user