Advise on how to use -x to make -r work (#1459)

This commit is contained in:
Sylvie
2024-08-08 13:50:51 -04:00
committed by GitHub
parent 0cd79c33ef
commit a3f9952b9e

View File

@@ -172,6 +172,15 @@ void reverse() {
options.verbosePrint(Options::VERB_INTERM, "Picked reversing width of %zu tiles\n", width);
}
if (mapSize % width != 0) {
if (options.trim == 0 && !tilemap) {
fatal(
"Total number of tiles (%zu) cannot be divided by image width (%zu tiles)\n"
"(To proceed anyway with this image width, try passing `-x %zu`)",
mapSize,
width,
width - mapSize % width
);
}
fatal(
"Total number of tiles (%zu) cannot be divided by image width (%zu tiles)",
mapSize,