Update tileset image palette processing, to accompany RGB-indexed images, rather than greyscale

This commit is contained in:
Marcus Huderle 2018-09-16 11:21:53 -05:00
parent b3a30c91ae
commit 23f2016e26
2 changed files with 3 additions and 3 deletions

View file

@ -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++) {

View file

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