From 23f2016e2663c93824762af8ce616193a0a2fa6a Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 16 Sep 2018 11:21:53 -0500 Subject: [PATCH] Update tileset image palette processing, to accompany RGB-indexed images, rather than greyscale --- project.cpp | 2 +- tileset.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project.cpp b/project.cpp index fa886dec..06190b8b 100755 --- a/project.cpp +++ b/project.cpp @@ -864,7 +864,7 @@ void Project::loadTilesetAssets(Tileset* tileset) { int green = (word >> 5) & 0x1f; int blue = (word >> 10) & 0x1f; QRgb color = qRgb(red * 8, green * 8, blue * 8); - palette.prepend(color); + palette.append(color); } } else { for (int j = 0; j < 16; j++) { diff --git a/tileset.cpp b/tileset.cpp index 7538075c..8409a358 100755 --- a/tileset.cpp +++ b/tileset.cpp @@ -55,9 +55,9 @@ QImage Metatile::getMetatileImage(int tile, Tileset *primaryTileset, Tileset *se // The top layer of the metatile has its last color displayed at transparent. if (layer > 0) { - QColor color(tile_image.color(15)); + QColor color(tile_image.color(0)); color.setAlpha(0); - tile_image.setColor(15, color.rgba()); + tile_image.setColor(0, color.rgba()); } QPoint origin = QPoint(x*8, y*8);