Commit Graph
24 Commits
Author SHA1 Message Date
shweetandClaude Opus 5.5 4a13c345ef Rebirth saves keep children's trigger events; ExtendedVersion 2
Flattening adds the events animation layers' children fire to the
animation's triggers on those frames (events matched by name, added when
missing). Extended documents now write ExtendedVersion="2", for files that
may hold libraries, animation layers, child playback, several events per
trigger, alpha offsets and blur.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:43:15 -04:00
shweetandClaude Opus 5.5 0e705e43fa Animation layers in the timeline: child tracks, stepping in, breadcrumb
An animation layer's row shows a folder; opening it lists its child's tracks
underneath, greyed and read only, with each keyframe drawn where the parent
reaches it. Double-clicking the row (or a child row) steps into the child:
its animation in this tab, or its library's tab (opened if need be), at the
time the parent plays it. A breadcrumb above the timeline leads back out, and
the preview draws the parent around the child, dimmed and frozen where it was
stepped in from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:35:29 -04:00
shweetandClaude Opus 5.5 8807096170 Rebirth saves flatten animation layers; missing animations show red; pivot paths follow libraries
A Rebirth document's game copy turns each animation layer into plain layers,
one per layer its child draws, baked a frame at a time (runs of identical
frames merged; skew dropped), adding library spritesheets at paths relative to
the document; the editor's copy is unchanged and the Isaac warning says so.
Layers whose animation isn't in its file are drawn red in the Layers window
(nothing is said while a library hasn't loaded). Onionskin pivot paths are
redrawn when a library loads or reloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:16:35 -04:00
shweetandClaude Opus 5.5 76c2186c81 Child triggers fire; Auto Resource Reload; animation layer labels
Playback, renders and the preview's event label include the triggers of
child animations (from this file or a library) as each child reaches them;
libraries' sounds load with them, and a frame can mix several sounds. The
reload setting is now Auto Resource Reload and covers libraries too.
Animation layers are labeled by their animation (not a spritesheet) in the
timeline and Item Properties as well as the Layers window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:06:47 -04:00
shweetandClaude Opus 5.5 280adaa189 SVG sheets: draw tool hint, convert to PNG for Rebirth; game copy skips built-in events
Drawing or erasing on an SVG spritesheet shows why it can't be edited (and
no longer leaves an empty undo step). Saving a Rebirth document whose layers
show SVG spritesheets first offers to convert them into PNGs beside them
(one undoable edit); keeping them counts them in the Isaac warning. The
game's copy of a trigger keeps its first event that isn't stop or done, and
only further custom events count as dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:56:06 -04:00
shweetandClaude Opus 5.5 a917d8ae97 SVG spritesheets
An .svg spritesheet loads through lunasvg (now part of the core library) at
one pixel per SVG unit, so regions, crops and picking work as for PNGs. The
preview, renders and CLI draw it again, cached per power-of-two zoom level up
to 8x, so it stays sharp when zoomed or scaled. Its pixels aren't edited
(pencil, eraser, pack and merge leave it alone, and Save skips it), and the
Isaac warning counts SVG sheets since the game can't load them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:41:57 -04:00
shweetandClaude Opus 5.5 b31a28ebe9 Several events per trigger, built-in stop and done events
A trigger holds a list of events (Frame Properties lists them like sounds);
the first stays its EventId, the rest are <Event Id> children in the
editor's copy, and the Isaac warning counts the dropped ones. In extended
documents, stop and done are offered as built-in events: listed in italics
at the top of Events, locked from renaming, and added to the file when a
trigger first uses one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:35:11 -04:00
shweetandClaude Opus 5.5 4375844c84 Alpha color offset
Color Offset gains an alpha channel (Frame Properties, Change All, property
copy, interpolation and root folding), drawn by adding it to the texel's
alpha. Saved as AlphaOffset in the editor's copy only and counted by the
Isaac warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:22:15 -04:00
shweetandClaude Opus 5.5 0adb0f89bc Frame Blur (Flash's blur filter), child properties in Change All Frame Properties, flips under Visible
Blur is a layer frame's box blur, as Flash's low-quality BlurFilter: a box that many canvas pixels wide, averaged
over the frame's crop (premultiplied) by the texture shader, the quad grown by its reach. An animation layer blurs
its child's draws at least as much. It interpolates, copies, batches (clamped to 0-255), saves as an editor-only
Blur attribute and counts as an Isaac issue.

Change All Frame Properties gains the Child section (animation, mode, start frame, random, restart), applied only
to animation layers and disabled when no animation layer is targeted. Frame Properties' Flip X/Y sit below Visible
instead of inside Child.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:16:49 -04:00
shweetandClaude Opus 5.5 d1a6d89d14 Libraries window, animation layers and child playback
A Libraries window (docked with Spritesheets and Sounds) links other .anm2
files: cards list each one's animations, open it as a tab, and reload when
it changes on disk. A layer's Source is a spritesheet or an animation, from
this file or a library; the preview, renders and CLI draw the child in the
layer's frame. Animation-layer keyframes set the child's animation, mode
(loop, once, hold), start frame (or random) and restart; Child is also a
copyable frame property. All of it is editor-only and counted by the Isaac
warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:51:48 -04:00
shweetandClaude Opus 5.5 6edf5f0e5b Per-document target: Extended or Rebirth
A document remembers whether it saves as the editor's document alone (marked
with ExtendedVersion on Info) or as Rebirth's document with the editor's copy
embedded. Detected on open; File > Extended Format toggles it (undoable). The
setting is now the default for new files, and the Isaac compatibility warning
only applies to Rebirth documents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:14:25 -04:00
shweetandClaude Opus 5.5 1381824fb7 Rename Shear to Skew
The property, tool, settings, strings and saved attribute are now Skew
(SkewX/SkewY in the editor's copy). Files with ShearX/ShearY still load,
and settings saved under the old names carry over. Goldens differ only in
the attribute name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:42:36 -04:00
shweetandClaude Opus 5.5 a440af3c95 Change All Frame Properties: Depth
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:24:05 -04:00
shweetandClaude Opus 5.5 f3fb7d5101 Layer frame depth: change a layer's draw order for part of an animation
Layer frames get an editor-only Depth (Frame Properties, property
copy/paste): +N draws that layer N layers above its place in the timeline
for that frame, -N below; stepped, not interpolated. The draw list orders
layers by it (preview, renders, CLI). Saved as Depth in the editor's copy
only; the Isaac Compatibility Warning and anm2ed info count frames using it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 01:21:50 -04:00
shweetandClaude Opus 5.5 8fb28ef30a Isaac compatibility warning on save
Settings > File > Isaac Compatibility Warning (on by default): saving in
the Isaac format first lists what the game's copy can't keep as it is -
eased frames (baked into one-frame steps), group transforms (baked into
their items), shear and shaders (dropped), trigger sounds (dropped) - with
Save Anyway / Cancel. model::isaac_issues_get counts them (tested on the
fixtures).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:05:57 -04:00
shweetandClaude Opus 5.5 251d04848a Timeline start/end markers
Right-clicking the numbered row offers Add Start/End Marker Here and
Remove Markers; Shift+Comma / Shift+Period (configurable) set them at the
playhead. Markers are faded playheads, with the numbers outside their
range darkened, and playback loops within them. They are saved as
StartMarker/EndMarker on the editor's copy (SourceDocument) only, as one
undoable edit each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 21:03:00 -04:00
shweetandClaude Opus 5.5 640bf0abeb Write XML, hashes and clipboard text straight from the model
The writer emits to a Sink instead of building an XmlNode tree: TEXT prints
as tinyxml2's XMLPrinter would, HASH folds the same elements into the FNV
hash, and TREE still builds nodes (for the FrameRestore backup). Unknown
children are interleaved at their read positions as elements stream out;
numbers skip escaping.

Corpus (1,251 files, Release): save 0.73 s -> 0.50 s, extended save
0.12 s -> 0.06 s, hash 0.13 s -> 0.05 s. Saves, hashes and clipboard text
are byte-identical to before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:00:51 -04:00
shweetandClaude Opus 5.5 210232eb83 Faster saving and hashing
- XML text is printed straight from the node tree by a Printer that matches
  tinyxml2's XMLPrinter byte for byte; no tinyxml2 document is built to save.
- Numbers format with std::to_chars (whole numbers as integers) instead of
  snprintf, with the same text as "%.8g".
- Frame attribute and track child vectors are reserved up front.
- Repeated attributes in a read file collapse as tinyxml2 wrote them.

Corpus (1,251 files, Release): save 4.2 s -> 0.77 s, extended save 0.61 s ->
0.12 s, hash 0.28 s -> 0.13 s; every output is byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:43:56 -04:00
shweetandClaude Opus 5.5 ab276f6f08 Move INTERPOLATION_LABELS out of the model into the frame properties wizard
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:42:50 -04:00
shweetandClaude Opus 5.5 36869918e5 Stage 10b: drop stale header includes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:38:30 -04:00
shweetandClaude Opus 5.5 4c569cb1e5 Stage 10a: delete dead code, merge tiny files, unify duplicated concepts
- 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>
2026-10-03 18:35:22 -04:00
shweetandClaude Opus 5.5 39ccfb723a Stage 9b: animations draw from a model draw list
- model::animation_draws_get returns what an animation draws at a time (root,
  group roots, layers, nulls; onion-skin samples first), with root and group
  root transforms as each item's parent and their tint/offset folded into
  layer frames.
- The preview, the About friends and animation_rect all use it; the
  preview's render lambda shrinks to drawing the list.
- Tests for draw order and root folding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:11:19 -04:00
shweetandClaude Opus 5.5 e50d76c784 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>
2026-10-03 17:20:45 -04:00
shweetandClaude Opus 5.5 0b6f67d9bd Stage 7: typed model; Element tree is internal to model/xml.cpp
- 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>
2026-10-03 16:53:17 -04:00