diff src/video/sdlgenblit.pl @ 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 99210400e8b9
children be02be2ea897
line wrap: on
line diff
--- a/src/video/sdlgenblit.pl	Mon Jan 31 22:53:45 2011 -0800
+++ b/src/video/sdlgenblit.pl	Mon Jan 31 23:23:57 2011 -0800
@@ -83,7 +83,7 @@
 /* DO NOT EDIT!  This file is generated by sdlgenblit.pl */
 /*
     SDL - Simple DirectMedia Layer
-    Copyright (C) 1997-2009 Sam Lantinga
+    Copyright (C) 1997-2011 Sam Lantinga
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Lesser General Public
@@ -238,14 +238,7 @@
                     ${s}B = (${s}B * ${s}A) / 255;
                 }
             }
-            switch (flags & (SDL_COPY_MASK|SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
-            case SDL_COPY_MASK:
-                if (${s}A) {
-                    ${d}R = ${s}R;
-                    ${d}G = ${s}G;
-                    ${d}B = ${s}B;
-                }
-                break;
+            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
             case SDL_COPY_BLEND:
                 ${d}R = ${s}R + ((255 - ${s}A) * ${d}R) / 255;
                 ${d}G = ${s}G + ((255 - ${s}A) * ${d}G) / 255;
@@ -256,11 +249,6 @@
                 ${d}G = ${s}G + ${d}G; if (${d}G > 255) ${d}G = 255;
                 ${d}B = ${s}B + ${d}B; if (${d}B > 255) ${d}B = 255;
                 break;
-            case SDL_COPY_MOD:
-                ${d}R = (${s}R * ${d}R) / 255;
-                ${d}G = (${s}G * ${d}G) / 255;
-                ${d}B = (${s}B * ${d}B) / 255;
-                break;
             }
 __EOF__
     }
@@ -410,7 +398,7 @@
                                 }
                             }
                             if ( $blend ) {
-                                $flag = "SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD";
+                                $flag = "SDL_COPY_BLEND | SDL_COPY_ADD";
                                 if ( $flags eq "" ) {
                                     $flags = $flag;
                                 } else {