Isaac compatibility: Convert and Save bridges what the game can't show

The Isaac prompt offers Convert and Save, Ignore and Save, or Cancel; the
document remembers the choice (IsaacIgnored / "isaacIgnored", editor-only)
for saves that don't ask (the warning off, or `convert`). Converting:
- depth: a copy of the layer per depth ("body (depth +1)"), standing where
  the editor draws it and showing only that depth's frames
- alpha offsets join the alpha tint (the same on opaque pixels)
- skew, blur and shaders: each layer frame using one is drawn alone at 1x
  into <name>.baked.png beside the save (each image once), on a copy of its
  layer ("body (baked)") right after it, one frame per step; a skewed root
  or group root goes into its layers' images. `convert` makes a headless
  OpenGL context for it; without one (or if the sheet can't be written)
  these are dropped with a warning. Autosaves don't bake.
Tests check the bridged copy draws as the editor does, frame by frame.

Purge Default Color Values is gone: XML saves always leave out tints of 255
and color offsets of 0, in both copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-28 22:59:35 -04:00
1 parent 065dd522f3
commit 8ef089d306
36 files changed
+772 -220

No files matched your search

+17
View File
@@ -66,6 +66,23 @@ namespace anm2ed::model
if (isRoundRotation) frame.rotation = std::round(frame.rotation);
}
// For the game, a group root's transform is baked into its tracks one frame at a time.
void track_group_root_bake(Track& track, const Track& root, int frameNum)
{
auto trackLength = track_length_get(track);
if (trackLength <= 0) return;
auto length = std::max({trackLength, track_length_get(root), frameNum, FRAME_DURATION_MIN});
std::vector<Frame> frames{};
for (int time = 0; time < length; ++time)
{
auto& frame = frames.emplace_back(frame_generate(track, (float)time));
frame_root_transform_apply(frame, frame_generate(root, (float)time), false, false, false);
frame.duration = FRAME_DURATION_MIN;
frame.interpolation = Interpolation::NONE;
}
track.frames = std::move(frames);
}
// The track's state at a time: the frame playing then, mixed toward the next one when interpolated. A trigger is
// returned only on its exact frame; otherwise the result is invisible.
Frame frame_generate(const Track& track, float time)