Skip to content

Commit

Permalink
fix indentation II.
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Mar 21, 2022
1 parent 4a3aaa0 commit 12f02be
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/video/sdlgenblit.pl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ sub output_copycore
# Nice and easy...
if ( $src eq $dst ) {
print FILE <<__EOF__;
*dst = *src;
*dst = *src;
__EOF__
return;
}
Expand All @@ -245,50 +245,50 @@ sub output_copycore
if ($da eq "A") {
# RGBA -> ARGB
print FILE <<__EOF__;
pixel = *src;
pixel = (pixel >> 8) | (pixel << 24);
*dst = pixel;
pixel = *src;
pixel = (pixel >> 8) | (pixel << 24);
*dst = pixel;
__EOF__
} else {
# ARGB -> RGBA -- unused
print FILE <<__EOF__;
pixel = *src;
pixel = (pixel << 8) | A;
*dst = pixel;
pixel = *src;
pixel = (pixel << 8) | A;
*dst = pixel;
__EOF__
}
} elsif ($dst_has_alpha) {
$da = substr $dst, 0, 1;
if ($da eq "A") {
# RGB -> ARGB
print FILE <<__EOF__;
pixel = *src;
pixel |= (A << 24);
*dst = pixel;
pixel = *src;
pixel |= (A << 24);
*dst = pixel;
__EOF__
} else {
# RGB -> RGBA -- unused
print FILE <<__EOF__;
pixel = *src;
pixel = (pixel << 8) | A;
*dst = pixel;
pixel = *src;
pixel = (pixel << 8) | A;
*dst = pixel;
__EOF__
}
} else {
$sa = substr $src, 0, 1;
if ($sa eq "A") {
# ARGB -> RGB
print FILE <<__EOF__;
pixel = *src;
pixel &= 0xFFFFFF;
*dst = pixel;
pixel = *src;
pixel &= 0xFFFFFF;
*dst = pixel;
__EOF__
} else {
# RGBA -> RGB
print FILE <<__EOF__;
pixel = *src;
pixel >>= 8;
*dst = pixel;
pixel = *src;
pixel >>= 8;
*dst = pixel;
__EOF__
}
}
Expand Down

0 comments on commit 12f02be

Please sign in to comment.