mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
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:
parent
cff3475941
commit
5053443d21
@ -149,8 +149,10 @@ bool TgaFormat::onLoad(FileOp* fop)
|
|||||||
tga::getr(c),
|
tga::getr(c),
|
||||||
tga::getg(c),
|
tga::getg(c),
|
||||||
tga::getb(c));
|
tga::getb(c));
|
||||||
if (tga::geta(c) < 255)
|
if (tga::geta(c) < 255) {
|
||||||
fop->sequenceSetAlpha(i, tga::geta(c));
|
fop->sequenceSetAlpha(i, tga::geta(c));
|
||||||
|
fop->sequenceSetHasAlpha(true); // Is a transparent sprite
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Generate grayscale palette
|
// Generate grayscale palette
|
||||||
|
Loading…
Reference in New Issue
Block a user