Skip to content

Commit

Permalink
Advise on how to use -x to make -r work (#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 authored Aug 8, 2024
1 parent 0cd79c3 commit a3f9952
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gfx/reverse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a3f9952

Please sign in to comment.