ref: 7fdfbbbbba0d91e684b9d66fdb41b175287ce02e
parent: 7fdc6cbcedf65d0aa832ccc15ce4c066de660f47
author: ISSOtm <eldredhabert0@gmail.com>
date: Sat Apr 16 19:53:42 EDT 2022
Fix inverted condition in tile dedup warning
--- a/src/gfx/reverse.cpp
+++ b/src/gfx/reverse.cpp
@@ -83,7 +83,7 @@
fatal("Tile data must be provided when reversing an image!");
}
- if (!options.allowDedup && options.tilemap.empty()) {
+ if (options.allowDedup && options.tilemap.empty()) {
warning("Tile deduplication is enabled, but no tilemap is provided?");
}
@@ -126,14 +126,14 @@
fatal(
"No input slice specified (`-L`), and specified image width (%zu) not a multiple of 8",
usefulWidth);
- } else {
- width = usefulWidth / 8;
- if (nbTileInstances % width != 0) {
- fatal("Total number of tiles read (%zu) cannot be divided by image width (%zu tiles)",
- nbTileInstances, width);
- }
- height = nbTileInstances / width;
}
+ width = usefulWidth / 8;
+ if (nbTileInstances % width != 0) {
+ fatal("Total number of tiles read (%zu) cannot be divided by image width (%zu tiles)",
+ nbTileInstances, width);
+ }
+ height = nbTileInstances / width;
+
options.verbosePrint(Options::VERB_INTERM, "Reversed image dimensions: %zux%zu tiles\n", width,
height);