mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-16 02:37:06 +00:00
Make background tile IDs consistent whether or not deduplication is enabled
Fixes #2072
This commit is contained in:
+4
-4
@@ -862,9 +862,9 @@ static UniqueTiles dedupTiles(
|
||||
attr.xFlip = false;
|
||||
attr.yFlip = false;
|
||||
attr.bank = 0;
|
||||
attr.tileID = 0;
|
||||
attr.tileID = options.baseTileIDs[attr.bank];
|
||||
} else {
|
||||
auto [tileID, matchType] = tiles.addTile({tile, palettes[attr.getPalID(mappings)]});
|
||||
auto [tileIdx, matchType] = tiles.addTile({tile, palettes[attr.getPalID(mappings)]});
|
||||
|
||||
if (inputWithoutOutput && matchType == TileData::NOPE) {
|
||||
error(
|
||||
@@ -877,8 +877,8 @@ static UniqueTiles dedupTiles(
|
||||
|
||||
attr.xFlip = matchType == TileData::HFLIP || matchType == TileData::VHFLIP;
|
||||
attr.yFlip = matchType == TileData::VFLIP || matchType == TileData::VHFLIP;
|
||||
attr.bank = tileID >= options.maxNbTiles[0];
|
||||
attr.tileID = (attr.bank ? tileID - options.maxNbTiles[0] : tileID)
|
||||
attr.bank = tileIdx >= options.maxNbTiles[0];
|
||||
attr.tileID = (attr.bank ? tileIdx - options.maxNbTiles[0] : tileIdx)
|
||||
+ options.baseTileIDs[attr.bank];
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
-b 16
|
||||
-u
|
||||
-t reverse_bg.tilemap
|
||||
-a reverse_bg.attrmap
|
||||
-p reverse_bg.pal
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user