Documents can be saved as the editor's own JSON (Save as JSON, in Configure's
Serialization row, off by default) and any .anm2 starting with '{' opens as
one. The schema is new, not an XML mirror: content items in arrays (an item's
index is its id), animations keyed by unique name (a repeat saves as "Name 2"),
groups nested, paired values as arrays, a frame on a region storing only the
region, ISO 8601 dates, every default left out, and one line per frame and
content item, with anything else that fits in 100 columns on one line. Unknown
XML isn't kept. Each part is described once (frame_io, track_io, model_io...)
and run by a JsonWriter or a JsonReader; simdjson parses (new submodule). A
JSON file that opens but has unknown keys, wrong types, unknown values or bad
indices lists them by location in a warning toast; libraries toast their load
problems too. With Save as JSON on, saving always shows the Isaac warning.
The extended format is gone: no setting, File menu toggle, ExtendedVersion or
isExtendedFormat. XML saves are always the game's copy with SourceDocument;
old extended files still open. Document saves take Options instead of loose
bools, and model_load reads through model_load_string. docs/json_format.md
replaces docs/extended_format.md; goldens lose ExtendedVersion and the
.extended variants.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Dead code: util/map, util/unordered_map, unused vector/math/string/input
helpers, Document getters, special-interpolation bake leftovers,
triggers_sort, SnapshotStack::max_size_get, AudioStream capture API.
- Merges: util/xml, util/string, resource/strings.cpp inlined; constants
into input.hpp; tooltip into layout; Recorder into render; onionskin,
tools, welcome and frame properties are panel functions; timeline
popups.cpp folded into timeline.cpp.
- util/origin.hpp replaced by model Origin (the merge setting stays a
combo index, so saved preferences keep their meaning).
- Item type names/icons/colors moved from model/common.hpp to the
timeline header; the model no longer includes icon/strings headers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- src/model: typed Model (Info, Content, nested TrackGroup/AnimationGroup,
copy-on-write shared animations, Extras/XmlNode passthrough for unknown XML,
layout vectors so saves stay byte-identical).
- src/edit, Document, Selection, Snapshots, every window, the timeline, wizards
and popups now read and edit model::Model; no UI code touches Element.
- anm2/ is reduced to the XML reader/writer/normalizer behind model/xml.cpp;
dead Element operations (merge, regions, item_add, rect, frame helpers,
element_get/unused, deserialize) are deleted.
- Goldens, invariants, undo walk and the local corpus (1,251 files) match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- anm2ed_core static library (anm2 + non-UI util + log) shared by app and tests
- Logger is inert until session_open, so the core has no SDL dependency
- doctest suite: golden round-trips of 12 synthetic fixtures across every
serialization preset, format and merge type; save/reload invariants
(fixed point, hash stability, game view equals re-baked game view);
operation goldens; env-gated private corpus run (ANM2ED_CORPUS)
- ANM2ED_UPDATE_GOLDEN=1 regenerates goldens; tests/MANUAL.md UI checklist
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>