mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-17 19:27:05 +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.xFlip = false;
|
||||||
attr.yFlip = false;
|
attr.yFlip = false;
|
||||||
attr.bank = 0;
|
attr.bank = 0;
|
||||||
attr.tileID = 0;
|
attr.tileID = options.baseTileIDs[attr.bank];
|
||||||
} else {
|
} 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) {
|
if (inputWithoutOutput && matchType == TileData::NOPE) {
|
||||||
error(
|
error(
|
||||||
@@ -877,8 +877,8 @@ static UniqueTiles dedupTiles(
|
|||||||
|
|
||||||
attr.xFlip = matchType == TileData::HFLIP || matchType == TileData::VHFLIP;
|
attr.xFlip = matchType == TileData::HFLIP || matchType == TileData::VHFLIP;
|
||||||
attr.yFlip = matchType == TileData::VFLIP || matchType == TileData::VHFLIP;
|
attr.yFlip = matchType == TileData::VFLIP || matchType == TileData::VHFLIP;
|
||||||
attr.bank = tileID >= options.maxNbTiles[0];
|
attr.bank = tileIdx >= options.maxNbTiles[0];
|
||||||
attr.tileID = (attr.bank ? tileID - options.maxNbTiles[0] : tileID)
|
attr.tileID = (attr.bank ? tileIdx - options.maxNbTiles[0] : tileIdx)
|
||||||
+ options.baseTileIDs[attr.bank];
|
+ 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