Load indexed tga w/transparent pal entries as transparent layer

Before this we were loading the file with a Background layer with a
transparent palette entry.
This commit is contained in:
David Capello 2021-04-09 12:09:45 -03:00
parent cff3475941
commit 5053443d21

View File

@ -149,8 +149,10 @@ bool TgaFormat::onLoad(FileOp* fop)
tga::getr(c),
tga::getg(c),
tga::getb(c));
if (tga::geta(c) < 255)
if (tga::geta(c) < 255) {
fop->sequenceSetAlpha(i, tga::geta(c));
fop->sequenceSetHasAlpha(true); // Is a transparent sprite
}
}
}
// Generate grayscale palette