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:
1 parent
065dd522f3
commit
8ef089d306
36 files changed
+772
-220
No files matched your search
+6
-5
@@ -193,7 +193,7 @@ namespace anm2ed::model
|
||||
}
|
||||
|
||||
template <int L, class T, glm::qualifier Q> void value(const glm::vec<L, T, Q>& value) { array(value, L); }
|
||||
void value(const std::vector<int>& value) { array(value, (int)value.size()); }
|
||||
template <class T> void value(const std::vector<T>& value) { array(value, (int)value.size()); }
|
||||
|
||||
template <class T> void field(std::string_view name, const T& value)
|
||||
{
|
||||
@@ -321,13 +321,13 @@ namespace anm2ed::model
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string_view value_read(dom::element element, std::vector<int>& value)
|
||||
template <class T> std::string_view value_read(dom::element element, std::vector<T>& value)
|
||||
{
|
||||
dom::array array{};
|
||||
if (element.get(array)) return "an array of numbers";
|
||||
std::vector<int> read{};
|
||||
if (element.get(array)) return "an array";
|
||||
std::vector<T> read{};
|
||||
for (auto item : array)
|
||||
if (!value_read(item, read.emplace_back()).empty()) return "an array of numbers";
|
||||
if (auto expected = value_read(item, read.emplace_back()); !expected.empty()) return expected;
|
||||
value = std::move(read);
|
||||
return {};
|
||||
}
|
||||
@@ -687,6 +687,7 @@ namespace anm2ed::model
|
||||
infoIo.field("createdOn", model.info.createdOn, {}, date_to_iso, date_from_iso);
|
||||
infoIo.field("fps", model.info.fps, Info{}.fps);
|
||||
infoIo.field("version", model.info.version, Info{}.version);
|
||||
infoIo.field("isaacIgnored", model.info.isIsaacIgnored, false);
|
||||
},
|
||||
true);
|
||||
io.list(
|
||||
|
||||
Reference in new issue
Block a user