Files
anm2ed/tests/golden/operation.file_merge_by_name.xml
T
shweetandClaude Opus 5.5 b69b0eaa1b JSON documents; remove the extended format
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>
2026-10-28 21:48:25 -04:00

97 lines
7.2 KiB
XML

<AnimatedActor>
<Info CreatedBy="fixture" CreatedOn="01/01/2026 12:00:00 PM" Fps="30" Version="2"/>
<Content>
<Spritesheets>
<Spritesheet Id="0" Path="a.png"/>
<Spritesheet Id="1" Path="b.png"/>
<Spritesheet Id="2" Path="sheet.png">
<Region Id="0" Name="custom" XCrop="0" YCrop="0" Width="16" Height="16" XPivot="3" YPivot="5"/>
<Region Id="1" Name="topleft" XCrop="16" YCrop="0" Width="16" Height="32" Origin="TopLeft"/>
<Region Id="2" Name="center" XCrop="32" YCrop="0" Width="10" Height="20" Origin="Center"/>
<Region Id="3" Name="gap" XCrop="0" YCrop="32" Width="8" Height="8" XPivot="0" YPivot="0"/>
</Spritesheet>
<Spritesheet Id="3" Path="other.png"/>
</Spritesheets>
<Layers>
<Layer Id="0" Name="head" SpritesheetId="0"/>
<Layer Id="1" Name="body" SpritesheetId="1"/>
<Layer Id="2" Name="a" SpritesheetId="2"/>
<Layer Id="3" Name="b" SpritesheetId="3"/>
</Layers>
<Nulls>
<Null Id="0" Name="anchor"/>
<Null Id="1" Name="hitbox" ShowRect="true"/>
</Nulls>
<Events>
<Event Id="0" Name="Step"/>
<Event Id="1" Name="Shoot"/>
</Events>
<Sounds>
<Sound Id="0" Path="step.wav"/>
<Sound Id="1" Path="shoot.ogg"/>
</Sounds>
</Content>
<Animations DefaultAnimation="Walk">
<Animation Name="Walk" FrameNum="8" Loop="true">
<RootAnimation>
<Frame XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="true"/>
<Frame XPosition="10" YPosition="-4" Delay="4" Visible="true" XScale="120" YScale="80" SkewX="0" SkewY="0" RedTint="200" GreenTint="128" BlueTint="64" AlphaTint="255" RedOffset="10" GreenOffset="20" BlueOffset="30" Rotation="45" Interpolated="false"/>
</RootAnimation>
<LayerAnimations>
<LayerAnimation LayerId="0" Visible="true">
<Frame XPivot="8" YPivot="8" XCrop="0" YCrop="0" Width="16" Height="16" XPosition="0" YPosition="-8" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="true"/>
<Frame XPivot="8" YPivot="8" XCrop="0" YCrop="0" Width="16" Height="16" XPosition="2" YPosition="-9" Delay="4" Visible="false" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="128" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="-10" Interpolated="false"/>
</LayerAnimation>
<LayerAnimation LayerId="1" Visible="false">
<Frame XPivot="4" YPivot="12" XCrop="16" YCrop="0" Width="8" Height="24" XPosition="0" YPosition="0" Delay="8" Visible="true" XScale="-100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
</LayerAnimations>
<NullAnimations>
<NullAnimation NullId="0" Visible="true">
<Frame XPosition="3" YPosition="4" Delay="8" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</NullAnimation>
<NullAnimation NullId="1" Visible="true"/>
</NullAnimations>
<Triggers>
<Trigger EventId="0" AtFrame="0">
<Sound Id="0"/>
</Trigger>
<Trigger EventId="1" AtFrame="4">
<Sound Id="0"/>
<Sound Id="1"/>
</Trigger>
<Trigger AtFrame="6">
<Sound Id="1"/>
</Trigger>
</Triggers>
</Animation>
<Animation Name="Empty" FrameNum="1" Loop="false">
<RootAnimation>
<Frame XPosition="0" YPosition="0" Delay="1" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</RootAnimation>
<LayerAnimations/>
<NullAnimations/>
<Triggers/>
</Animation>
<Animation Name="A" FrameNum="20" Loop="true">
<RootAnimation>
<Frame XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</RootAnimation>
<LayerAnimations>
<LayerAnimation LayerId="2" Visible="true">
<Frame RegionId="0" XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame RegionId="1" XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame RegionId="2" XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame XPivot="1" YPivot="1" XCrop="2" YCrop="2" Width="4" Height="4" XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
<Frame RegionId="3" XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
<LayerAnimation LayerId="3" Visible="true">
<Frame XPivot="8" YPivot="8" XCrop="0" YCrop="0" Width="16" Height="16" XPosition="0" YPosition="0" Delay="4" Visible="true" XScale="100" YScale="100" SkewX="0" SkewY="0" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
</LayerAnimation>
</LayerAnimations>
<NullAnimations/>
<Triggers/>
</Animation>
</Animations>
</AnimatedActor>