emerald uses one more secondary tileset palette slot than ruby

This commit is contained in:
Marcus Huderle 2018-07-14 08:50:36 -05:00
parent 9b44850f28
commit 019a597c28

View file

@ -110,7 +110,11 @@ QList<QList<QRgb>> Metatile::getBlockPalettes(Tileset *primaryTileset, Tileset *
for (int i = 0; i < 6; i++) {
palettes.append(primaryTileset->palettes->at(i));
}
for (int i = 6; i < 12; i++) {
// TODO: Find a reliable way to detect Ruby vs. Emerald
// Ruby's secondary tilesets only use palettes 6-11, whereas
// Emerald uses 6-12.
for (int i = 6; i < 13; i++) {
palettes.append(secondaryTileset->palettes->at(i));
}
return palettes;