refactor blocks layers

This commit is contained in:
MihailRis
2024-08-18 16:54:58 +03:00
parent af485dd7cb
commit 2a506e9891
4 changed files with 71 additions and 85 deletions
+7 -6
View File
@@ -18,6 +18,11 @@ struct BlocksLayer {
} rt;
};
struct BlocksLayers {
std::vector<BlocksLayer> layers;
uint lastLayersHeight;
};
class GeneratorScript {
public:
virtual ~GeneratorScript() = default;
@@ -25,12 +30,8 @@ public:
virtual std::shared_ptr<Heightmap> generateHeightmap(
const glm::ivec2& offset, const glm::ivec2& size, uint64_t seed) = 0;
virtual const std::vector<BlocksLayer>& getLayers() const = 0;
virtual const std::vector<BlocksLayer>& getSeaLayers() const = 0;
/// @brief Total height of all layers after resizeable one
virtual uint getLastLayersHeight() const = 0;
virtual uint getLastSeaLayersHeight() const = 0;
virtual const BlocksLayers& getGroundLayers() const = 0;
virtual const BlocksLayers& getSeaLayers() const = 0;
virtual uint getSeaLevel() const = 0;