We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd3bbf commit 38d54b2Copy full SHA for 38d54b2
src/gfx/pal_sorting.cpp
@@ -24,10 +24,11 @@ void sortIndexed(
24
);
25
};
26
27
- for (Palette &pal : palettes) {
+ for (size_t palID = 0; palID < palettes.size(); ++palID) {
28
+ Palette &pal = palettes[palID];
29
std::sort(RANGE(pal), [&](uint16_t lhs, uint16_t rhs) {
30
// Iterate through the PNG's palette, looking for either of the two
- for (int i = 0; i < palSize; ++i) {
31
+ for (size_t i = palID * 4; i < palID * 4 + 4; ++i) {
32
uint16_t color = pngToRgb(i).cgbColor();
33
if (color == Rgba::transparent) {
34
continue;
0 commit comments