Stage 7b: model/xml.cpp reads and writes tinyxml2 directly; Element tree removed
- Reading goes from tinyxml2 straight into the typed model, including legacy layouts (flat GroupId groups, *AnimationGroups with Index, FrameRestore backups, baked frames, SoundId, Overlay) and load-time id/region repair. - Writing builds an XmlNode tree from the typed model for a set of flags: id renumbering, region sync, group-root and interpolation baking happen on typed data; groups are nested or extracted the way the old pipeline did. - Unknown XML is kept verbatim (XmlNode) instead of being re-emitted through the Element writer. - model_hash is an FNV hash of the editor-format node tree (what a save would write); the per-fixture hash goldens are gone. - Deletes src/anm2 (Element, normalize, groups, hash, xml) and the unused util/xml attribute helpers and ElementType/ItemType table columns. - All goldens, invariants and the local corpus are byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0b6f67d9bd
commit
e50d76c784
33 files changed
+1386
-2935
No files matched your search
@@ -64,13 +64,8 @@ namespace anm2ed::test
|
||||
inline std::vector<Variant> variants_get(const model::Model& model)
|
||||
{
|
||||
std::vector<Variant> variants{};
|
||||
std::string hashes{};
|
||||
for (auto [name, flags] : PRESETS)
|
||||
{
|
||||
variants.emplace_back(name, model::model_serialize(model, flags));
|
||||
for (auto [formatName, isExtended] : FORMATS)
|
||||
hashes += std::format("{}.{} {:016x}\n", name, formatName, model::model_hash(model, {flags, isExtended}));
|
||||
}
|
||||
for (auto [name, isExtended] : FORMATS)
|
||||
variants.emplace_back(name, model::model_to_string(model, {.isExtendedFormat = isExtended}));
|
||||
for (auto [name, type] : MERGES)
|
||||
@@ -81,7 +76,6 @@ namespace anm2ed::test
|
||||
{});
|
||||
variants.emplace_back(name, model::model_to_string(merged, {.isExtendedFormat = true}));
|
||||
}
|
||||
variants.emplace_back("hashes", hashes);
|
||||
return variants;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user