diff --git a/PerlRPG/Drawing.pm b/PerlRPG/Drawing.pm index 32c36fa..31863d8 100644 --- a/PerlRPG/Drawing.pm +++ b/PerlRPG/Drawing.pm @@ -167,7 +167,9 @@ sub FlipSurface { for(my $y = 0; $y < $src->height(); $y++) { for(my $x = 0; $x < $w; $x++) { my $pixel = $src->get_pixel( $y, $x ); - $dst->set_pixel($y, $w-($x+1), $pixel); + my $c = SDL::Video::get_RGBA( $src->format(), $pixel ); + my $c2 = SDL::Video::map_RGBA( $dst->format(), @$c ); + $dst->set_pixel($y, $w-($x+1), $c2); } } diff --git a/issues.txt b/issues.txt index bc15be3..5fefec5 100644 --- a/issues.txt +++ b/issues.txt @@ -1,2 +1 @@ -ShowSprite with flip option doesn't work .vs constructed animated sprites don't respect source image's alpha channel