refactor(maps): pyramid.yaml per piràmide amb merge a sala

This commit is contained in:
JailDesigner committed 2026-05-13 22:38:42 +02:00
1 parent 5f206e03c8
commit 125cdd0c74
45 files changed
+331 -1085

No files matched your search

+2 -8
View File
@@ -5,8 +5,8 @@
#include <stdexcept>
#include <unordered_map>
#include "core/resources/resource_helper.hpp"
#include "external/fkyaml_node.hpp"
#include "game/map/room_yaml.hpp"
#include "utils/defaults.hpp"
#include "utils/log.hpp"
@@ -157,13 +157,7 @@ namespace Map {
}
void loadFrom(const std::string& yaml_path) {
auto bytes = Resource::Helper::loadFile(yaml_path);
if (bytes.empty()) {
throw std::runtime_error("Map: no s'ha pogut obrir " + yaml_path);
}
const auto* begin = reinterpret_cast<const char*>(bytes.data());
const auto* end = begin + bytes.size();
auto yaml = fkyaml::node::deserialize(begin, end);
auto yaml = RoomYaml::loadMerged(yaml_path);
if (!yaml.contains("geometry")) {
throw std::runtime_error("Map: manca bloc `geometry:` a " + yaml_path);
}