diff src/render/software/SDL_blendline.c @ 5187:d976b67150c5

Restored SDL_BLENDMODE_MOD for MAME
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Feb 2011 19:50:56 -0800
parents 4d39eeaad00b
children 710d00cb3a6a
line wrap: on
line diff
--- a/src/render/software/SDL_blendline.c	Fri Feb 04 19:18:08 2011 -0800
+++ b/src/render/software/SDL_blendline.c	Fri Feb 04 19:50:56 2011 -0800
@@ -55,6 +55,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
+            break;
         default:
             HLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
             break;
@@ -67,6 +70,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
+            break;
         default:
             VLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
             break;
@@ -79,6 +85,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
+            break;
         default:
             DLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
             break;
@@ -95,6 +104,11 @@
                    DRAW_SETPIXELXY2_ADD_RGB, DRAW_SETPIXELXY2_ADD_RGB,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY2_MOD_RGB, DRAW_SETPIXELXY2_MOD_RGB,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY2_RGB, DRAW_SETPIXELXY2_BLEND_RGB,
@@ -133,6 +147,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
+            break;
         default:
             HLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
             break;
@@ -145,6 +162,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
+            break;
         default:
             VLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
             break;
@@ -157,6 +177,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
+            break;
         default:
             DLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
             break;
@@ -173,6 +196,11 @@
                    DRAW_SETPIXELXY_ADD_RGB555, DRAW_SETPIXELXY_ADD_RGB555,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY_MOD_RGB555, DRAW_SETPIXELXY_MOD_RGB555,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY_RGB555, DRAW_SETPIXELXY_BLEND_RGB555,
@@ -211,6 +239,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
+            break;
         default:
             HLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
             break;
@@ -223,6 +254,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
+            break;
         default:
             VLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
             break;
@@ -235,6 +269,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
+            break;
         default:
             DLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
             break;
@@ -251,6 +288,11 @@
                    DRAW_SETPIXELXY_ADD_RGB565, DRAW_SETPIXELXY_ADD_RGB565,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY_MOD_RGB565, DRAW_SETPIXELXY_MOD_RGB565,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY_RGB565, DRAW_SETPIXELXY_BLEND_RGB565,
@@ -289,6 +331,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
+            break;
         default:
             HLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
             break;
@@ -301,6 +346,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
+            break;
         default:
             VLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
             break;
@@ -313,6 +361,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
+            break;
         default:
             DLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
             break;
@@ -329,6 +380,11 @@
                    DRAW_SETPIXELXY4_ADD_RGB, DRAW_SETPIXELXY4_ADD_RGB,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY4_MOD_RGB, DRAW_SETPIXELXY4_MOD_RGB,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY4_RGB, DRAW_SETPIXELXY4_BLEND_RGB,
@@ -367,6 +423,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
+            break;
         default:
             HLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
             break;
@@ -379,6 +438,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
+            break;
         default:
             VLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
             break;
@@ -391,6 +453,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
+            break;
         default:
             DLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
             break;
@@ -407,6 +472,11 @@
                    DRAW_SETPIXELXY4_ADD_RGBA, DRAW_SETPIXELXY4_ADD_RGBA,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY4_MOD_RGBA, DRAW_SETPIXELXY4_MOD_RGBA,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY4_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA,
@@ -445,6 +515,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
+            break;
         default:
             HLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
             break;
@@ -457,6 +530,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
+            break;
         default:
             VLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
             break;
@@ -469,6 +545,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
+            break;
         default:
             DLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
             break;
@@ -485,6 +564,11 @@
                    DRAW_SETPIXELXY_ADD_RGB888, DRAW_SETPIXELXY_ADD_RGB888,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY_MOD_RGB888, DRAW_SETPIXELXY_MOD_RGB888,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY_RGB888, DRAW_SETPIXELXY_BLEND_RGB888,
@@ -523,6 +607,9 @@
         case SDL_BLENDMODE_ADD:
             HLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            HLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
+            break;
         default:
             HLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
             break;
@@ -535,6 +622,9 @@
         case SDL_BLENDMODE_ADD:
             VLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            VLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
+            break;
         default:
             VLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
             break;
@@ -547,6 +637,9 @@
         case SDL_BLENDMODE_ADD:
             DLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            DLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
+            break;
         default:
             DLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
             break;
@@ -563,6 +656,11 @@
                    DRAW_SETPIXELXY_ADD_ARGB8888, DRAW_SETPIXELXY_ADD_ARGB8888,
                    draw_end);
             break;
+        case SDL_BLENDMODE_MOD:
+            AALINE(x1, y1, x2, y2,
+                   DRAW_SETPIXELXY_MOD_ARGB8888, DRAW_SETPIXELXY_MOD_ARGB8888,
+                   draw_end);
+            break;
         default:
             AALINE(x1, y1, x2, y2,
                    DRAW_SETPIXELXY_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888,