Placeholder tile for primary layer when requesting out-of-bounds tile
This commit is contained in:
parent
cf89d07192
commit
f6f4b4024a
1 changed files with 5 additions and 1 deletions
|
@ -40,7 +40,11 @@ QImage Metatile::getMetatileImage(int tile, Tileset *primaryTileset, Tileset *se
|
|||
if (tile_image.isNull()) {
|
||||
// Some metatiles specify tiles that are outside the valid range.
|
||||
// These are treated as completely transparent, so they can be skipped without
|
||||
// being drawn.
|
||||
// being drawn unless they're on the bottom layer, in which case we need
|
||||
// a placeholder.
|
||||
if (layer == 0) {
|
||||
metatile_painter.fillRect(x * 8, y * 8, 8, 8, palettes.value(0).value(0));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue