XML data layer: pugixml (external/pugixml, v1.15), a format-neutral DataNode API for every loader, DataFormat=auto|json|xml (default xml), KAGE's archive file system ported (index once, four unpackers, the original's mount order) so --resources can point at an install's resources/ with no import step, the original XML .anm2 loader beside Anm2Ed JSON, mods' own XML; 72 goldens identical from converted resources and from the install
This commit is contained in:
1 parent
74322af121
commit
6d8a43775d
52 files changed
+1513
-909
No files matched your search
@@ -122,14 +122,7 @@ static bool is_text_true(std::string_view text)
|
||||
// Calls visit with each attribute's name and text, in document order.
|
||||
template <typename Visit> static void attrs_visit(DataNode node, Visit visit)
|
||||
{
|
||||
simdjson::dom::object attrs;
|
||||
if (node["attrs"].get(attrs) != simdjson::SUCCESS) return;
|
||||
|
||||
for (simdjson::dom::key_value_pair attr : attrs)
|
||||
{
|
||||
std::string_view text;
|
||||
if (attr.value.get(text) == simdjson::SUCCESS) visit(attr.key, text);
|
||||
}
|
||||
for (auto [name, text] : node_attrs(node)) visit(name, text);
|
||||
}
|
||||
|
||||
// Calls visit with the children from the first one tagged tag on, as the game walks them: rapidxml's first_node(tag),
|
||||
|
||||
Reference in new issue
Block a user