Placeholder tile for primary layer when requesting out-of-bounds tile

This commit is contained in:
Diegoisawesome 2018-09-21 11:00:23 -05:00
parent cf89d07192
commit f6f4b4024a

View file

@ -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;
}