#include #include #include NoiseCollection::NoiseCollection(const std::uint32_t seed) { m_collection["terrain"] = std::make_unique(seed); m_collection["caves"] = std::make_unique(seed); // TODO !!!!!! } void NoiseCollection::AddNoise(const std::string& key, std::unique_ptr noise) { m_collection[key] = std::move(noise); } Noise* NoiseCollection::GetNoise(const std::string key) const { auto it = m_collection.find(key); if (it != m_collection.end()) return it->second.get(); Scop::FatalError("A non existant Noise has been requested"); return nullptr; } [[nodiscard]] std::array NoiseCollection::GetBlocks(Scop::Vec2i pos) { return m_collection["terrain"]->GetHeight(pos); }