src/video/SDL_blit_slow.c
changeset 5184 d976b67150c5
parent 5140 e743b9c3f6d6
child 5262 b530ef003506
     1.1 --- a/src/video/SDL_blit_slow.c	Fri Feb 04 19:18:08 2011 -0800
     1.2 +++ b/src/video/SDL_blit_slow.c	Fri Feb 04 19:50:56 2011 -0800
     1.3 @@ -117,7 +117,7 @@
     1.4                      srcB = (srcB * srcA) / 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 0:
    1.10                  dstR = srcR;
    1.11                  dstG = srcG;
    1.12 @@ -140,6 +140,11 @@
    1.13                  if (dstB > 255)
    1.14                      dstB = 255;
    1.15                  break;
    1.16 +            case SDL_COPY_MOD:
    1.17 +                dstR = (srcR * dstR) / 255;
    1.18 +                dstG = (srcG * dstG) / 255;
    1.19 +                dstB = (srcB * dstB) / 255;
    1.20 +                break;
    1.21              }
    1.22              if (dst_fmt->Amask) {
    1.23                  ASSEMBLE_RGBA(dst, dstbpp, dst_fmt, dstR, dstG, dstB, dstA);