Skip to content

Commit

Permalink
Allow deduplicating tiles with neither an input nor output tileset (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 authored Dec 30, 2024
1 parent 5197e6b commit ad95d2e
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 ad95d2e

Please sign in to comment.