Flatten src into model, edit and ui, with .h headers

Resources and utilities sit directly in src. The ImGui windows, wizards, popups and helpers are in ui.
Headers that would shadow system ones are renamed: math_util, timestamp, subprocess, localization.
Includes are written from src.
This commit is contained in:
shweet committed 2026-11-22 17:12:05 -05:00
1 parent a515267e26
commit 7fb2c607c2
175 files changed
+537 -537

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
#pragma once
#include <filesystem>
#include <string>
#include "model/model.h"
// 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 alphaOffsetFrames{};
int blurFrames{};
int triggerSounds{};
int extraEvents{};
int animationLayers{};
int vectorSpritesheets{};
bool operator==(const IsaacIssues&) const = default;
};
Model model_make();
IsaacIssues isaac_issues_get(const Model&);
void model_repair(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);
}