Fix unused layer rendering for METATILE_LAYER_MIDDLE_TOP

This commit is contained in:
GriffinR 2022-08-26 19:29:48 -04:00
parent d22aab9b10
commit fd4ba874d2

View file

@ -66,13 +66,13 @@ QImage getMetatileImage(
tile = metatile->tiles.value(tileOffset + (l * 4));
} else {
// "Vanilla" metatiles only have 8 tiles, but render 12.
// The remaining 4 tiles are rendered either as tile 0 or 0x3014 (invalid) depending on layer type.
// The remaining 4 tiles are rendered either as tile 0 or 0x3014 (tile 20, palette 3) depending on layer type.
switch (layerType)
{
default:
case METATILE_LAYER_MIDDLE_TOP:
if (l == 0)
tile = Tile(0x3014, false, false, 0);
tile = Tile(0x3014);
else // Tiles are on layers 1 and 2
tile = metatile->tiles.value(tileOffset + ((l - 1) * 4));
break;