Implement transparency handling

Though none of this has been tested so far...
This commit is contained in:
ISSOtm
2022-03-13 11:28:20 +01:00
committed by Eldred Habert
parent e86eb9337a
commit 3c9d5b05d6
6 changed files with 32 additions and 24 deletions

View File

@@ -47,6 +47,6 @@ uint16_t Rgba::cgbColor() const {
uint8_t Rgba::grayIndex() const {
assert(isGray());
// Convert from [0; 256[ to [0; maxPalSize[
return static_cast<uint16_t>(255 - red) * options.maxPalSize() / 256;
// Convert from [0; 256[ to [0; maxOpaqueColors[
return static_cast<uint16_t>(255 - red) * options.maxOpaqueColors() / 256;
}