From ed13c466287924333a94a74382d4412ce1f41fd2 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 11 Apr 2024 23:12:53 +0100 Subject: [PATCH] Allow importing sprites that do not mark their unbound areas. SonMapEd allows this too. Fixes #4. --- main-window.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/main-window.cpp b/main-window.cpp index e5917b7..ae47bfd 100644 --- a/main-window.cpp +++ b/main-window.cpp @@ -781,22 +781,6 @@ MainWindow::MainWindow(QWidget* const parent) return; } - // TODO: SonMapEd might not bother doing this? - // Check that the imported image has tiles in the same place as the current sprite. - // A unique pink colour is used to mark 'unmapped' pixels. - for (int y = 0; y < our_image.height(); ++y) - { - for (int x = 0; x < our_image.width(); ++x) - { - if ((their_image.pixel(x, y) == qRgb(0xFF, 0, 0xFF)) != (our_image.pixel(x, y) == qRgb(0xFF, 0, 0xFF))) - { - // TODO: Use an error message that is similar to SonMapEd's. - QMessageBox::critical(this, "Error", "Failed to import image: the imported image does not match the layout of the sprite that it is replacing."); - return; - } - } - } - // Finally, import the image over the sprite. tile_manager.modifyTiles( [this, &frame, &their_image](std::vector &old_tiles)