Files
anm2ed/src/model/xml.hpp
T
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

44 lines
1.6 KiB
C++

#pragma once
#include <filesystem>
#include <string>
#include "model.hpp"
// The only place the model meets XML: reading and writing documents (with the SourceDocument copy) and clipboard text.
namespace anm2ed::model
{
// What the game's copy of a save can't keep as it is: how many of each.
struct IsaacIssues
{
int easedFrames{};
int groupTransforms{};
int skewFrames{};
int shaderFrames{};
int depthFrames{};
int blurFrames{};
int triggerSounds{};
int animationLayers{};
bool operator==(const IsaacIssues&) const = default;
};
Model model_make();
IsaacIssues isaac_issues_get(const Model&);
bool model_load(Model&, const std::filesystem::path&, std::string* = nullptr);
bool model_load_string(Model&, std::string_view, std::string* = nullptr);
bool model_save(const Model&, const std::filesystem::path&, std::string* = nullptr, Options = {});
std::string model_to_string(const Model&, Options = {});
std::string model_serialize(const Model&, Flags);
std::uint64_t model_hash(const Model&);
std::string frame_to_string(const Frame&, ItemType);
std::string animation_to_string(const Animation&, int = -1);
std::string animation_group_to_string(const AnimationGroup&);
std::vector<Frame> frames_from_string(const std::string&, ItemType, std::string* = nullptr);
std::vector<AnimationEntry> animations_from_string(const std::string&, std::string* = nullptr);
template <class Item> std::string item_to_string(const Item&);
template <class Item> std::vector<Item> items_from_string(const std::string&, std::string* = nullptr);
}