From bd7a1f2dfcca3ab2871fa0396c8ddca26f144d44 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 8 Oct 2014 12:07:28 -0400 Subject: white should always be the transparent color --- lib/Games/NES/SpriteMaker.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Games/NES/SpriteMaker.pm b/lib/Games/NES/SpriteMaker.pm index c28afec..65c11bd 100644 --- a/lib/Games/NES/SpriteMaker.pm +++ b/lib/Games/NES/SpriteMaker.pm @@ -49,8 +49,8 @@ sub image_to_sprite { sub _get_palette_colors { my ($image) = @_; - my %unique_values; - my $idx = 0; + my %unique_values = ("1;1;1" => 0); + my $idx = 1; for my $row (0..$image->height - 1) { for my $col (0..$image->width - 1) { my $pixel = $image->raw_pixel($row, $col); -- cgit v1.2.3