mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fix grayscale sorting not setting palette size
A black+white palette would turn into white+transparent, removing black pixels from the palette (the third slot would be empty, and the 4th slot be set directly)
This commit is contained in:
@@ -76,7 +76,7 @@ void grayscale(std::vector<Palette> &palettes,
|
|||||||
assert(palettes.size() == 1);
|
assert(palettes.size() == 1);
|
||||||
|
|
||||||
Palette &palette = palettes[0];
|
Palette &palette = palettes[0];
|
||||||
std::fill(palette.begin(), palette.end(), Rgba::transparent);
|
std::fill(palette.colors.begin(), palette.colors.end(), Rgba::transparent);
|
||||||
for (auto const &slot : colors) {
|
for (auto const &slot : colors) {
|
||||||
if (!slot.has_value() || slot->isTransparent()) {
|
if (!slot.has_value() || slot->isTransparent()) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user