src/video/sdlgenblit.pl
changeset 8661 e9e62c8fffb6
parent 8659 d3a9836732ea
child 8662 f8e55cba0bca
     1.1 --- a/src/video/sdlgenblit.pl	Thu Mar 20 18:00:41 2014 -0400
     1.2 +++ b/src/video/sdlgenblit.pl	Fri Mar 21 00:57:43 2014 -0400
     1.3 @@ -268,7 +268,15 @@
     1.4                  ${d}R = ${s}R + ((255 - ${s}A) * ${d}R) / 255;
     1.5                  ${d}G = ${s}G + ((255 - ${s}A) * ${d}G) / 255;
     1.6                  ${d}B = ${s}B + ((255 - ${s}A) * ${d}B) / 255;
     1.7 +__EOF__
     1.8 +
     1.9 +        if ( $dst =~ /A/ ) {
    1.10 +            print FILE <<__EOF__;
    1.11                  ${d}A = ${s}A + ((255 - ${s}A) * ${d}A) / 255;
    1.12 +__EOF__
    1.13 +        }
    1.14 +
    1.15 +        print FILE <<__EOF__;
    1.16                  break;
    1.17              case SDL_COPY_ADD:
    1.18                  ${d}R = ${s}R + ${d}R; if (${d}R > 255) ${d}R = 255;
    1.19 @@ -349,6 +357,13 @@
    1.20  __EOF__
    1.21      }
    1.22  
    1.23 +    # !!! FIXME: the script should just exclude in these cases.
    1.24 +    if ( $blend ) {
    1.25 +        print FILE <<__EOF__;
    1.26 +    (void) dstA;  /* not all formats use alpha. */
    1.27 +__EOF__
    1.28 +    }
    1.29 +
    1.30      print FILE <<__EOF__;
    1.31  
    1.32      srcy = 0;
    1.33 @@ -401,6 +416,13 @@
    1.34  __EOF__
    1.35          }
    1.36  
    1.37 +        # !!! FIXME: the script should just exclude in these cases.
    1.38 +        if ( $blend ) {
    1.39 +            print FILE <<__EOF__;
    1.40 +    (void) dstA;  /* not all formats use alpha. */
    1.41 +__EOF__
    1.42 +        }
    1.43 +
    1.44          print FILE <<__EOF__;
    1.45  
    1.46      while (info->dst_h--) {