diff src/video/SDL_blit_slow.c @ 5143:e743b9c3f6d6

Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 31 Jan 2011 23:23:57 -0800
parents 791b3256fb22
children d976b67150c5
line wrap: on
line diff
--- a/src/video/SDL_blit_slow.c	Mon Jan 31 22:53:45 2011 -0800
+++ b/src/video/SDL_blit_slow.c	Mon Jan 31 23:23:57 2011 -0800
@@ -117,22 +117,13 @@
                     srcB = (srcB * srcA) / 255;
                 }
             }
-            switch (flags &
-                    (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD |
-                     SDL_COPY_MOD)) {
+            switch (flags & (SDL_COPY_BLEND | SDL_COPY_ADD)) {
             case 0:
                 dstR = srcR;
                 dstG = srcG;
                 dstB = srcB;
                 dstA = srcA;
                 break;
-            case SDL_COPY_MASK:
-                if (srcA) {
-                    dstR = srcR;
-                    dstG = srcG;
-                    dstB = srcB;
-                }
-                break;
             case SDL_COPY_BLEND:
                 dstR = srcR + ((255 - srcA) * dstR) / 255;
                 dstG = srcG + ((255 - srcA) * dstG) / 255;
@@ -149,11 +140,6 @@
                 if (dstB > 255)
                     dstB = 255;
                 break;
-            case SDL_COPY_MOD:
-                dstR = (srcR * dstR) / 255;
-                dstG = (srcG * dstG) / 255;
-                dstB = (srcB * dstB) / 255;
-                break;
             }
             if (dst_fmt->Amask) {
                 ASSEMBLE_RGBA(dst, dstbpp, dst_fmt, dstR, dstG, dstB, dstA);