Skip to content

Commit

Permalink
Deduplicating tiles without an input or output tileset should be OK
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Dec 28, 2024
1 parent d63955e commit 256208a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gfx/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,10 +999,11 @@ static UniqueTiles dedupTiles(
}
}

bool inputWithoutOutput = !options.inputTileset.empty() && options.output.empty();
for (auto [tile, attr] : zip(png.visitAsTiles(), attrmap)) {
auto [tileID, matchType] = tiles.addTile({tile, palettes[mappings[attr.protoPaletteID]]});

if (matchType == TileData::NOPE && options.output.empty()) {
if (inputWithoutOutput && matchType == TileData::NOPE) {
error(
"Tile at (%" PRIu32 ", %" PRIu32
") is not within the input tileset, and `-o` was not given!",
Expand Down

0 comments on commit 256208a

Please sign in to comment.