mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Implement transparency handling
Though none of this has been tested so far...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user