From 019a597c28f2e85f3b85473ffa111d4263f512d1 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 14 Jul 2018 08:50:36 -0500 Subject: [PATCH] emerald uses one more secondary tileset palette slot than ruby --- tileset.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tileset.cpp b/tileset.cpp index 1e5dde68..1e73708f 100755 --- a/tileset.cpp +++ b/tileset.cpp @@ -110,7 +110,11 @@ QList> 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;