mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fix two RGBGFX bugs (#1671)
* Fix two RGBGFX bugs * Fix clang-format idempotence * Update src/gfx/rgba.cpp Co-authored-by: Eldred Habert <me@eldred.fr> --------- Co-authored-by: Eldred Habert <me@eldred.fr>
This commit is contained in:
@@ -604,9 +604,9 @@ static std::tuple<DefaultInitVec<size_t>, std::vector<Palette>>
|
||||
// Convert the palette spec to actual palettes
|
||||
std::vector<Palette> palettes(options.palSpec.size());
|
||||
for (auto [spec, pal] : zip(options.palSpec, palettes)) {
|
||||
for (size_t i = 0; i < options.nbColorsPerPal && (!spec[i] || spec[i]->isOpaque()); ++i) {
|
||||
for (size_t i = 0; i < options.nbColorsPerPal; ++i) {
|
||||
// If the spec has a gap, there's no need to copy anything.
|
||||
if (spec[i]) {
|
||||
if (spec[i].has_value() && !spec[i]->isTransparent()) {
|
||||
pal[i] = spec[i]->cgbColor();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user