diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-08 12:07:28 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-08 12:07:28 -0400 |
commit | bd7a1f2dfcca3ab2871fa0396c8ddca26f144d44 (patch) | |
tree | 24e25ebb557630083fd205775fdc44819de0334b /lib/Games/NES/SpriteMaker.pm | |
parent | 5513f4c6d0c63a8095d4482874126dfd5d0719b1 (diff) | |
download | games-nes-spritemaker-bd7a1f2dfcca3ab2871fa0396c8ddca26f144d44.tar.gz games-nes-spritemaker-bd7a1f2dfcca3ab2871fa0396c8ddca26f144d44.zip |
white should always be the transparent color
Diffstat (limited to 'lib/Games/NES/SpriteMaker.pm')
-rw-r--r-- | lib/Games/NES/SpriteMaker.pm | 4 |
1 files 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); |