mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
The transparent colour should always go first
This commit is contained in:
parent
84c87a8088
commit
d26311e76b
|
@ -167,9 +167,7 @@ impl Palette16Optimiser {
|
||||||
fn find_maximal_palette_for(&self, unsatisfied_palettes: &HashSet<Palette16>) -> Palette16 {
|
fn find_maximal_palette_for(&self, unsatisfied_palettes: &HashSet<Palette16>) -> Palette16 {
|
||||||
let mut palette = Palette16::new();
|
let mut palette = Palette16::new();
|
||||||
|
|
||||||
if let Some(transparent_colour) = self.transparent_colour {
|
palette.add_colour(self.transparent_colour.unwrap_or_else(|| Colour::from_rgb(255, 0, 255, 0)));
|
||||||
palette.add_colour(transparent_colour);
|
|
||||||
}
|
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let mut colour_usage = vec![0; MAX_COLOURS];
|
let mut colour_usage = vec![0; MAX_COLOURS];
|
||||||
|
|
Loading…
Reference in a new issue