Fix sprite flip property
This commit is contained in:
parent
d03c6d2093
commit
48c2854fa2
|
|
@ -167,7 +167,9 @@ sub FlipSurface {
|
||||||
for(my $y = 0; $y < $src->height(); $y++) {
|
for(my $y = 0; $y < $src->height(); $y++) {
|
||||||
for(my $x = 0; $x < $w; $x++) {
|
for(my $x = 0; $x < $w; $x++) {
|
||||||
my $pixel = $src->get_pixel( $y, $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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
ShowSprite with flip option doesn't work
|
|
||||||
.vs constructed animated sprites don't respect source image's alpha channel
|
.vs constructed animated sprites don't respect source image's alpha channel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue