Update tileset image palette processing, to accompany RGB-indexed images, rather than greyscale
This commit is contained in:
parent
b3a30c91ae
commit
23f2016e26
2 changed files with 3 additions and 3 deletions
|
@ -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++) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue