diff src/video/SDL_blendrect.c @ 2900:3a9636c83849

Make it possible to switch algorithms in the future
author Sam Lantinga <slouken@libsdl.org>
date Sun, 21 Dec 2008 08:59:56 +0000
parents a0c837a16e4c
children 0267b8b1595c
line wrap: on
line diff
--- a/src/video/SDL_blendrect.c	Sun Dec 21 08:55:06 2008 +0000
+++ b/src/video/SDL_blendrect.c	Sun Dec 21 08:59:56 2008 +0000
@@ -32,16 +32,16 @@
 
     switch (blendMode) {
     case SDL_BLENDMODE_BLEND:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_BLEND_RGB555);
+        FILLRECT(Uint16, DRAW_SETPIXEL_BLEND_RGB555);
         break;
     case SDL_BLENDMODE_ADD:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_ADD_RGB555);
+        FILLRECT(Uint16, DRAW_SETPIXEL_ADD_RGB555);
         break;
     case SDL_BLENDMODE_MOD:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_MOD_RGB555);
+        FILLRECT(Uint16, DRAW_SETPIXEL_MOD_RGB555);
         break;
     default:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_RGB555);
+        FILLRECT(Uint16, DRAW_SETPIXEL_RGB555);
         break;
     }
     return 0;
@@ -55,16 +55,16 @@
 
     switch (blendMode) {
     case SDL_BLENDMODE_BLEND:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_BLEND_RGB565);
+        FILLRECT(Uint16, DRAW_SETPIXEL_BLEND_RGB565);
         break;
     case SDL_BLENDMODE_ADD:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_ADD_RGB565);
+        FILLRECT(Uint16, DRAW_SETPIXEL_ADD_RGB565);
         break;
     case SDL_BLENDMODE_MOD:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_MOD_RGB565);
+        FILLRECT(Uint16, DRAW_SETPIXEL_MOD_RGB565);
         break;
     default:
-        BLENDRECT(Uint16, DRAW_SETPIXEL_RGB565);
+        FILLRECT(Uint16, DRAW_SETPIXEL_RGB565);
         break;
     }
     return 0;
@@ -78,16 +78,16 @@
 
     switch (blendMode) {
     case SDL_BLENDMODE_BLEND:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_BLEND_RGB888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_BLEND_RGB888);
         break;
     case SDL_BLENDMODE_ADD:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_ADD_RGB888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_ADD_RGB888);
         break;
     case SDL_BLENDMODE_MOD:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_MOD_RGB888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_MOD_RGB888);
         break;
     default:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_RGB888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_RGB888);
         break;
     }
     return 0;
@@ -101,16 +101,16 @@
 
     switch (blendMode) {
     case SDL_BLENDMODE_BLEND:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_BLEND_ARGB8888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_BLEND_ARGB8888);
         break;
     case SDL_BLENDMODE_ADD:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_ADD_ARGB8888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_ADD_ARGB8888);
         break;
     case SDL_BLENDMODE_MOD:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_MOD_ARGB8888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_MOD_ARGB8888);
         break;
     default:
-        BLENDRECT(Uint32, DRAW_SETPIXEL_ARGB8888);
+        FILLRECT(Uint32, DRAW_SETPIXEL_ARGB8888);
         break;
     }
     return 0;
@@ -127,32 +127,32 @@
     case 2:
         switch (blendMode) {
         case SDL_BLENDMODE_BLEND:
-            BLENDRECT(Uint16, DRAW_SETPIXEL_BLEND_RGB);
+            FILLRECT(Uint16, DRAW_SETPIXEL_BLEND_RGB);
             break;
         case SDL_BLENDMODE_ADD:
-            BLENDRECT(Uint16, DRAW_SETPIXEL_ADD_RGB);
+            FILLRECT(Uint16, DRAW_SETPIXEL_ADD_RGB);
             break;
         case SDL_BLENDMODE_MOD:
-            BLENDRECT(Uint16, DRAW_SETPIXEL_MOD_RGB);
+            FILLRECT(Uint16, DRAW_SETPIXEL_MOD_RGB);
             break;
         default:
-            BLENDRECT(Uint16, DRAW_SETPIXEL_RGB);
+            FILLRECT(Uint16, DRAW_SETPIXEL_RGB);
             break;
         }
         return 0;
     case 4:
         switch (blendMode) {
         case SDL_BLENDMODE_BLEND:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_BLEND_RGB);
+            FILLRECT(Uint32, DRAW_SETPIXEL_BLEND_RGB);
             break;
         case SDL_BLENDMODE_ADD:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_ADD_RGB);
+            FILLRECT(Uint32, DRAW_SETPIXEL_ADD_RGB);
             break;
         case SDL_BLENDMODE_MOD:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_MOD_RGB);
+            FILLRECT(Uint32, DRAW_SETPIXEL_MOD_RGB);
             break;
         default:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_RGB);
+            FILLRECT(Uint32, DRAW_SETPIXEL_RGB);
             break;
         }
         return 0;
@@ -173,16 +173,16 @@
     case 4:
         switch (blendMode) {
         case SDL_BLENDMODE_BLEND:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_BLEND_RGBA);
+            FILLRECT(Uint32, DRAW_SETPIXEL_BLEND_RGBA);
             break;
         case SDL_BLENDMODE_ADD:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_ADD_RGBA);
+            FILLRECT(Uint32, DRAW_SETPIXEL_ADD_RGBA);
             break;
         case SDL_BLENDMODE_MOD:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_MOD_RGBA);
+            FILLRECT(Uint32, DRAW_SETPIXEL_MOD_RGBA);
             break;
         default:
-            BLENDRECT(Uint32, DRAW_SETPIXEL_RGBA);
+            FILLRECT(Uint32, DRAW_SETPIXEL_RGBA);
             break;
         }
         return 0;