src/video/sdlgenblit.pl
changeset 5184 d976b67150c5
parent 5149 be02be2ea897
child 5426 7a3982c50af8
     1.1 --- a/src/video/sdlgenblit.pl	Fri Feb 04 19:18:08 2011 -0800
     1.2 +++ b/src/video/sdlgenblit.pl	Fri Feb 04 19:50:56 2011 -0800
     1.3 @@ -237,7 +237,7 @@
     1.4                      ${s}B = (${s}B * ${s}A) / 255;
     1.5                  }
     1.6              }
     1.7 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
     1.8 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
     1.9              case SDL_COPY_BLEND:
    1.10                  ${d}R = ${s}R + ((255 - ${s}A) * ${d}R) / 255;
    1.11                  ${d}G = ${s}G + ((255 - ${s}A) * ${d}G) / 255;
    1.12 @@ -248,6 +248,11 @@
    1.13                  ${d}G = ${s}G + ${d}G; if (${d}G > 255) ${d}G = 255;
    1.14                  ${d}B = ${s}B + ${d}B; if (${d}B > 255) ${d}B = 255;
    1.15                  break;
    1.16 +            case SDL_COPY_MOD:
    1.17 +                ${d}R = (${s}R * ${d}R) / 255;
    1.18 +                ${d}G = (${s}G * ${d}G) / 255;
    1.19 +                ${d}B = (${s}B * ${d}B) / 255;
    1.20 +                break;
    1.21              }
    1.22  __EOF__
    1.23      }
    1.24 @@ -397,7 +402,7 @@
    1.25                                  }
    1.26                              }
    1.27                              if ( $blend ) {
    1.28 -                                $flag = "SDL_COPY_BLEND | SDL_COPY_ADD";
    1.29 +                                $flag = "SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD";
    1.30                                  if ( $flags eq "" ) {
    1.31                                      $flags = $flag;
    1.32                                  } else {