working on chunk generation

This commit is contained in:
2025-05-09 18:29:41 +02:00
parent 8c94d86fd4
commit 18dd89f485
10 changed files with 221 additions and 23 deletions

View File

@@ -13,13 +13,18 @@ class World
World(Scop::Scene& scene);
[[nodiscard]] inline Scop::Scene& GetScene() noexcept { return m_scene; }
[[nodiscard]] inline std::shared_ptr<Scop::Material> GetBlockMaterial() const { return p_block_material; }
[[nodiscard]] Chunk& GetChunk(Scop::Vec2i position);
~World() = default;
private:
void GenerateWorld();
private:
static inline constexpr std::size_t CHUNKS_SIZE = 16;
std::vector<std::vector<Chunk>> m_chunks;
std::vector<Chunk> m_chunks;
std::shared_ptr<Scop::Material> p_block_material;
Scop::Narrator& m_narrator;
Scop::Scene& m_scene;