SVG sheets: draw tool hint, convert to PNG for Rebirth; game copy skips built-in events
Drawing or erasing on an SVG spritesheet shows why it can't be edited (and no longer leaves an empty undo step). Saving a Rebirth document whose layers show SVG spritesheets first offers to convert them into PNGs beside them (one undoable edit); keeping them counts them in the Isaac warning. The game's copy of a trigger keeps its first event that isn't stop or done, and only further custom events count as dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5d274e547a
commit
280adaa189
14 files changed
+154
-10
No files matched your search
@@ -204,3 +204,26 @@ TEST_CASE("SVG spritesheets draw sharp at any scale")
|
||||
pixels.data()));
|
||||
golden_image_check("vector_frame_0.png");
|
||||
}
|
||||
|
||||
TEST_CASE("converting SVG spritesheets writes PNGs beside them")
|
||||
{
|
||||
auto directory = std::filesystem::temp_directory_path() / "anm2ed_vector_convert";
|
||||
std::filesystem::remove_all(directory);
|
||||
std::filesystem::create_directories(directory);
|
||||
for (auto name : {"vector.anm2", "vector.svg"})
|
||||
std::filesystem::copy_file(RENDER_TEST_DIR / name, directory / name);
|
||||
|
||||
Document document(directory / "vector.anm2", false);
|
||||
REQUIRE(document.is_valid());
|
||||
document.spritesheets_vector_convert();
|
||||
CHECK(document.model.content.spritesheets.front().path == "vector.png");
|
||||
CHECK(std::filesystem::exists(directory / "vector.png"));
|
||||
REQUIRE(document.texture_get(0));
|
||||
CHECK_FALSE(document.texture_get(0)->is_vector());
|
||||
CHECK(model::spritesheets_vector_used_get(document.model).empty());
|
||||
|
||||
document.undo();
|
||||
CHECK(document.model.content.spritesheets.front().path == "vector.svg");
|
||||
CHECK(document.texture_get(0)->is_vector());
|
||||
std::filesystem::remove_all(directory);
|
||||
}
|
||||
Reference in new issue
Block a user