Restored SDL_BLENDMODE_MOD for MAME
authorSam Lantinga <slouken@libsdl.org>
Fri, 04 Feb 2011 19:50:56 -0800
changeset 5184d976b67150c5
parent 5183 227d81a4b66c
child 5185 1425cff805f0
Restored SDL_BLENDMODE_MOD for MAME
include/SDL_blendmode.h
src/render/direct3d/SDL_d3drender.c
src/render/opengl/SDL_renderer_gl.c
src/render/opengles/SDL_renderer_gles.c
src/render/software/SDL_blendfillrect.c
src/render/software/SDL_blendline.c
src/render/software/SDL_blendpoint.c
src/render/software/SDL_draw.h
src/video/SDL_RLEaccel.c
src/video/SDL_blit.c
src/video/SDL_blit.h
src/video/SDL_blit_auto.c
src/video/SDL_blit_slow.c
src/video/SDL_surface.c
src/video/sdlgenblit.pl
test/automated/common/img_blitblend.c
test/automated/render/render.c
test/automated/surface/surface.c
test/testdraw2.c
test/testintersections.c
test/testsprite2.c
     1.1 --- a/include/SDL_blendmode.h	Fri Feb 04 19:18:08 2011 -0800
     1.2 +++ b/include/SDL_blendmode.h	Fri Feb 04 19:50:56 2011 -0800
     1.3 @@ -45,6 +45,7 @@
     1.4      SDL_BLENDMODE_NONE = 0x00000000,     /**< No blending */
     1.5      SDL_BLENDMODE_BLEND = 0x00000001,    /**< dst = (src * A) + (dst * (1-A)) */
     1.6      SDL_BLENDMODE_ADD = 0x00000002,      /**< dst = (src * A) + dst */
     1.7 +    SDL_BLENDMODE_MOD = 0x00000004       /**< dst = src * dst */
     1.8  } SDL_BlendMode;
     1.9  
    1.10  /* Ends C function definitions when using C++ */
     2.1 --- a/src/render/direct3d/SDL_d3drender.c	Fri Feb 04 19:18:08 2011 -0800
     2.2 +++ b/src/render/direct3d/SDL_d3drender.c	Fri Feb 04 19:50:56 2011 -0800
     2.3 @@ -625,6 +625,14 @@
     2.4          IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
     2.5                                          D3DBLEND_ONE);
     2.6          break;
     2.7 +    case SDL_BLENDMODE_MOD:
     2.8 +        IDirect3DDevice9_SetRenderState(data->device, D3DRS_ALPHABLENDENABLE,
     2.9 +                                        TRUE);
    2.10 +        IDirect3DDevice9_SetRenderState(data->device, D3DRS_SRCBLEND,
    2.11 +                                        D3DBLEND_ZERO);
    2.12 +        IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
    2.13 +                                        D3DBLEND_SRCCOLOR);
    2.14 +        break;
    2.15      }
    2.16  }
    2.17  
     3.1 --- a/src/render/opengl/SDL_renderer_gl.c	Fri Feb 04 19:18:08 2011 -0800
     3.2 +++ b/src/render/opengl/SDL_renderer_gl.c	Fri Feb 04 19:50:56 2011 -0800
     3.3 @@ -529,6 +529,11 @@
     3.4              data->glEnable(GL_BLEND);
     3.5              data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
     3.6              break;
     3.7 +        case SDL_BLENDMODE_MOD:
     3.8 +            data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
     3.9 +            data->glEnable(GL_BLEND);
    3.10 +            data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
    3.11 +            break;
    3.12          }
    3.13          data->blendMode = blendMode;
    3.14      }
     4.1 --- a/src/render/opengles/SDL_renderer_gles.c	Fri Feb 04 19:18:08 2011 -0800
     4.2 +++ b/src/render/opengles/SDL_renderer_gles.c	Fri Feb 04 19:50:56 2011 -0800
     4.3 @@ -495,6 +495,11 @@
     4.4              data->glEnable(GL_BLEND);
     4.5              data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
     4.6              break;
     4.7 +        case SDL_BLENDMODE_MOD:
     4.8 +            data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
     4.9 +            data->glEnable(GL_BLEND);
    4.10 +            data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
    4.11 +            break;
    4.12          }
    4.13          data->blendMode = blendMode;
    4.14      }
     5.1 --- a/src/render/software/SDL_blendfillrect.c	Fri Feb 04 19:18:08 2011 -0800
     5.2 +++ b/src/render/software/SDL_blendfillrect.c	Fri Feb 04 19:50:56 2011 -0800
     5.3 @@ -38,6 +38,9 @@
     5.4      case SDL_BLENDMODE_ADD:
     5.5          FILLRECT(Uint16, DRAW_SETPIXEL_ADD_RGB555);
     5.6          break;
     5.7 +    case SDL_BLENDMODE_MOD:
     5.8 +        FILLRECT(Uint16, DRAW_SETPIXEL_MOD_RGB555);
     5.9 +        break;
    5.10      default:
    5.11          FILLRECT(Uint16, DRAW_SETPIXEL_RGB555);
    5.12          break;
    5.13 @@ -58,6 +61,9 @@
    5.14      case SDL_BLENDMODE_ADD:
    5.15          FILLRECT(Uint16, DRAW_SETPIXEL_ADD_RGB565);
    5.16          break;
    5.17 +    case SDL_BLENDMODE_MOD:
    5.18 +        FILLRECT(Uint16, DRAW_SETPIXEL_MOD_RGB565);
    5.19 +        break;
    5.20      default:
    5.21          FILLRECT(Uint16, DRAW_SETPIXEL_RGB565);
    5.22          break;
    5.23 @@ -78,6 +84,9 @@
    5.24      case SDL_BLENDMODE_ADD:
    5.25          FILLRECT(Uint32, DRAW_SETPIXEL_ADD_RGB888);
    5.26          break;
    5.27 +    case SDL_BLENDMODE_MOD:
    5.28 +        FILLRECT(Uint32, DRAW_SETPIXEL_MOD_RGB888);
    5.29 +        break;
    5.30      default:
    5.31          FILLRECT(Uint32, DRAW_SETPIXEL_RGB888);
    5.32          break;
    5.33 @@ -98,6 +107,9 @@
    5.34      case SDL_BLENDMODE_ADD:
    5.35          FILLRECT(Uint32, DRAW_SETPIXEL_ADD_ARGB8888);
    5.36          break;
    5.37 +    case SDL_BLENDMODE_MOD:
    5.38 +        FILLRECT(Uint32, DRAW_SETPIXEL_MOD_ARGB8888);
    5.39 +        break;
    5.40      default:
    5.41          FILLRECT(Uint32, DRAW_SETPIXEL_ARGB8888);
    5.42          break;
    5.43 @@ -121,6 +133,9 @@
    5.44          case SDL_BLENDMODE_ADD:
    5.45              FILLRECT(Uint16, DRAW_SETPIXEL_ADD_RGB);
    5.46              break;
    5.47 +        case SDL_BLENDMODE_MOD:
    5.48 +            FILLRECT(Uint16, DRAW_SETPIXEL_MOD_RGB);
    5.49 +            break;
    5.50          default:
    5.51              FILLRECT(Uint16, DRAW_SETPIXEL_RGB);
    5.52              break;
    5.53 @@ -134,6 +149,9 @@
    5.54          case SDL_BLENDMODE_ADD:
    5.55              FILLRECT(Uint32, DRAW_SETPIXEL_ADD_RGB);
    5.56              break;
    5.57 +        case SDL_BLENDMODE_MOD:
    5.58 +            FILLRECT(Uint32, DRAW_SETPIXEL_MOD_RGB);
    5.59 +            break;
    5.60          default:
    5.61              FILLRECT(Uint32, DRAW_SETPIXEL_RGB);
    5.62              break;
    5.63 @@ -161,6 +179,9 @@
    5.64          case SDL_BLENDMODE_ADD:
    5.65              FILLRECT(Uint32, DRAW_SETPIXEL_ADD_RGBA);
    5.66              break;
    5.67 +        case SDL_BLENDMODE_MOD:
    5.68 +            FILLRECT(Uint32, DRAW_SETPIXEL_MOD_RGBA);
    5.69 +            break;
    5.70          default:
    5.71              FILLRECT(Uint32, DRAW_SETPIXEL_RGBA);
    5.72              break;
     6.1 --- a/src/render/software/SDL_blendline.c	Fri Feb 04 19:18:08 2011 -0800
     6.2 +++ b/src/render/software/SDL_blendline.c	Fri Feb 04 19:50:56 2011 -0800
     6.3 @@ -55,6 +55,9 @@
     6.4          case SDL_BLENDMODE_ADD:
     6.5              HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
     6.6              break;
     6.7 +        case SDL_BLENDMODE_MOD:
     6.8 +            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
     6.9 +            break;
    6.10          default:
    6.11              HLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
    6.12              break;
    6.13 @@ -67,6 +70,9 @@
    6.14          case SDL_BLENDMODE_ADD:
    6.15              VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
    6.16              break;
    6.17 +        case SDL_BLENDMODE_MOD:
    6.18 +            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
    6.19 +            break;
    6.20          default:
    6.21              VLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
    6.22              break;
    6.23 @@ -79,6 +85,9 @@
    6.24          case SDL_BLENDMODE_ADD:
    6.25              DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
    6.26              break;
    6.27 +        case SDL_BLENDMODE_MOD:
    6.28 +            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
    6.29 +            break;
    6.30          default:
    6.31              DLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
    6.32              break;
    6.33 @@ -95,6 +104,11 @@
    6.34                     DRAW_SETPIXELXY2_ADD_RGB, DRAW_SETPIXELXY2_ADD_RGB,
    6.35                     draw_end);
    6.36              break;
    6.37 +        case SDL_BLENDMODE_MOD:
    6.38 +            AALINE(x1, y1, x2, y2,
    6.39 +                   DRAW_SETPIXELXY2_MOD_RGB, DRAW_SETPIXELXY2_MOD_RGB,
    6.40 +                   draw_end);
    6.41 +            break;
    6.42          default:
    6.43              AALINE(x1, y1, x2, y2,
    6.44                     DRAW_SETPIXELXY2_RGB, DRAW_SETPIXELXY2_BLEND_RGB,
    6.45 @@ -133,6 +147,9 @@
    6.46          case SDL_BLENDMODE_ADD:
    6.47              HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
    6.48              break;
    6.49 +        case SDL_BLENDMODE_MOD:
    6.50 +            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
    6.51 +            break;
    6.52          default:
    6.53              HLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
    6.54              break;
    6.55 @@ -145,6 +162,9 @@
    6.56          case SDL_BLENDMODE_ADD:
    6.57              VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
    6.58              break;
    6.59 +        case SDL_BLENDMODE_MOD:
    6.60 +            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
    6.61 +            break;
    6.62          default:
    6.63              VLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
    6.64              break;
    6.65 @@ -157,6 +177,9 @@
    6.66          case SDL_BLENDMODE_ADD:
    6.67              DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
    6.68              break;
    6.69 +        case SDL_BLENDMODE_MOD:
    6.70 +            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
    6.71 +            break;
    6.72          default:
    6.73              DLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
    6.74              break;
    6.75 @@ -173,6 +196,11 @@
    6.76                     DRAW_SETPIXELXY_ADD_RGB555, DRAW_SETPIXELXY_ADD_RGB555,
    6.77                     draw_end);
    6.78              break;
    6.79 +        case SDL_BLENDMODE_MOD:
    6.80 +            AALINE(x1, y1, x2, y2,
    6.81 +                   DRAW_SETPIXELXY_MOD_RGB555, DRAW_SETPIXELXY_MOD_RGB555,
    6.82 +                   draw_end);
    6.83 +            break;
    6.84          default:
    6.85              AALINE(x1, y1, x2, y2,
    6.86                     DRAW_SETPIXELXY_RGB555, DRAW_SETPIXELXY_BLEND_RGB555,
    6.87 @@ -211,6 +239,9 @@
    6.88          case SDL_BLENDMODE_ADD:
    6.89              HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
    6.90              break;
    6.91 +        case SDL_BLENDMODE_MOD:
    6.92 +            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
    6.93 +            break;
    6.94          default:
    6.95              HLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
    6.96              break;
    6.97 @@ -223,6 +254,9 @@
    6.98          case SDL_BLENDMODE_ADD:
    6.99              VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
   6.100              break;
   6.101 +        case SDL_BLENDMODE_MOD:
   6.102 +            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
   6.103 +            break;
   6.104          default:
   6.105              VLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
   6.106              break;
   6.107 @@ -235,6 +269,9 @@
   6.108          case SDL_BLENDMODE_ADD:
   6.109              DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
   6.110              break;
   6.111 +        case SDL_BLENDMODE_MOD:
   6.112 +            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
   6.113 +            break;
   6.114          default:
   6.115              DLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
   6.116              break;
   6.117 @@ -251,6 +288,11 @@
   6.118                     DRAW_SETPIXELXY_ADD_RGB565, DRAW_SETPIXELXY_ADD_RGB565,
   6.119                     draw_end);
   6.120              break;
   6.121 +        case SDL_BLENDMODE_MOD:
   6.122 +            AALINE(x1, y1, x2, y2,
   6.123 +                   DRAW_SETPIXELXY_MOD_RGB565, DRAW_SETPIXELXY_MOD_RGB565,
   6.124 +                   draw_end);
   6.125 +            break;
   6.126          default:
   6.127              AALINE(x1, y1, x2, y2,
   6.128                     DRAW_SETPIXELXY_RGB565, DRAW_SETPIXELXY_BLEND_RGB565,
   6.129 @@ -289,6 +331,9 @@
   6.130          case SDL_BLENDMODE_ADD:
   6.131              HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
   6.132              break;
   6.133 +        case SDL_BLENDMODE_MOD:
   6.134 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
   6.135 +            break;
   6.136          default:
   6.137              HLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
   6.138              break;
   6.139 @@ -301,6 +346,9 @@
   6.140          case SDL_BLENDMODE_ADD:
   6.141              VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
   6.142              break;
   6.143 +        case SDL_BLENDMODE_MOD:
   6.144 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
   6.145 +            break;
   6.146          default:
   6.147              VLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
   6.148              break;
   6.149 @@ -313,6 +361,9 @@
   6.150          case SDL_BLENDMODE_ADD:
   6.151              DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
   6.152              break;
   6.153 +        case SDL_BLENDMODE_MOD:
   6.154 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
   6.155 +            break;
   6.156          default:
   6.157              DLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
   6.158              break;
   6.159 @@ -329,6 +380,11 @@
   6.160                     DRAW_SETPIXELXY4_ADD_RGB, DRAW_SETPIXELXY4_ADD_RGB,
   6.161                     draw_end);
   6.162              break;
   6.163 +        case SDL_BLENDMODE_MOD:
   6.164 +            AALINE(x1, y1, x2, y2,
   6.165 +                   DRAW_SETPIXELXY4_MOD_RGB, DRAW_SETPIXELXY4_MOD_RGB,
   6.166 +                   draw_end);
   6.167 +            break;
   6.168          default:
   6.169              AALINE(x1, y1, x2, y2,
   6.170                     DRAW_SETPIXELXY4_RGB, DRAW_SETPIXELXY4_BLEND_RGB,
   6.171 @@ -367,6 +423,9 @@
   6.172          case SDL_BLENDMODE_ADD:
   6.173              HLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
   6.174              break;
   6.175 +        case SDL_BLENDMODE_MOD:
   6.176 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
   6.177 +            break;
   6.178          default:
   6.179              HLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
   6.180              break;
   6.181 @@ -379,6 +438,9 @@
   6.182          case SDL_BLENDMODE_ADD:
   6.183              VLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
   6.184              break;
   6.185 +        case SDL_BLENDMODE_MOD:
   6.186 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
   6.187 +            break;
   6.188          default:
   6.189              VLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
   6.190              break;
   6.191 @@ -391,6 +453,9 @@
   6.192          case SDL_BLENDMODE_ADD:
   6.193              DLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
   6.194              break;
   6.195 +        case SDL_BLENDMODE_MOD:
   6.196 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
   6.197 +            break;
   6.198          default:
   6.199              DLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
   6.200              break;
   6.201 @@ -407,6 +472,11 @@
   6.202                     DRAW_SETPIXELXY4_ADD_RGBA, DRAW_SETPIXELXY4_ADD_RGBA,
   6.203                     draw_end);
   6.204              break;
   6.205 +        case SDL_BLENDMODE_MOD:
   6.206 +            AALINE(x1, y1, x2, y2,
   6.207 +                   DRAW_SETPIXELXY4_MOD_RGBA, DRAW_SETPIXELXY4_MOD_RGBA,
   6.208 +                   draw_end);
   6.209 +            break;
   6.210          default:
   6.211              AALINE(x1, y1, x2, y2,
   6.212                     DRAW_SETPIXELXY4_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA,
   6.213 @@ -445,6 +515,9 @@
   6.214          case SDL_BLENDMODE_ADD:
   6.215              HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
   6.216              break;
   6.217 +        case SDL_BLENDMODE_MOD:
   6.218 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
   6.219 +            break;
   6.220          default:
   6.221              HLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
   6.222              break;
   6.223 @@ -457,6 +530,9 @@
   6.224          case SDL_BLENDMODE_ADD:
   6.225              VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
   6.226              break;
   6.227 +        case SDL_BLENDMODE_MOD:
   6.228 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
   6.229 +            break;
   6.230          default:
   6.231              VLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
   6.232              break;
   6.233 @@ -469,6 +545,9 @@
   6.234          case SDL_BLENDMODE_ADD:
   6.235              DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
   6.236              break;
   6.237 +        case SDL_BLENDMODE_MOD:
   6.238 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
   6.239 +            break;
   6.240          default:
   6.241              DLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
   6.242              break;
   6.243 @@ -485,6 +564,11 @@
   6.244                     DRAW_SETPIXELXY_ADD_RGB888, DRAW_SETPIXELXY_ADD_RGB888,
   6.245                     draw_end);
   6.246              break;
   6.247 +        case SDL_BLENDMODE_MOD:
   6.248 +            AALINE(x1, y1, x2, y2,
   6.249 +                   DRAW_SETPIXELXY_MOD_RGB888, DRAW_SETPIXELXY_MOD_RGB888,
   6.250 +                   draw_end);
   6.251 +            break;
   6.252          default:
   6.253              AALINE(x1, y1, x2, y2,
   6.254                     DRAW_SETPIXELXY_RGB888, DRAW_SETPIXELXY_BLEND_RGB888,
   6.255 @@ -523,6 +607,9 @@
   6.256          case SDL_BLENDMODE_ADD:
   6.257              HLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
   6.258              break;
   6.259 +        case SDL_BLENDMODE_MOD:
   6.260 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
   6.261 +            break;
   6.262          default:
   6.263              HLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
   6.264              break;
   6.265 @@ -535,6 +622,9 @@
   6.266          case SDL_BLENDMODE_ADD:
   6.267              VLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
   6.268              break;
   6.269 +        case SDL_BLENDMODE_MOD:
   6.270 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
   6.271 +            break;
   6.272          default:
   6.273              VLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
   6.274              break;
   6.275 @@ -547,6 +637,9 @@
   6.276          case SDL_BLENDMODE_ADD:
   6.277              DLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
   6.278              break;
   6.279 +        case SDL_BLENDMODE_MOD:
   6.280 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
   6.281 +            break;
   6.282          default:
   6.283              DLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
   6.284              break;
   6.285 @@ -563,6 +656,11 @@
   6.286                     DRAW_SETPIXELXY_ADD_ARGB8888, DRAW_SETPIXELXY_ADD_ARGB8888,
   6.287                     draw_end);
   6.288              break;
   6.289 +        case SDL_BLENDMODE_MOD:
   6.290 +            AALINE(x1, y1, x2, y2,
   6.291 +                   DRAW_SETPIXELXY_MOD_ARGB8888, DRAW_SETPIXELXY_MOD_ARGB8888,
   6.292 +                   draw_end);
   6.293 +            break;
   6.294          default:
   6.295              AALINE(x1, y1, x2, y2,
   6.296                     DRAW_SETPIXELXY_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888,
     7.1 --- a/src/render/software/SDL_blendpoint.c	Fri Feb 04 19:18:08 2011 -0800
     7.2 +++ b/src/render/software/SDL_blendpoint.c	Fri Feb 04 19:50:56 2011 -0800
     7.3 @@ -38,6 +38,9 @@
     7.4      case SDL_BLENDMODE_ADD:
     7.5          DRAW_SETPIXELXY_ADD_RGB555(x, y);
     7.6          break;
     7.7 +    case SDL_BLENDMODE_MOD:
     7.8 +        DRAW_SETPIXELXY_MOD_RGB555(x, y);
     7.9 +        break;
    7.10      default:
    7.11          DRAW_SETPIXELXY_RGB555(x, y);
    7.12          break;
    7.13 @@ -58,6 +61,9 @@
    7.14      case SDL_BLENDMODE_ADD:
    7.15          DRAW_SETPIXELXY_ADD_RGB565(x, y);
    7.16          break;
    7.17 +    case SDL_BLENDMODE_MOD:
    7.18 +        DRAW_SETPIXELXY_MOD_RGB565(x, y);
    7.19 +        break;
    7.20      default:
    7.21          DRAW_SETPIXELXY_RGB565(x, y);
    7.22          break;
    7.23 @@ -78,6 +84,9 @@
    7.24      case SDL_BLENDMODE_ADD:
    7.25          DRAW_SETPIXELXY_ADD_RGB888(x, y);
    7.26          break;
    7.27 +    case SDL_BLENDMODE_MOD:
    7.28 +        DRAW_SETPIXELXY_MOD_RGB888(x, y);
    7.29 +        break;
    7.30      default:
    7.31          DRAW_SETPIXELXY_RGB888(x, y);
    7.32          break;
    7.33 @@ -98,6 +107,9 @@
    7.34      case SDL_BLENDMODE_ADD:
    7.35          DRAW_SETPIXELXY_ADD_ARGB8888(x, y);
    7.36          break;
    7.37 +    case SDL_BLENDMODE_MOD:
    7.38 +        DRAW_SETPIXELXY_MOD_ARGB8888(x, y);
    7.39 +        break;
    7.40      default:
    7.41          DRAW_SETPIXELXY_ARGB8888(x, y);
    7.42          break;
    7.43 @@ -121,6 +133,9 @@
    7.44          case SDL_BLENDMODE_ADD:
    7.45              DRAW_SETPIXELXY2_ADD_RGB(x, y);
    7.46              break;
    7.47 +        case SDL_BLENDMODE_MOD:
    7.48 +            DRAW_SETPIXELXY2_MOD_RGB(x, y);
    7.49 +            break;
    7.50          default:
    7.51              DRAW_SETPIXELXY2_RGB(x, y);
    7.52              break;
    7.53 @@ -134,6 +149,9 @@
    7.54          case SDL_BLENDMODE_ADD:
    7.55              DRAW_SETPIXELXY4_ADD_RGB(x, y);
    7.56              break;
    7.57 +        case SDL_BLENDMODE_MOD:
    7.58 +            DRAW_SETPIXELXY4_MOD_RGB(x, y);
    7.59 +            break;
    7.60          default:
    7.61              DRAW_SETPIXELXY4_RGB(x, y);
    7.62              break;
    7.63 @@ -161,6 +179,9 @@
    7.64          case SDL_BLENDMODE_ADD:
    7.65              DRAW_SETPIXELXY4_ADD_RGBA(x, y);
    7.66              break;
    7.67 +        case SDL_BLENDMODE_MOD:
    7.68 +            DRAW_SETPIXELXY4_MOD_RGBA(x, y);
    7.69 +            break;
    7.70          default:
    7.71              DRAW_SETPIXELXY4_RGBA(x, y);
    7.72              break;
     8.1 --- a/src/render/software/SDL_draw.h	Fri Feb 04 19:18:08 2011 -0800
     8.2 +++ b/src/render/software/SDL_draw.h	Fri Feb 04 19:50:56 2011 -0800
     8.3 @@ -70,6 +70,16 @@
     8.4      setpixel; \
     8.5  } while (0)
     8.6  
     8.7 +#define DRAW_SETPIXEL_MOD(getpixel, setpixel) \
     8.8 +do { \
     8.9 +    unsigned sr, sg, sb, sa; sa; \
    8.10 +    getpixel; \
    8.11 +    sr = DRAW_MUL(sr, r); \
    8.12 +    sg = DRAW_MUL(sg, g); \
    8.13 +    sb = DRAW_MUL(sb, b); \
    8.14 +    setpixel; \
    8.15 +} while (0)
    8.16 +
    8.17  #define DRAW_SETPIXELXY(x, y, type, bpp, op) \
    8.18  do { \
    8.19      type *pixel = (type *)((Uint8 *)dst->pixels + (y) * dst->pitch \
    8.20 @@ -92,6 +102,10 @@
    8.21      DRAW_SETPIXEL_ADD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
    8.22                        RGB555_FROM_RGB(*pixel, sr, sg, sb))
    8.23  
    8.24 +#define DRAW_SETPIXEL_MOD_RGB555 \
    8.25 +    DRAW_SETPIXEL_MOD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
    8.26 +                      RGB555_FROM_RGB(*pixel, sr, sg, sb))
    8.27 +
    8.28  #define DRAW_SETPIXELXY_RGB555(x, y) \
    8.29      DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB555)
    8.30  
    8.31 @@ -101,6 +115,9 @@
    8.32  #define DRAW_SETPIXELXY_ADD_RGB555(x, y) \
    8.33      DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB555)
    8.34  
    8.35 +#define DRAW_SETPIXELXY_MOD_RGB555(x, y) \
    8.36 +    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB555)
    8.37 +
    8.38  /*
    8.39   * Define draw operators for RGB565
    8.40   */
    8.41 @@ -116,6 +133,10 @@
    8.42      DRAW_SETPIXEL_ADD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
    8.43                        RGB565_FROM_RGB(*pixel, sr, sg, sb))
    8.44  
    8.45 +#define DRAW_SETPIXEL_MOD_RGB565 \
    8.46 +    DRAW_SETPIXEL_MOD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
    8.47 +                      RGB565_FROM_RGB(*pixel, sr, sg, sb))
    8.48 +
    8.49  #define DRAW_SETPIXELXY_RGB565(x, y) \
    8.50      DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB565)
    8.51  
    8.52 @@ -125,6 +146,9 @@
    8.53  #define DRAW_SETPIXELXY_ADD_RGB565(x, y) \
    8.54      DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB565)
    8.55  
    8.56 +#define DRAW_SETPIXELXY_MOD_RGB565(x, y) \
    8.57 +    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB565)
    8.58 +
    8.59  /*
    8.60   * Define draw operators for RGB888
    8.61   */
    8.62 @@ -140,6 +164,10 @@
    8.63      DRAW_SETPIXEL_ADD(RGB_FROM_RGB888(*pixel, sr, sg, sb), \
    8.64                        RGB888_FROM_RGB(*pixel, sr, sg, sb))
    8.65  
    8.66 +#define DRAW_SETPIXEL_MOD_RGB888 \
    8.67 +    DRAW_SETPIXEL_MOD(RGB_FROM_RGB888(*pixel, sr, sg, sb), \
    8.68 +                      RGB888_FROM_RGB(*pixel, sr, sg, sb))
    8.69 +
    8.70  #define DRAW_SETPIXELXY_RGB888(x, y) \
    8.71      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGB888)
    8.72  
    8.73 @@ -149,6 +177,9 @@
    8.74  #define DRAW_SETPIXELXY_ADD_RGB888(x, y) \
    8.75      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGB888)
    8.76  
    8.77 +#define DRAW_SETPIXELXY_MOD_RGB888(x, y) \
    8.78 +    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB888)
    8.79 +
    8.80  /*
    8.81   * Define draw operators for ARGB8888
    8.82   */
    8.83 @@ -164,6 +195,10 @@
    8.84      DRAW_SETPIXEL_ADD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
    8.85                        ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
    8.86  
    8.87 +#define DRAW_SETPIXEL_MOD_ARGB8888 \
    8.88 +    DRAW_SETPIXEL_MOD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
    8.89 +                      ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
    8.90 +
    8.91  #define DRAW_SETPIXELXY_ARGB8888(x, y) \
    8.92      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ARGB8888)
    8.93  
    8.94 @@ -173,6 +208,9 @@
    8.95  #define DRAW_SETPIXELXY_ADD_ARGB8888(x, y) \
    8.96      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_ARGB8888)
    8.97  
    8.98 +#define DRAW_SETPIXELXY_MOD_ARGB8888(x, y) \
    8.99 +    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_ARGB8888)
   8.100 +
   8.101  /*
   8.102   * Define draw operators for general RGB
   8.103   */
   8.104 @@ -188,6 +226,10 @@
   8.105      DRAW_SETPIXEL_ADD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
   8.106                        PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
   8.107  
   8.108 +#define DRAW_SETPIXEL_MOD_RGB \
   8.109 +    DRAW_SETPIXEL_MOD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
   8.110 +                      PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
   8.111 +
   8.112  #define DRAW_SETPIXELXY2_RGB(x, y) \
   8.113      DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB)
   8.114  
   8.115 @@ -206,6 +248,12 @@
   8.116  #define DRAW_SETPIXELXY4_ADD_RGB(x, y) \
   8.117      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGB)
   8.118  
   8.119 +#define DRAW_SETPIXELXY2_MOD_RGB(x, y) \
   8.120 +    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB)
   8.121 +
   8.122 +#define DRAW_SETPIXELXY4_MOD_RGB(x, y) \
   8.123 +    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB)
   8.124 +
   8.125  
   8.126  /*
   8.127   * Define draw operators for general RGBA
   8.128 @@ -222,6 +270,10 @@
   8.129      DRAW_SETPIXEL_ADD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
   8.130                        PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
   8.131  
   8.132 +#define DRAW_SETPIXEL_MOD_RGBA \
   8.133 +    DRAW_SETPIXEL_MOD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
   8.134 +                      PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
   8.135 +
   8.136  #define DRAW_SETPIXELXY4_RGBA(x, y) \
   8.137      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGBA)
   8.138  
   8.139 @@ -231,6 +283,9 @@
   8.140  #define DRAW_SETPIXELXY4_ADD_RGBA(x, y) \
   8.141      DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGBA)
   8.142  
   8.143 +#define DRAW_SETPIXELXY4_MOD_RGBA(x, y) \
   8.144 +    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGBA)
   8.145 +
   8.146  /*
   8.147   * Define line drawing macro
   8.148   */
     9.1 --- a/src/video/SDL_RLEaccel.c	Fri Feb 04 19:18:08 2011 -0800
     9.2 +++ b/src/video/SDL_RLEaccel.c	Fri Feb 04 19:50:56 2011 -0800
     9.3 @@ -1423,7 +1423,7 @@
     9.4      /* Pass on combinations not supported */
     9.5      if ((flags & SDL_COPY_MODULATE_COLOR) ||
     9.6          ((flags & SDL_COPY_MODULATE_ALPHA) && surface->format->Amask) ||
     9.7 -        (flags & SDL_COPY_ADD) ||
     9.8 +        (flags & (SDL_COPY_ADD | SDL_COPY_MOD)) ||
     9.9          (flags & SDL_COPY_NEAREST)) {
    9.10          return -1;
    9.11      }
    10.1 --- a/src/video/SDL_blit.c	Fri Feb 04 19:18:08 2011 -0800
    10.2 +++ b/src/video/SDL_blit.c	Fri Feb 04 19:50:56 2011 -0800
    10.3 @@ -181,7 +181,9 @@
    10.4          }
    10.5  
    10.6          /* Check blend flags */
    10.7 -        flagcheck = (flags & (SDL_COPY_BLEND | SDL_COPY_ADD));
    10.8 +        flagcheck =
    10.9 +            (flags &
   10.10 +             (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD));
   10.11          if ((flagcheck & entries[i].flags) != flagcheck) {
   10.12              continue;
   10.13          }
    11.1 --- a/src/video/SDL_blit.h	Fri Feb 04 19:18:08 2011 -0800
    11.2 +++ b/src/video/SDL_blit.h	Fri Feb 04 19:50:56 2011 -0800
    11.3 @@ -54,6 +54,7 @@
    11.4  #define SDL_COPY_MODULATE_ALPHA     0x00000002
    11.5  #define SDL_COPY_BLEND              0x00000010
    11.6  #define SDL_COPY_ADD                0x00000020
    11.7 +#define SDL_COPY_MOD                0x00000040
    11.8  #define SDL_COPY_COLORKEY           0x00000100
    11.9  #define SDL_COPY_NEAREST            0x00000200
   11.10  #define SDL_COPY_RLE_DESIRED        0x00001000
    12.1 --- a/src/video/SDL_blit_auto.c	Fri Feb 04 19:18:08 2011 -0800
    12.2 +++ b/src/video/SDL_blit_auto.c	Fri Feb 04 19:50:56 2011 -0800
    12.3 @@ -92,7 +92,7 @@
    12.4                      srcB = (srcB * srcA) / 255;
    12.5                  }
    12.6              }
    12.7 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
    12.8 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
    12.9              case SDL_COPY_BLEND:
   12.10                  dstR = srcR + ((255 - srcA) * dstR) / 255;
   12.11                  dstG = srcG + ((255 - srcA) * dstG) / 255;
   12.12 @@ -103,6 +103,11 @@
   12.13                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
   12.14                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
   12.15                  break;
   12.16 +            case SDL_COPY_MOD:
   12.17 +                dstR = (srcR * dstR) / 255;
   12.18 +                dstG = (srcG * dstG) / 255;
   12.19 +                dstB = (srcB * dstB) / 255;
   12.20 +                break;
   12.21              }
   12.22              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
   12.23              *dst = dstpixel;
   12.24 @@ -160,7 +165,7 @@
   12.25                      srcB = (srcB * srcA) / 255;
   12.26                  }
   12.27              }
   12.28 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
   12.29 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
   12.30              case SDL_COPY_BLEND:
   12.31                  dstR = srcR + ((255 - srcA) * dstR) / 255;
   12.32                  dstG = srcG + ((255 - srcA) * dstG) / 255;
   12.33 @@ -171,6 +176,11 @@
   12.34                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
   12.35                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
   12.36                  break;
   12.37 +            case SDL_COPY_MOD:
   12.38 +                dstR = (srcR * dstR) / 255;
   12.39 +                dstG = (srcG * dstG) / 255;
   12.40 +                dstB = (srcB * dstB) / 255;
   12.41 +                break;
   12.42              }
   12.43              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
   12.44              *dst = dstpixel;
   12.45 @@ -310,7 +320,7 @@
   12.46                      srcB = (srcB * srcA) / 255;
   12.47                  }
   12.48              }
   12.49 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
   12.50 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
   12.51              case SDL_COPY_BLEND:
   12.52                  dstR = srcR + ((255 - srcA) * dstR) / 255;
   12.53                  dstG = srcG + ((255 - srcA) * dstG) / 255;
   12.54 @@ -321,6 +331,11 @@
   12.55                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
   12.56                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
   12.57                  break;
   12.58 +            case SDL_COPY_MOD:
   12.59 +                dstR = (srcR * dstR) / 255;
   12.60 +                dstG = (srcG * dstG) / 255;
   12.61 +                dstB = (srcB * dstB) / 255;
   12.62 +                break;
   12.63              }
   12.64              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
   12.65              *dst = dstpixel;
   12.66 @@ -390,7 +405,7 @@
   12.67                      srcB = (srcB * srcA) / 255;
   12.68                  }
   12.69              }
   12.70 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
   12.71 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
   12.72              case SDL_COPY_BLEND:
   12.73                  dstR = srcR + ((255 - srcA) * dstR) / 255;
   12.74                  dstG = srcG + ((255 - srcA) * dstG) / 255;
   12.75 @@ -401,6 +416,11 @@
   12.76                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
   12.77                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
   12.78                  break;
   12.79 +            case SDL_COPY_MOD:
   12.80 +                dstR = (srcR * dstR) / 255;
   12.81 +                dstG = (srcG * dstG) / 255;
   12.82 +                dstB = (srcB * dstB) / 255;
   12.83 +                break;
   12.84              }
   12.85              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
   12.86              *dst = dstpixel;
   12.87 @@ -481,7 +501,7 @@
   12.88                      srcB = (srcB * srcA) / 255;
   12.89                  }
   12.90              }
   12.91 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
   12.92 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
   12.93              case SDL_COPY_BLEND:
   12.94                  dstR = srcR + ((255 - srcA) * dstR) / 255;
   12.95                  dstG = srcG + ((255 - srcA) * dstG) / 255;
   12.96 @@ -492,6 +512,11 @@
   12.97                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
   12.98                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
   12.99                  break;
  12.100 +            case SDL_COPY_MOD:
  12.101 +                dstR = (srcR * dstR) / 255;
  12.102 +                dstG = (srcG * dstG) / 255;
  12.103 +                dstB = (srcB * dstB) / 255;
  12.104 +                break;
  12.105              }
  12.106              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.107              *dst = dstpixel;
  12.108 @@ -549,7 +574,7 @@
  12.109                      srcB = (srcB * srcA) / 255;
  12.110                  }
  12.111              }
  12.112 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.113 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.114              case SDL_COPY_BLEND:
  12.115                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.116                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.117 @@ -560,6 +585,11 @@
  12.118                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.119                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.120                  break;
  12.121 +            case SDL_COPY_MOD:
  12.122 +                dstR = (srcR * dstR) / 255;
  12.123 +                dstG = (srcG * dstG) / 255;
  12.124 +                dstB = (srcB * dstB) / 255;
  12.125 +                break;
  12.126              }
  12.127              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.128              *dst = dstpixel;
  12.129 @@ -699,7 +729,7 @@
  12.130                      srcB = (srcB * srcA) / 255;
  12.131                  }
  12.132              }
  12.133 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.134 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.135              case SDL_COPY_BLEND:
  12.136                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.137                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.138 @@ -710,6 +740,11 @@
  12.139                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.140                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.141                  break;
  12.142 +            case SDL_COPY_MOD:
  12.143 +                dstR = (srcR * dstR) / 255;
  12.144 +                dstG = (srcG * dstG) / 255;
  12.145 +                dstB = (srcB * dstB) / 255;
  12.146 +                break;
  12.147              }
  12.148              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.149              *dst = dstpixel;
  12.150 @@ -779,7 +814,7 @@
  12.151                      srcB = (srcB * srcA) / 255;
  12.152                  }
  12.153              }
  12.154 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.155 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.156              case SDL_COPY_BLEND:
  12.157                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.158                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.159 @@ -790,6 +825,11 @@
  12.160                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.161                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.162                  break;
  12.163 +            case SDL_COPY_MOD:
  12.164 +                dstR = (srcR * dstR) / 255;
  12.165 +                dstG = (srcG * dstG) / 255;
  12.166 +                dstB = (srcB * dstB) / 255;
  12.167 +                break;
  12.168              }
  12.169              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.170              *dst = dstpixel;
  12.171 @@ -870,7 +910,7 @@
  12.172                      srcB = (srcB * srcA) / 255;
  12.173                  }
  12.174              }
  12.175 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.176 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.177              case SDL_COPY_BLEND:
  12.178                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.179                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.180 @@ -881,6 +921,11 @@
  12.181                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.182                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.183                  break;
  12.184 +            case SDL_COPY_MOD:
  12.185 +                dstR = (srcR * dstR) / 255;
  12.186 +                dstG = (srcG * dstG) / 255;
  12.187 +                dstB = (srcB * dstB) / 255;
  12.188 +                break;
  12.189              }
  12.190              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.191              *dst = dstpixel;
  12.192 @@ -938,7 +983,7 @@
  12.193                      srcB = (srcB * srcA) / 255;
  12.194                  }
  12.195              }
  12.196 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.197 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.198              case SDL_COPY_BLEND:
  12.199                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.200                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.201 @@ -949,6 +994,11 @@
  12.202                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.203                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.204                  break;
  12.205 +            case SDL_COPY_MOD:
  12.206 +                dstR = (srcR * dstR) / 255;
  12.207 +                dstG = (srcG * dstG) / 255;
  12.208 +                dstB = (srcB * dstB) / 255;
  12.209 +                break;
  12.210              }
  12.211              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.212              *dst = dstpixel;
  12.213 @@ -1088,7 +1138,7 @@
  12.214                      srcB = (srcB * srcA) / 255;
  12.215                  }
  12.216              }
  12.217 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.218 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.219              case SDL_COPY_BLEND:
  12.220                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.221                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.222 @@ -1099,6 +1149,11 @@
  12.223                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.224                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.225                  break;
  12.226 +            case SDL_COPY_MOD:
  12.227 +                dstR = (srcR * dstR) / 255;
  12.228 +                dstG = (srcG * dstG) / 255;
  12.229 +                dstB = (srcB * dstB) / 255;
  12.230 +                break;
  12.231              }
  12.232              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.233              *dst = dstpixel;
  12.234 @@ -1168,7 +1223,7 @@
  12.235                      srcB = (srcB * srcA) / 255;
  12.236                  }
  12.237              }
  12.238 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.239 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.240              case SDL_COPY_BLEND:
  12.241                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.242                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.243 @@ -1179,6 +1234,11 @@
  12.244                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.245                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.246                  break;
  12.247 +            case SDL_COPY_MOD:
  12.248 +                dstR = (srcR * dstR) / 255;
  12.249 +                dstG = (srcG * dstG) / 255;
  12.250 +                dstB = (srcB * dstB) / 255;
  12.251 +                break;
  12.252              }
  12.253              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.254              *dst = dstpixel;
  12.255 @@ -1259,7 +1319,7 @@
  12.256                      srcB = (srcB * srcA) / 255;
  12.257                  }
  12.258              }
  12.259 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.260 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.261              case SDL_COPY_BLEND:
  12.262                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.263                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.264 @@ -1270,6 +1330,11 @@
  12.265                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.266                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.267                  break;
  12.268 +            case SDL_COPY_MOD:
  12.269 +                dstR = (srcR * dstR) / 255;
  12.270 +                dstG = (srcG * dstG) / 255;
  12.271 +                dstB = (srcB * dstB) / 255;
  12.272 +                break;
  12.273              }
  12.274              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.275              *dst = dstpixel;
  12.276 @@ -1327,7 +1392,7 @@
  12.277                      srcB = (srcB * srcA) / 255;
  12.278                  }
  12.279              }
  12.280 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.281 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.282              case SDL_COPY_BLEND:
  12.283                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.284                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.285 @@ -1338,6 +1403,11 @@
  12.286                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.287                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.288                  break;
  12.289 +            case SDL_COPY_MOD:
  12.290 +                dstR = (srcR * dstR) / 255;
  12.291 +                dstG = (srcG * dstG) / 255;
  12.292 +                dstB = (srcB * dstB) / 255;
  12.293 +                break;
  12.294              }
  12.295              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.296              *dst = dstpixel;
  12.297 @@ -1477,7 +1547,7 @@
  12.298                      srcB = (srcB * srcA) / 255;
  12.299                  }
  12.300              }
  12.301 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.302 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.303              case SDL_COPY_BLEND:
  12.304                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.305                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.306 @@ -1488,6 +1558,11 @@
  12.307                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.308                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.309                  break;
  12.310 +            case SDL_COPY_MOD:
  12.311 +                dstR = (srcR * dstR) / 255;
  12.312 +                dstG = (srcG * dstG) / 255;
  12.313 +                dstB = (srcB * dstB) / 255;
  12.314 +                break;
  12.315              }
  12.316              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.317              *dst = dstpixel;
  12.318 @@ -1557,7 +1632,7 @@
  12.319                      srcB = (srcB * srcA) / 255;
  12.320                  }
  12.321              }
  12.322 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.323 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.324              case SDL_COPY_BLEND:
  12.325                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.326                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.327 @@ -1568,6 +1643,11 @@
  12.328                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.329                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.330                  break;
  12.331 +            case SDL_COPY_MOD:
  12.332 +                dstR = (srcR * dstR) / 255;
  12.333 +                dstG = (srcG * dstG) / 255;
  12.334 +                dstB = (srcB * dstB) / 255;
  12.335 +                break;
  12.336              }
  12.337              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.338              *dst = dstpixel;
  12.339 @@ -1643,7 +1723,7 @@
  12.340                      srcB = (srcB * srcA) / 255;
  12.341                  }
  12.342              }
  12.343 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.344 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.345              case SDL_COPY_BLEND:
  12.346                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.347                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.348 @@ -1654,6 +1734,11 @@
  12.349                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.350                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.351                  break;
  12.352 +            case SDL_COPY_MOD:
  12.353 +                dstR = (srcR * dstR) / 255;
  12.354 +                dstG = (srcG * dstG) / 255;
  12.355 +                dstB = (srcB * dstB) / 255;
  12.356 +                break;
  12.357              }
  12.358              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.359              *dst = dstpixel;
  12.360 @@ -1711,7 +1796,7 @@
  12.361                      srcB = (srcB * srcA) / 255;
  12.362                  }
  12.363              }
  12.364 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.365 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.366              case SDL_COPY_BLEND:
  12.367                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.368                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.369 @@ -1722,6 +1807,11 @@
  12.370                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.371                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.372                  break;
  12.373 +            case SDL_COPY_MOD:
  12.374 +                dstR = (srcR * dstR) / 255;
  12.375 +                dstG = (srcG * dstG) / 255;
  12.376 +                dstB = (srcB * dstB) / 255;
  12.377 +                break;
  12.378              }
  12.379              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.380              *dst = dstpixel;
  12.381 @@ -1861,7 +1951,7 @@
  12.382                      srcB = (srcB * srcA) / 255;
  12.383                  }
  12.384              }
  12.385 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.386 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.387              case SDL_COPY_BLEND:
  12.388                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.389                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.390 @@ -1872,6 +1962,11 @@
  12.391                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.392                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.393                  break;
  12.394 +            case SDL_COPY_MOD:
  12.395 +                dstR = (srcR * dstR) / 255;
  12.396 +                dstG = (srcG * dstG) / 255;
  12.397 +                dstB = (srcB * dstB) / 255;
  12.398 +                break;
  12.399              }
  12.400              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.401              *dst = dstpixel;
  12.402 @@ -1941,7 +2036,7 @@
  12.403                      srcB = (srcB * srcA) / 255;
  12.404                  }
  12.405              }
  12.406 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.407 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.408              case SDL_COPY_BLEND:
  12.409                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.410                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.411 @@ -1952,6 +2047,11 @@
  12.412                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.413                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.414                  break;
  12.415 +            case SDL_COPY_MOD:
  12.416 +                dstR = (srcR * dstR) / 255;
  12.417 +                dstG = (srcG * dstG) / 255;
  12.418 +                dstB = (srcB * dstB) / 255;
  12.419 +                break;
  12.420              }
  12.421              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.422              *dst = dstpixel;
  12.423 @@ -2032,7 +2132,7 @@
  12.424                      srcB = (srcB * srcA) / 255;
  12.425                  }
  12.426              }
  12.427 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.428 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.429              case SDL_COPY_BLEND:
  12.430                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.431                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.432 @@ -2043,6 +2143,11 @@
  12.433                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.434                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.435                  break;
  12.436 +            case SDL_COPY_MOD:
  12.437 +                dstR = (srcR * dstR) / 255;
  12.438 +                dstG = (srcG * dstG) / 255;
  12.439 +                dstB = (srcB * dstB) / 255;
  12.440 +                break;
  12.441              }
  12.442              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.443              *dst = dstpixel;
  12.444 @@ -2100,7 +2205,7 @@
  12.445                      srcB = (srcB * srcA) / 255;
  12.446                  }
  12.447              }
  12.448 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.449 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.450              case SDL_COPY_BLEND:
  12.451                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.452                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.453 @@ -2111,6 +2216,11 @@
  12.454                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.455                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.456                  break;
  12.457 +            case SDL_COPY_MOD:
  12.458 +                dstR = (srcR * dstR) / 255;
  12.459 +                dstG = (srcG * dstG) / 255;
  12.460 +                dstB = (srcB * dstB) / 255;
  12.461 +                break;
  12.462              }
  12.463              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.464              *dst = dstpixel;
  12.465 @@ -2250,7 +2360,7 @@
  12.466                      srcB = (srcB * srcA) / 255;
  12.467                  }
  12.468              }
  12.469 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.470 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.471              case SDL_COPY_BLEND:
  12.472                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.473                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.474 @@ -2261,6 +2371,11 @@
  12.475                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.476                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.477                  break;
  12.478 +            case SDL_COPY_MOD:
  12.479 +                dstR = (srcR * dstR) / 255;
  12.480 +                dstG = (srcG * dstG) / 255;
  12.481 +                dstB = (srcB * dstB) / 255;
  12.482 +                break;
  12.483              }
  12.484              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.485              *dst = dstpixel;
  12.486 @@ -2330,7 +2445,7 @@
  12.487                      srcB = (srcB * srcA) / 255;
  12.488                  }
  12.489              }
  12.490 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.491 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.492              case SDL_COPY_BLEND:
  12.493                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.494                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.495 @@ -2341,6 +2456,11 @@
  12.496                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.497                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.498                  break;
  12.499 +            case SDL_COPY_MOD:
  12.500 +                dstR = (srcR * dstR) / 255;
  12.501 +                dstG = (srcG * dstG) / 255;
  12.502 +                dstB = (srcB * dstB) / 255;
  12.503 +                break;
  12.504              }
  12.505              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.506              *dst = dstpixel;
  12.507 @@ -2421,7 +2541,7 @@
  12.508                      srcB = (srcB * srcA) / 255;
  12.509                  }
  12.510              }
  12.511 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.512 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.513              case SDL_COPY_BLEND:
  12.514                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.515                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.516 @@ -2432,6 +2552,11 @@
  12.517                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.518                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.519                  break;
  12.520 +            case SDL_COPY_MOD:
  12.521 +                dstR = (srcR * dstR) / 255;
  12.522 +                dstG = (srcG * dstG) / 255;
  12.523 +                dstB = (srcB * dstB) / 255;
  12.524 +                break;
  12.525              }
  12.526              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.527              *dst = dstpixel;
  12.528 @@ -2489,7 +2614,7 @@
  12.529                      srcB = (srcB * srcA) / 255;
  12.530                  }
  12.531              }
  12.532 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.533 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.534              case SDL_COPY_BLEND:
  12.535                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.536                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.537 @@ -2500,6 +2625,11 @@
  12.538                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.539                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.540                  break;
  12.541 +            case SDL_COPY_MOD:
  12.542 +                dstR = (srcR * dstR) / 255;
  12.543 +                dstG = (srcG * dstG) / 255;
  12.544 +                dstB = (srcB * dstB) / 255;
  12.545 +                break;
  12.546              }
  12.547              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.548              *dst = dstpixel;
  12.549 @@ -2639,7 +2769,7 @@
  12.550                      srcB = (srcB * srcA) / 255;
  12.551                  }
  12.552              }
  12.553 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.554 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.555              case SDL_COPY_BLEND:
  12.556                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.557                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.558 @@ -2650,6 +2780,11 @@
  12.559                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.560                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.561                  break;
  12.562 +            case SDL_COPY_MOD:
  12.563 +                dstR = (srcR * dstR) / 255;
  12.564 +                dstG = (srcG * dstG) / 255;
  12.565 +                dstB = (srcB * dstB) / 255;
  12.566 +                break;
  12.567              }
  12.568              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.569              *dst = dstpixel;
  12.570 @@ -2719,7 +2854,7 @@
  12.571                      srcB = (srcB * srcA) / 255;
  12.572                  }
  12.573              }
  12.574 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.575 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.576              case SDL_COPY_BLEND:
  12.577                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.578                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.579 @@ -2730,6 +2865,11 @@
  12.580                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.581                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.582                  break;
  12.583 +            case SDL_COPY_MOD:
  12.584 +                dstR = (srcR * dstR) / 255;
  12.585 +                dstG = (srcG * dstG) / 255;
  12.586 +                dstB = (srcB * dstB) / 255;
  12.587 +                break;
  12.588              }
  12.589              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.590              *dst = dstpixel;
  12.591 @@ -2810,7 +2950,7 @@
  12.592                      srcB = (srcB * srcA) / 255;
  12.593                  }
  12.594              }
  12.595 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.596 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.597              case SDL_COPY_BLEND:
  12.598                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.599                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.600 @@ -2821,6 +2961,11 @@
  12.601                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.602                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.603                  break;
  12.604 +            case SDL_COPY_MOD:
  12.605 +                dstR = (srcR * dstR) / 255;
  12.606 +                dstG = (srcG * dstG) / 255;
  12.607 +                dstB = (srcB * dstB) / 255;
  12.608 +                break;
  12.609              }
  12.610              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.611              *dst = dstpixel;
  12.612 @@ -2878,7 +3023,7 @@
  12.613                      srcB = (srcB * srcA) / 255;
  12.614                  }
  12.615              }
  12.616 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.617 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.618              case SDL_COPY_BLEND:
  12.619                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.620                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.621 @@ -2889,6 +3034,11 @@
  12.622                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.623                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.624                  break;
  12.625 +            case SDL_COPY_MOD:
  12.626 +                dstR = (srcR * dstR) / 255;
  12.627 +                dstG = (srcG * dstG) / 255;
  12.628 +                dstB = (srcB * dstB) / 255;
  12.629 +                break;
  12.630              }
  12.631              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.632              *dst = dstpixel;
  12.633 @@ -3028,7 +3178,7 @@
  12.634                      srcB = (srcB * srcA) / 255;
  12.635                  }
  12.636              }
  12.637 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.638 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.639              case SDL_COPY_BLEND:
  12.640                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.641                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.642 @@ -3039,6 +3189,11 @@
  12.643                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.644                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.645                  break;
  12.646 +            case SDL_COPY_MOD:
  12.647 +                dstR = (srcR * dstR) / 255;
  12.648 +                dstG = (srcG * dstG) / 255;
  12.649 +                dstB = (srcB * dstB) / 255;
  12.650 +                break;
  12.651              }
  12.652              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.653              *dst = dstpixel;
  12.654 @@ -3108,7 +3263,7 @@
  12.655                      srcB = (srcB * srcA) / 255;
  12.656                  }
  12.657              }
  12.658 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.659 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.660              case SDL_COPY_BLEND:
  12.661                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.662                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.663 @@ -3119,6 +3274,11 @@
  12.664                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.665                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.666                  break;
  12.667 +            case SDL_COPY_MOD:
  12.668 +                dstR = (srcR * dstR) / 255;
  12.669 +                dstG = (srcG * dstG) / 255;
  12.670 +                dstB = (srcB * dstB) / 255;
  12.671 +                break;
  12.672              }
  12.673              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.674              *dst = dstpixel;
  12.675 @@ -3194,7 +3354,7 @@
  12.676                      srcB = (srcB * srcA) / 255;
  12.677                  }
  12.678              }
  12.679 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.680 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.681              case SDL_COPY_BLEND:
  12.682                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.683                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.684 @@ -3205,6 +3365,11 @@
  12.685                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.686                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.687                  break;
  12.688 +            case SDL_COPY_MOD:
  12.689 +                dstR = (srcR * dstR) / 255;
  12.690 +                dstG = (srcG * dstG) / 255;
  12.691 +                dstB = (srcB * dstB) / 255;
  12.692 +                break;
  12.693              }
  12.694              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.695              *dst = dstpixel;
  12.696 @@ -3262,7 +3427,7 @@
  12.697                      srcB = (srcB * srcA) / 255;
  12.698                  }
  12.699              }
  12.700 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.701 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.702              case SDL_COPY_BLEND:
  12.703                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.704                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.705 @@ -3273,6 +3438,11 @@
  12.706                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.707                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.708                  break;
  12.709 +            case SDL_COPY_MOD:
  12.710 +                dstR = (srcR * dstR) / 255;
  12.711 +                dstG = (srcG * dstG) / 255;
  12.712 +                dstB = (srcB * dstB) / 255;
  12.713 +                break;
  12.714              }
  12.715              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.716              *dst = dstpixel;
  12.717 @@ -3412,7 +3582,7 @@
  12.718                      srcB = (srcB * srcA) / 255;
  12.719                  }
  12.720              }
  12.721 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.722 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.723              case SDL_COPY_BLEND:
  12.724                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.725                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.726 @@ -3423,6 +3593,11 @@
  12.727                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.728                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.729                  break;
  12.730 +            case SDL_COPY_MOD:
  12.731 +                dstR = (srcR * dstR) / 255;
  12.732 +                dstG = (srcG * dstG) / 255;
  12.733 +                dstB = (srcB * dstB) / 255;
  12.734 +                break;
  12.735              }
  12.736              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.737              *dst = dstpixel;
  12.738 @@ -3492,7 +3667,7 @@
  12.739                      srcB = (srcB * srcA) / 255;
  12.740                  }
  12.741              }
  12.742 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.743 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.744              case SDL_COPY_BLEND:
  12.745                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.746                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.747 @@ -3503,6 +3678,11 @@
  12.748                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.749                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.750                  break;
  12.751 +            case SDL_COPY_MOD:
  12.752 +                dstR = (srcR * dstR) / 255;
  12.753 +                dstG = (srcG * dstG) / 255;
  12.754 +                dstB = (srcB * dstB) / 255;
  12.755 +                break;
  12.756              }
  12.757              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.758              *dst = dstpixel;
  12.759 @@ -3583,7 +3763,7 @@
  12.760                      srcB = (srcB * srcA) / 255;
  12.761                  }
  12.762              }
  12.763 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.764 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.765              case SDL_COPY_BLEND:
  12.766                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.767                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.768 @@ -3594,6 +3774,11 @@
  12.769                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.770                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.771                  break;
  12.772 +            case SDL_COPY_MOD:
  12.773 +                dstR = (srcR * dstR) / 255;
  12.774 +                dstG = (srcG * dstG) / 255;
  12.775 +                dstB = (srcB * dstB) / 255;
  12.776 +                break;
  12.777              }
  12.778              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.779              *dst = dstpixel;
  12.780 @@ -3651,7 +3836,7 @@
  12.781                      srcB = (srcB * srcA) / 255;
  12.782                  }
  12.783              }
  12.784 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.785 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.786              case SDL_COPY_BLEND:
  12.787                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.788                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.789 @@ -3662,6 +3847,11 @@
  12.790                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.791                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.792                  break;
  12.793 +            case SDL_COPY_MOD:
  12.794 +                dstR = (srcR * dstR) / 255;
  12.795 +                dstG = (srcG * dstG) / 255;
  12.796 +                dstB = (srcB * dstB) / 255;
  12.797 +                break;
  12.798              }
  12.799              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.800              *dst = dstpixel;
  12.801 @@ -3801,7 +3991,7 @@
  12.802                      srcB = (srcB * srcA) / 255;
  12.803                  }
  12.804              }
  12.805 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.806 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.807              case SDL_COPY_BLEND:
  12.808                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.809                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.810 @@ -3812,6 +4002,11 @@
  12.811                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.812                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.813                  break;
  12.814 +            case SDL_COPY_MOD:
  12.815 +                dstR = (srcR * dstR) / 255;
  12.816 +                dstG = (srcG * dstG) / 255;
  12.817 +                dstB = (srcB * dstB) / 255;
  12.818 +                break;
  12.819              }
  12.820              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.821              *dst = dstpixel;
  12.822 @@ -3881,7 +4076,7 @@
  12.823                      srcB = (srcB * srcA) / 255;
  12.824                  }
  12.825              }
  12.826 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.827 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.828              case SDL_COPY_BLEND:
  12.829                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.830                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.831 @@ -3892,6 +4087,11 @@
  12.832                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.833                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.834                  break;
  12.835 +            case SDL_COPY_MOD:
  12.836 +                dstR = (srcR * dstR) / 255;
  12.837 +                dstG = (srcG * dstG) / 255;
  12.838 +                dstB = (srcB * dstB) / 255;
  12.839 +                break;
  12.840              }
  12.841              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.842              *dst = dstpixel;
  12.843 @@ -3972,7 +4172,7 @@
  12.844                      srcB = (srcB * srcA) / 255;
  12.845                  }
  12.846              }
  12.847 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.848 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.849              case SDL_COPY_BLEND:
  12.850                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.851                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.852 @@ -3983,6 +4183,11 @@
  12.853                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.854                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.855                  break;
  12.856 +            case SDL_COPY_MOD:
  12.857 +                dstR = (srcR * dstR) / 255;
  12.858 +                dstG = (srcG * dstG) / 255;
  12.859 +                dstB = (srcB * dstB) / 255;
  12.860 +                break;
  12.861              }
  12.862              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.863              *dst = dstpixel;
  12.864 @@ -4040,7 +4245,7 @@
  12.865                      srcB = (srcB * srcA) / 255;
  12.866                  }
  12.867              }
  12.868 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.869 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.870              case SDL_COPY_BLEND:
  12.871                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.872                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.873 @@ -4051,6 +4256,11 @@
  12.874                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.875                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.876                  break;
  12.877 +            case SDL_COPY_MOD:
  12.878 +                dstR = (srcR * dstR) / 255;
  12.879 +                dstG = (srcG * dstG) / 255;
  12.880 +                dstB = (srcB * dstB) / 255;
  12.881 +                break;
  12.882              }
  12.883              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.884              *dst = dstpixel;
  12.885 @@ -4190,7 +4400,7 @@
  12.886                      srcB = (srcB * srcA) / 255;
  12.887                  }
  12.888              }
  12.889 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.890 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.891              case SDL_COPY_BLEND:
  12.892                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.893                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.894 @@ -4201,6 +4411,11 @@
  12.895                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.896                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.897                  break;
  12.898 +            case SDL_COPY_MOD:
  12.899 +                dstR = (srcR * dstR) / 255;
  12.900 +                dstG = (srcG * dstG) / 255;
  12.901 +                dstB = (srcB * dstB) / 255;
  12.902 +                break;
  12.903              }
  12.904              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.905              *dst = dstpixel;
  12.906 @@ -4270,7 +4485,7 @@
  12.907                      srcB = (srcB * srcA) / 255;
  12.908                  }
  12.909              }
  12.910 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.911 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.912              case SDL_COPY_BLEND:
  12.913                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.914                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.915 @@ -4281,6 +4496,11 @@
  12.916                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.917                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.918                  break;
  12.919 +            case SDL_COPY_MOD:
  12.920 +                dstR = (srcR * dstR) / 255;
  12.921 +                dstG = (srcG * dstG) / 255;
  12.922 +                dstB = (srcB * dstB) / 255;
  12.923 +                break;
  12.924              }
  12.925              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
  12.926              *dst = dstpixel;
  12.927 @@ -4361,7 +4581,7 @@
  12.928                      srcB = (srcB * srcA) / 255;
  12.929                  }
  12.930              }
  12.931 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.932 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.933              case SDL_COPY_BLEND:
  12.934                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.935                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.936 @@ -4372,6 +4592,11 @@
  12.937                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.938                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.939                  break;
  12.940 +            case SDL_COPY_MOD:
  12.941 +                dstR = (srcR * dstR) / 255;
  12.942 +                dstG = (srcG * dstG) / 255;
  12.943 +                dstB = (srcB * dstB) / 255;
  12.944 +                break;
  12.945              }
  12.946              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.947              *dst = dstpixel;
  12.948 @@ -4429,7 +4654,7 @@
  12.949                      srcB = (srcB * srcA) / 255;
  12.950                  }
  12.951              }
  12.952 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.953 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.954              case SDL_COPY_BLEND:
  12.955                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.956                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.957 @@ -4440,6 +4665,11 @@
  12.958                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.959                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.960                  break;
  12.961 +            case SDL_COPY_MOD:
  12.962 +                dstR = (srcR * dstR) / 255;
  12.963 +                dstG = (srcG * dstG) / 255;
  12.964 +                dstB = (srcB * dstB) / 255;
  12.965 +                break;
  12.966              }
  12.967              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.968              *dst = dstpixel;
  12.969 @@ -4579,7 +4809,7 @@
  12.970                      srcB = (srcB * srcA) / 255;
  12.971                  }
  12.972              }
  12.973 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.974 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.975              case SDL_COPY_BLEND:
  12.976                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.977                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.978 @@ -4590,6 +4820,11 @@
  12.979                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
  12.980                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
  12.981                  break;
  12.982 +            case SDL_COPY_MOD:
  12.983 +                dstR = (srcR * dstR) / 255;
  12.984 +                dstG = (srcG * dstG) / 255;
  12.985 +                dstB = (srcB * dstB) / 255;
  12.986 +                break;
  12.987              }
  12.988              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
  12.989              *dst = dstpixel;
  12.990 @@ -4659,7 +4894,7 @@
  12.991                      srcB = (srcB * srcA) / 255;
  12.992                  }
  12.993              }
  12.994 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
  12.995 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
  12.996              case SDL_COPY_BLEND:
  12.997                  dstR = srcR + ((255 - srcA) * dstR) / 255;
  12.998                  dstG = srcG + ((255 - srcA) * dstG) / 255;
  12.999 @@ -4670,6 +4905,11 @@
 12.1000                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1001                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1002                  break;
 12.1003 +            case SDL_COPY_MOD:
 12.1004 +                dstR = (srcR * dstR) / 255;
 12.1005 +                dstG = (srcG * dstG) / 255;
 12.1006 +                dstB = (srcB * dstB) / 255;
 12.1007 +                break;
 12.1008              }
 12.1009              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1010              *dst = dstpixel;
 12.1011 @@ -4750,7 +4990,7 @@
 12.1012                      srcB = (srcB * srcA) / 255;
 12.1013                  }
 12.1014              }
 12.1015 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1016 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1017              case SDL_COPY_BLEND:
 12.1018                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1019                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1020 @@ -4761,6 +5001,11 @@
 12.1021                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1022                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1023                  break;
 12.1024 +            case SDL_COPY_MOD:
 12.1025 +                dstR = (srcR * dstR) / 255;
 12.1026 +                dstG = (srcG * dstG) / 255;
 12.1027 +                dstB = (srcB * dstB) / 255;
 12.1028 +                break;
 12.1029              }
 12.1030              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1031              *dst = dstpixel;
 12.1032 @@ -4818,7 +5063,7 @@
 12.1033                      srcB = (srcB * srcA) / 255;
 12.1034                  }
 12.1035              }
 12.1036 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1037 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1038              case SDL_COPY_BLEND:
 12.1039                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1040                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1041 @@ -4829,6 +5074,11 @@
 12.1042                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1043                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1044                  break;
 12.1045 +            case SDL_COPY_MOD:
 12.1046 +                dstR = (srcR * dstR) / 255;
 12.1047 +                dstG = (srcG * dstG) / 255;
 12.1048 +                dstB = (srcB * dstB) / 255;
 12.1049 +                break;
 12.1050              }
 12.1051              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1052              *dst = dstpixel;
 12.1053 @@ -4968,7 +5218,7 @@
 12.1054                      srcB = (srcB * srcA) / 255;
 12.1055                  }
 12.1056              }
 12.1057 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1058 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1059              case SDL_COPY_BLEND:
 12.1060                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1061                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1062 @@ -4979,6 +5229,11 @@
 12.1063                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1064                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1065                  break;
 12.1066 +            case SDL_COPY_MOD:
 12.1067 +                dstR = (srcR * dstR) / 255;
 12.1068 +                dstG = (srcG * dstG) / 255;
 12.1069 +                dstB = (srcB * dstB) / 255;
 12.1070 +                break;
 12.1071              }
 12.1072              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1073              *dst = dstpixel;
 12.1074 @@ -5048,7 +5303,7 @@
 12.1075                      srcB = (srcB * srcA) / 255;
 12.1076                  }
 12.1077              }
 12.1078 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1079 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1080              case SDL_COPY_BLEND:
 12.1081                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1082                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1083 @@ -5059,6 +5314,11 @@
 12.1084                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1085                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1086                  break;
 12.1087 +            case SDL_COPY_MOD:
 12.1088 +                dstR = (srcR * dstR) / 255;
 12.1089 +                dstG = (srcG * dstG) / 255;
 12.1090 +                dstB = (srcB * dstB) / 255;
 12.1091 +                break;
 12.1092              }
 12.1093              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1094              *dst = dstpixel;
 12.1095 @@ -5139,7 +5399,7 @@
 12.1096                      srcB = (srcB * srcA) / 255;
 12.1097                  }
 12.1098              }
 12.1099 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1100 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1101              case SDL_COPY_BLEND:
 12.1102                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1103                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1104 @@ -5150,6 +5410,11 @@
 12.1105                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1106                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1107                  break;
 12.1108 +            case SDL_COPY_MOD:
 12.1109 +                dstR = (srcR * dstR) / 255;
 12.1110 +                dstG = (srcG * dstG) / 255;
 12.1111 +                dstB = (srcB * dstB) / 255;
 12.1112 +                break;
 12.1113              }
 12.1114              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1115              *dst = dstpixel;
 12.1116 @@ -5207,7 +5472,7 @@
 12.1117                      srcB = (srcB * srcA) / 255;
 12.1118                  }
 12.1119              }
 12.1120 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1121 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1122              case SDL_COPY_BLEND:
 12.1123                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1124                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1125 @@ -5218,6 +5483,11 @@
 12.1126                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1127                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1128                  break;
 12.1129 +            case SDL_COPY_MOD:
 12.1130 +                dstR = (srcR * dstR) / 255;
 12.1131 +                dstG = (srcG * dstG) / 255;
 12.1132 +                dstB = (srcB * dstB) / 255;
 12.1133 +                break;
 12.1134              }
 12.1135              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1136              *dst = dstpixel;
 12.1137 @@ -5357,7 +5627,7 @@
 12.1138                      srcB = (srcB * srcA) / 255;
 12.1139                  }
 12.1140              }
 12.1141 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1142 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1143              case SDL_COPY_BLEND:
 12.1144                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1145                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1146 @@ -5368,6 +5638,11 @@
 12.1147                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1148                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1149                  break;
 12.1150 +            case SDL_COPY_MOD:
 12.1151 +                dstR = (srcR * dstR) / 255;
 12.1152 +                dstG = (srcG * dstG) / 255;
 12.1153 +                dstB = (srcB * dstB) / 255;
 12.1154 +                break;
 12.1155              }
 12.1156              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1157              *dst = dstpixel;
 12.1158 @@ -5437,7 +5712,7 @@
 12.1159                      srcB = (srcB * srcA) / 255;
 12.1160                  }
 12.1161              }
 12.1162 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1163 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1164              case SDL_COPY_BLEND:
 12.1165                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1166                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1167 @@ -5448,6 +5723,11 @@
 12.1168                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1169                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1170                  break;
 12.1171 +            case SDL_COPY_MOD:
 12.1172 +                dstR = (srcR * dstR) / 255;
 12.1173 +                dstG = (srcG * dstG) / 255;
 12.1174 +                dstB = (srcB * dstB) / 255;
 12.1175 +                break;
 12.1176              }
 12.1177              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1178              *dst = dstpixel;
 12.1179 @@ -5528,7 +5808,7 @@
 12.1180                      srcB = (srcB * srcA) / 255;
 12.1181                  }
 12.1182              }
 12.1183 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1184 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1185              case SDL_COPY_BLEND:
 12.1186                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1187                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1188 @@ -5539,6 +5819,11 @@
 12.1189                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1190                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1191                  break;
 12.1192 +            case SDL_COPY_MOD:
 12.1193 +                dstR = (srcR * dstR) / 255;
 12.1194 +                dstG = (srcG * dstG) / 255;
 12.1195 +                dstB = (srcB * dstB) / 255;
 12.1196 +                break;
 12.1197              }
 12.1198              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1199              *dst = dstpixel;
 12.1200 @@ -5596,7 +5881,7 @@
 12.1201                      srcB = (srcB * srcA) / 255;
 12.1202                  }
 12.1203              }
 12.1204 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1205 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1206              case SDL_COPY_BLEND:
 12.1207                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1208                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1209 @@ -5607,6 +5892,11 @@
 12.1210                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1211                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1212                  break;
 12.1213 +            case SDL_COPY_MOD:
 12.1214 +                dstR = (srcR * dstR) / 255;
 12.1215 +                dstG = (srcG * dstG) / 255;
 12.1216 +                dstB = (srcB * dstB) / 255;
 12.1217 +                break;
 12.1218              }
 12.1219              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1220              *dst = dstpixel;
 12.1221 @@ -5746,7 +6036,7 @@
 12.1222                      srcB = (srcB * srcA) / 255;
 12.1223                  }
 12.1224              }
 12.1225 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1226 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1227              case SDL_COPY_BLEND:
 12.1228                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1229                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1230 @@ -5757,6 +6047,11 @@
 12.1231                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1232                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1233                  break;
 12.1234 +            case SDL_COPY_MOD:
 12.1235 +                dstR = (srcR * dstR) / 255;
 12.1236 +                dstG = (srcG * dstG) / 255;
 12.1237 +                dstB = (srcB * dstB) / 255;
 12.1238 +                break;
 12.1239              }
 12.1240              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1241              *dst = dstpixel;
 12.1242 @@ -5826,7 +6121,7 @@
 12.1243                      srcB = (srcB * srcA) / 255;
 12.1244                  }
 12.1245              }
 12.1246 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1247 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1248              case SDL_COPY_BLEND:
 12.1249                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1250                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1251 @@ -5837,6 +6132,11 @@
 12.1252                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1253                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1254                  break;
 12.1255 +            case SDL_COPY_MOD:
 12.1256 +                dstR = (srcR * dstR) / 255;
 12.1257 +                dstG = (srcG * dstG) / 255;
 12.1258 +                dstB = (srcB * dstB) / 255;
 12.1259 +                break;
 12.1260              }
 12.1261              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1262              *dst = dstpixel;
 12.1263 @@ -5917,7 +6217,7 @@
 12.1264                      srcB = (srcB * srcA) / 255;
 12.1265                  }
 12.1266              }
 12.1267 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1268 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1269              case SDL_COPY_BLEND:
 12.1270                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1271                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1272 @@ -5928,6 +6228,11 @@
 12.1273                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1274                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1275                  break;
 12.1276 +            case SDL_COPY_MOD:
 12.1277 +                dstR = (srcR * dstR) / 255;
 12.1278 +                dstG = (srcG * dstG) / 255;
 12.1279 +                dstB = (srcB * dstB) / 255;
 12.1280 +                break;
 12.1281              }
 12.1282              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1283              *dst = dstpixel;
 12.1284 @@ -5985,7 +6290,7 @@
 12.1285                      srcB = (srcB * srcA) / 255;
 12.1286                  }
 12.1287              }
 12.1288 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1289 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1290              case SDL_COPY_BLEND:
 12.1291                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1292                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1293 @@ -5996,6 +6301,11 @@
 12.1294                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1295                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1296                  break;
 12.1297 +            case SDL_COPY_MOD:
 12.1298 +                dstR = (srcR * dstR) / 255;
 12.1299 +                dstG = (srcG * dstG) / 255;
 12.1300 +                dstB = (srcB * dstB) / 255;
 12.1301 +                break;
 12.1302              }
 12.1303              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1304              *dst = dstpixel;
 12.1305 @@ -6135,7 +6445,7 @@
 12.1306                      srcB = (srcB * srcA) / 255;
 12.1307                  }
 12.1308              }
 12.1309 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1310 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1311              case SDL_COPY_BLEND:
 12.1312                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1313                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1314 @@ -6146,6 +6456,11 @@
 12.1315                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1316                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1317                  break;
 12.1318 +            case SDL_COPY_MOD:
 12.1319 +                dstR = (srcR * dstR) / 255;
 12.1320 +                dstG = (srcG * dstG) / 255;
 12.1321 +                dstB = (srcB * dstB) / 255;
 12.1322 +                break;
 12.1323              }
 12.1324              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1325              *dst = dstpixel;
 12.1326 @@ -6215,7 +6530,7 @@
 12.1327                      srcB = (srcB * srcA) / 255;
 12.1328                  }
 12.1329              }
 12.1330 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1331 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1332              case SDL_COPY_BLEND:
 12.1333                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1334                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1335 @@ -6226,6 +6541,11 @@
 12.1336                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1337                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1338                  break;
 12.1339 +            case SDL_COPY_MOD:
 12.1340 +                dstR = (srcR * dstR) / 255;
 12.1341 +                dstG = (srcG * dstG) / 255;
 12.1342 +                dstB = (srcB * dstB) / 255;
 12.1343 +                break;
 12.1344              }
 12.1345              dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1346              *dst = dstpixel;
 12.1347 @@ -6306,7 +6626,7 @@
 12.1348                      srcB = (srcB * srcA) / 255;
 12.1349                  }
 12.1350              }
 12.1351 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1352 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1353              case SDL_COPY_BLEND:
 12.1354                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1355                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1356 @@ -6317,6 +6637,11 @@
 12.1357                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1358                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1359                  break;
 12.1360 +            case SDL_COPY_MOD:
 12.1361 +                dstR = (srcR * dstR) / 255;
 12.1362 +                dstG = (srcG * dstG) / 255;
 12.1363 +                dstB = (srcB * dstB) / 255;
 12.1364 +                break;
 12.1365              }
 12.1366              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1367              *dst = dstpixel;
 12.1368 @@ -6374,7 +6699,7 @@
 12.1369                      srcB = (srcB * srcA) / 255;
 12.1370                  }
 12.1371              }
 12.1372 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1373 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1374              case SDL_COPY_BLEND:
 12.1375                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1376                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1377 @@ -6385,6 +6710,11 @@
 12.1378                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1379                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1380                  break;
 12.1381 +            case SDL_COPY_MOD:
 12.1382 +                dstR = (srcR * dstR) / 255;
 12.1383 +                dstG = (srcG * dstG) / 255;
 12.1384 +                dstB = (srcB * dstB) / 255;
 12.1385 +                break;
 12.1386              }
 12.1387              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1388              *dst = dstpixel;
 12.1389 @@ -6524,7 +6854,7 @@
 12.1390                      srcB = (srcB * srcA) / 255;
 12.1391                  }
 12.1392              }
 12.1393 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1394 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1395              case SDL_COPY_BLEND:
 12.1396                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1397                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1398 @@ -6535,6 +6865,11 @@
 12.1399                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1400                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1401                  break;
 12.1402 +            case SDL_COPY_MOD:
 12.1403 +                dstR = (srcR * dstR) / 255;
 12.1404 +                dstG = (srcG * dstG) / 255;
 12.1405 +                dstB = (srcB * dstB) / 255;
 12.1406 +                break;
 12.1407              }
 12.1408              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1409              *dst = dstpixel;
 12.1410 @@ -6604,7 +6939,7 @@
 12.1411                      srcB = (srcB * srcA) / 255;
 12.1412                  }
 12.1413              }
 12.1414 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1415 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1416              case SDL_COPY_BLEND:
 12.1417                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1418                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1419 @@ -6615,6 +6950,11 @@
 12.1420                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1421                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1422                  break;
 12.1423 +            case SDL_COPY_MOD:
 12.1424 +                dstR = (srcR * dstR) / 255;
 12.1425 +                dstG = (srcG * dstG) / 255;
 12.1426 +                dstB = (srcB * dstB) / 255;
 12.1427 +                break;
 12.1428              }
 12.1429              dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
 12.1430              *dst = dstpixel;
 12.1431 @@ -6695,7 +7035,7 @@
 12.1432                      srcB = (srcB * srcA) / 255;
 12.1433                  }
 12.1434              }
 12.1435 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1436 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1437              case SDL_COPY_BLEND:
 12.1438                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1439                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1440 @@ -6706,6 +7046,11 @@
 12.1441                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1442                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1443                  break;
 12.1444 +            case SDL_COPY_MOD:
 12.1445 +                dstR = (srcR * dstR) / 255;
 12.1446 +                dstG = (srcG * dstG) / 255;
 12.1447 +                dstB = (srcB * dstB) / 255;
 12.1448 +                break;
 12.1449              }
 12.1450              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1451              *dst = dstpixel;
 12.1452 @@ -6763,7 +7108,7 @@
 12.1453                      srcB = (srcB * srcA) / 255;
 12.1454                  }
 12.1455              }
 12.1456 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1457 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1458              case SDL_COPY_BLEND:
 12.1459                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1460                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1461 @@ -6774,6 +7119,11 @@
 12.1462                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1463                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1464                  break;
 12.1465 +            case SDL_COPY_MOD:
 12.1466 +                dstR = (srcR * dstR) / 255;
 12.1467 +                dstG = (srcG * dstG) / 255;
 12.1468 +                dstB = (srcB * dstB) / 255;
 12.1469 +                break;
 12.1470              }
 12.1471              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1472              *dst = dstpixel;
 12.1473 @@ -6913,7 +7263,7 @@
 12.1474                      srcB = (srcB * srcA) / 255;
 12.1475                  }
 12.1476              }
 12.1477 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1478 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1479              case SDL_COPY_BLEND:
 12.1480                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1481                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1482 @@ -6924,6 +7274,11 @@
 12.1483                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1484                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1485                  break;
 12.1486 +            case SDL_COPY_MOD:
 12.1487 +                dstR = (srcR * dstR) / 255;
 12.1488 +                dstG = (srcG * dstG) / 255;
 12.1489 +                dstB = (srcB * dstB) / 255;
 12.1490 +                break;
 12.1491              }
 12.1492              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1493              *dst = dstpixel;
 12.1494 @@ -6993,7 +7348,7 @@
 12.1495                      srcB = (srcB * srcA) / 255;
 12.1496                  }
 12.1497              }
 12.1498 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
 12.1499 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
 12.1500              case SDL_COPY_BLEND:
 12.1501                  dstR = srcR + ((255 - srcA) * dstR) / 255;
 12.1502                  dstG = srcG + ((255 - srcA) * dstG) / 255;
 12.1503 @@ -7004,6 +7359,11 @@
 12.1504                  dstG = srcG + dstG; if (dstG > 255) dstG = 255;
 12.1505                  dstB = srcB + dstB; if (dstB > 255) dstB = 255;
 12.1506                  break;
 12.1507 +            case SDL_COPY_MOD:
 12.1508 +                dstR = (srcR * dstR) / 255;
 12.1509 +                dstG = (srcG * dstG) / 255;
 12.1510 +                dstB = (srcB * dstB) / 255;
 12.1511 +                break;
 12.1512              }
 12.1513              dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
 12.1514              *dst = dstpixel;
 12.1515 @@ -7017,131 +7377,131 @@
 12.1516  
 12.1517  SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[] = {
 12.1518      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Scale },
 12.1519 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend },
 12.1520 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend_Scale },
 12.1521 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend },
 12.1522 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Blend_Scale },
 12.1523      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate },
 12.1524      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Scale },
 12.1525 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend },
 12.1526 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale },
 12.1527 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend },
 12.1528 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale },
 12.1529      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Scale },
 12.1530 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend },
 12.1531 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend_Scale },
 12.1532 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend },
 12.1533 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Blend_Scale },
 12.1534      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate },
 12.1535      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Scale },
 12.1536 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend },
 12.1537 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale },
 12.1538 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend },
 12.1539 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale },
 12.1540      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Scale },
 12.1541 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Blend },
 12.1542 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Blend_Scale },
 12.1543 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Blend },
 12.1544 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Blend_Scale },
 12.1545      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Modulate },
 12.1546      { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Modulate_Scale },
 12.1547 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Modulate_Blend },
 12.1548 -    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale },
 12.1549 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Modulate_Blend },
 12.1550 +    { SDL_PIXELFORMAT_RGB888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale },
 12.1551      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Scale },
 12.1552 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend },
 12.1553 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend_Scale },
 12.1554 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend },
 12.1555 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Blend_Scale },
 12.1556      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate },
 12.1557      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Scale },
 12.1558 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend },
 12.1559 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale },
 12.1560 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend },
 12.1561 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale },
 12.1562      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Scale },
 12.1563 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend },
 12.1564 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend_Scale },
 12.1565 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend },
 12.1566 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Blend_Scale },
 12.1567      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate },
 12.1568      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Scale },
 12.1569 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend },
 12.1570 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale },
 12.1571 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend },
 12.1572 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale },
 12.1573      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Scale },
 12.1574 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Blend },
 12.1575 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Blend_Scale },
 12.1576 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Blend },
 12.1577 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Blend_Scale },
 12.1578      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Modulate },
 12.1579      { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Modulate_Scale },
 12.1580 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Modulate_Blend },
 12.1581 -    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale },
 12.1582 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Modulate_Blend },
 12.1583 +    { SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale },
 12.1584      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Scale },
 12.1585 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend },
 12.1586 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend_Scale },
 12.1587 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend },
 12.1588 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Blend_Scale },
 12.1589      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate },
 12.1590      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Scale },
 12.1591 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend },
 12.1592 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale },
 12.1593 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend },
 12.1594 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale },
 12.1595      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Scale },
 12.1596 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend },
 12.1597 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend_Scale },
 12.1598 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend },
 12.1599 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Blend_Scale },
 12.1600      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate },
 12.1601      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Scale },
 12.1602 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend },
 12.1603 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale },
 12.1604 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend },
 12.1605 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale },
 12.1606      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Scale },
 12.1607 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Blend },
 12.1608 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Blend_Scale },
 12.1609 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Blend },
 12.1610 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Blend_Scale },
 12.1611      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Modulate },
 12.1612      { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Modulate_Scale },
 12.1613 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend },
 12.1614 -    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale },
 12.1615 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend },
 12.1616 +    { SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale },
 12.1617      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Scale },
 12.1618 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend },
 12.1619 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend_Scale },
 12.1620 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend },
 12.1621 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Blend_Scale },
 12.1622      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate },
 12.1623      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Scale },
 12.1624 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend },
 12.1625 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale },
 12.1626 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend },
 12.1627 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale },
 12.1628      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Scale },
 12.1629 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend },
 12.1630 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend_Scale },
 12.1631 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend },
 12.1632 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Blend_Scale },
 12.1633      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate },
 12.1634      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Scale },
 12.1635 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend },
 12.1636 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale },
 12.1637 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend },
 12.1638 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale },
 12.1639      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Scale },
 12.1640 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Blend },
 12.1641 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Blend_Scale },
 12.1642 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Blend },
 12.1643 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Blend_Scale },
 12.1644      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Modulate },
 12.1645      { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Modulate_Scale },
 12.1646 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend },
 12.1647 -    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale },
 12.1648 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend },
 12.1649 +    { SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale },
 12.1650      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Scale },
 12.1651 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend },
 12.1652 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend_Scale },
 12.1653 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend },
 12.1654 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Blend_Scale },
 12.1655      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate },
 12.1656      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Scale },
 12.1657 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend },
 12.1658 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale },
 12.1659 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend },
 12.1660 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale },
 12.1661      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Scale },
 12.1662 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend },
 12.1663 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend_Scale },
 12.1664 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend },
 12.1665 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Blend_Scale },
 12.1666      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate },
 12.1667      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Scale },
 12.1668 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend },
 12.1669 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale },
 12.1670 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend },
 12.1671 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale },
 12.1672      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Scale },
 12.1673 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Blend },
 12.1674 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Blend_Scale },
 12.1675 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Blend },
 12.1676 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Blend_Scale },
 12.1677      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Modulate },
 12.1678      { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Modulate_Scale },
 12.1679 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend },
 12.1680 -    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale },
 12.1681 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend },
 12.1682 +    { SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale },
 12.1683      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Scale },
 12.1684 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend },
 12.1685 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend_Scale },
 12.1686 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend },
 12.1687 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Blend_Scale },
 12.1688      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate },
 12.1689      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Scale },
 12.1690 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend },
 12.1691 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale },
 12.1692 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend },
 12.1693 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_RGB888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale },
 12.1694      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Scale },
 12.1695 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend },
 12.1696 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend_Scale },
 12.1697 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend },
 12.1698 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Blend_Scale },
 12.1699      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate },
 12.1700      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Scale },
 12.1701 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend },
 12.1702 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale },
 12.1703 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend },
 12.1704 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_BGR888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale },
 12.1705      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Scale },
 12.1706 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Blend },
 12.1707 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Blend_Scale },
 12.1708 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Blend },
 12.1709 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Blend_Scale },
 12.1710      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Modulate },
 12.1711      { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Modulate_Scale },
 12.1712 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend },
 12.1713 -    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend_Scale },
 12.1714 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend },
 12.1715 +    { SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB8888, (SDL_COPY_MODULATE_COLOR | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_NEAREST), SDL_CPU_ANY, SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend_Scale },
 12.1716      { 0, 0, 0, 0, NULL }
 12.1717  };
 12.1718  
    13.1 --- a/src/video/SDL_blit_slow.c	Fri Feb 04 19:18:08 2011 -0800
    13.2 +++ b/src/video/SDL_blit_slow.c	Fri Feb 04 19:50:56 2011 -0800
    13.3 @@ -117,7 +117,7 @@
    13.4                      srcB = (srcB * srcA) / 255;
    13.5                  }
    13.6              }
    13.7 -            switch (flags & (SDL_COPY_BLEND | SDL_COPY_ADD)) {
    13.8 +            switch (flags & (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD)) {
    13.9              case 0:
   13.10                  dstR = srcR;
   13.11                  dstG = srcG;
   13.12 @@ -140,6 +140,11 @@
   13.13                  if (dstB > 255)
   13.14                      dstB = 255;
   13.15                  break;
   13.16 +            case SDL_COPY_MOD:
   13.17 +                dstR = (srcR * dstR) / 255;
   13.18 +                dstG = (srcG * dstG) / 255;
   13.19 +                dstB = (srcB * dstB) / 255;
   13.20 +                break;
   13.21              }
   13.22              if (dst_fmt->Amask) {
   13.23                  ASSEMBLE_RGBA(dst, dstbpp, dst_fmt, dstR, dstG, dstB, dstA);
    14.1 --- a/src/video/SDL_surface.c	Fri Feb 04 19:18:08 2011 -0800
    14.2 +++ b/src/video/SDL_surface.c	Fri Feb 04 19:50:56 2011 -0800
    14.3 @@ -448,7 +448,8 @@
    14.4  
    14.5      status = 0;
    14.6      flags = surface->map->info.flags;
    14.7 -    surface->map->info.flags &= ~(SDL_COPY_BLEND | SDL_COPY_ADD);
    14.8 +    surface->map->info.flags &=
    14.9 +        ~(SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD);
   14.10      switch (blendMode) {
   14.11      case SDL_BLENDMODE_NONE:
   14.12          break;
   14.13 @@ -458,6 +459,9 @@
   14.14      case SDL_BLENDMODE_ADD:
   14.15          surface->map->info.flags |= SDL_COPY_ADD;
   14.16          break;
   14.17 +    case SDL_BLENDMODE_MOD:
   14.18 +        surface->map->info.flags |= SDL_COPY_MOD;
   14.19 +        break;
   14.20      default:
   14.21          SDL_Unsupported();
   14.22          status = -1;
   14.23 @@ -489,13 +493,17 @@
   14.24          return 0;
   14.25      }
   14.26  
   14.27 -    switch (surface->map->info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD)) {
   14.28 +    switch (surface->map->
   14.29 +            info.flags & (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD)) {
   14.30      case SDL_COPY_BLEND:
   14.31          *blendMode = SDL_BLENDMODE_BLEND;
   14.32          break;
   14.33      case SDL_COPY_ADD:
   14.34          *blendMode = SDL_BLENDMODE_ADD;
   14.35          break;
   14.36 +    case SDL_COPY_MOD:
   14.37 +        *blendMode = SDL_BLENDMODE_MOD;
   14.38 +        break;
   14.39      default:
   14.40          *blendMode = SDL_BLENDMODE_NONE;
   14.41          break;
    15.1 --- a/src/video/sdlgenblit.pl	Fri Feb 04 19:18:08 2011 -0800
    15.2 +++ b/src/video/sdlgenblit.pl	Fri Feb 04 19:50:56 2011 -0800
    15.3 @@ -237,7 +237,7 @@
    15.4                      ${s}B = (${s}B * ${s}A) / 255;
    15.5                  }
    15.6              }
    15.7 -            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
    15.8 +            switch (flags & (SDL_COPY_BLEND|SDL_COPY_ADD|SDL_COPY_MOD)) {
    15.9              case SDL_COPY_BLEND:
   15.10                  ${d}R = ${s}R + ((255 - ${s}A) * ${d}R) / 255;
   15.11                  ${d}G = ${s}G + ((255 - ${s}A) * ${d}G) / 255;
   15.12 @@ -248,6 +248,11 @@
   15.13                  ${d}G = ${s}G + ${d}G; if (${d}G > 255) ${d}G = 255;
   15.14                  ${d}B = ${s}B + ${d}B; if (${d}B > 255) ${d}B = 255;
   15.15                  break;
   15.16 +            case SDL_COPY_MOD:
   15.17 +                ${d}R = (${s}R * ${d}R) / 255;
   15.18 +                ${d}G = (${s}G * ${d}G) / 255;
   15.19 +                ${d}B = (${s}B * ${d}B) / 255;
   15.20 +                break;
   15.21              }
   15.22  __EOF__
   15.23      }
   15.24 @@ -397,7 +402,7 @@
   15.25                                  }
   15.26                              }
   15.27                              if ( $blend ) {
   15.28 -                                $flag = "SDL_COPY_BLEND | SDL_COPY_ADD";
   15.29 +                                $flag = "SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD";
   15.30                                  if ( $flags eq "" ) {
   15.31                                      $flags = $flag;
   15.32                                  } else {
    16.1 --- a/test/automated/common/img_blitblend.c	Fri Feb 04 19:18:08 2011 -0800
    16.2 +++ b/test/automated/common/img_blitblend.c	Fri Feb 04 19:50:56 2011 -0800
    16.3 @@ -1055,6 +1055,410 @@
    16.4    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
    16.5  };
    16.6  
    16.7 +static const SurfaceImage_t img_blendMod = {
    16.8 +  80, 60, 3,
    16.9 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.10 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.11 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.12 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.13 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.14 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.15 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.16 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.17 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   16.18 +  "\0\0\0\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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  16.406 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  16.407 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  16.408 +  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
  16.409 +};
  16.410 +
  16.411  static const SurfaceImage_t img_blendNone = {
  16.412    80, 60, 3,
  16.413    "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
    17.1 --- a/test/automated/render/render.c	Fri Feb 04 19:18:08 2011 -0800
    17.2 +++ b/test/automated/render/render.c	Fri Feb 04 19:50:56 2011 -0800
    17.3 @@ -190,6 +190,15 @@
    17.4     ret = (mode != SDL_BLENDMODE_ADD);
    17.5     if (!render_isSupported(ret))
    17.6        fail = 1;
    17.7 +   ret = SDL_SetRenderDrawBlendMode( SDL_BLENDMODE_MOD );
    17.8 +   if (!render_isSupported(ret))
    17.9 +      fail = 1;
   17.10 +   ret = SDL_GetRenderDrawBlendMode( &mode );
   17.11 +   if (!render_isSupported(ret))
   17.12 +      fail = 1;
   17.13 +   ret = (mode != SDL_BLENDMODE_MOD);
   17.14 +   if (!render_isSupported(ret))
   17.15 +      fail = 1;
   17.16     ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );
   17.17     if (!render_isSupported(ret))
   17.18        fail = 1;
   17.19 @@ -829,6 +838,13 @@
   17.20              &img_blendAdd, ALLOWABLE_ERROR_BLENDED ))
   17.21        return -1;
   17.22  
   17.23 +   /* Test Mod. */
   17.24 +   if (render_testBlitBlendMode( tface, SDL_BLENDMODE_MOD ))
   17.25 +      return -1;
   17.26 +   if (render_compare( "Blit blending output not the same (using SDL_BLENDMODE_MOD).",
   17.27 +            &img_blendMod, ALLOWABLE_ERROR_BLENDED ))
   17.28 +      return -1;
   17.29 +
   17.30     /* Clear surface. */
   17.31     if (render_clearScreen())
   17.32        return -1;
   17.33 @@ -852,7 +868,7 @@
   17.34           if (mode==0) mode = SDL_BLENDMODE_NONE;
   17.35           else if (mode==1) mode = SDL_BLENDMODE_BLEND;
   17.36           else if (mode==2) mode = SDL_BLENDMODE_ADD;
   17.37 -         else if (mode==3) mode = SDL_BLENDMODE_NONE;
   17.38 +         else if (mode==3) mode = SDL_BLENDMODE_MOD;
   17.39           ret = SDL_SetTextureBlendMode( tface, mode );
   17.40           if (SDL_ATassert( "SDL_SetTextureBlendMode", ret == 0))
   17.41              return -1;
    18.1 --- a/test/automated/surface/surface.c	Fri Feb 04 19:18:08 2011 -0800
    18.2 +++ b/test/automated/surface/surface.c	Fri Feb 04 19:50:56 2011 -0800
    18.3 @@ -324,6 +324,13 @@
    18.4              surface_compare( testsur, &img_blendAdd, 0 )==0 ))
    18.5        return;
    18.6  
    18.7 +   /* Test Mod. */
    18.8 +   if (surface_testBlitBlendMode( testsur, face, SDL_BLENDMODE_MOD ))
    18.9 +      return;
   18.10 +   if (SDL_ATassert( "Blitting blending output not the same (using SDL_BLENDMODE_MOD).",
   18.11 +            surface_compare( testsur, &img_blendMod, 0 )==0 ))
   18.12 +      return;
   18.13 +
   18.14     /* Clear surface. */
   18.15     ret = SDL_FillRect( testsur, NULL,
   18.16           SDL_MapRGB( testsur->format, 0, 0, 0 ) );
   18.17 @@ -349,7 +356,7 @@
   18.18           if (mode==0) mode = SDL_BLENDMODE_NONE;
   18.19           else if (mode==1) mode = SDL_BLENDMODE_BLEND;
   18.20           else if (mode==2) mode = SDL_BLENDMODE_ADD;
   18.21 -         else if (mode==3) mode = SDL_BLENDMODE_NONE;
   18.22 +         else if (mode==3) mode = SDL_BLENDMODE_MOD;
   18.23           ret = SDL_SetSurfaceBlendMode( face, mode );
   18.24           if (SDL_ATassert( "SDL_SetSurfaceBlendMode", ret == 0))
   18.25              return;
    19.1 --- a/test/testdraw2.c	Fri Feb 04 19:18:08 2011 -0800
    19.2 +++ b/test/testdraw2.c	Fri Feb 04 19:50:56 2011 -0800
    19.3 @@ -190,6 +190,9 @@
    19.4                      } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
    19.5                          blendMode = SDL_BLENDMODE_ADD;
    19.6                          consumed = 2;
    19.7 +                    } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
    19.8 +                        blendMode = SDL_BLENDMODE_MOD;
    19.9 +                        consumed = 2;
   19.10                      }
   19.11                  }
   19.12              } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
   19.13 @@ -205,7 +208,7 @@
   19.14          }
   19.15          if (consumed < 0) {
   19.16              fprintf(stderr,
   19.17 -                    "Usage: %s %s [--blend none|blend|add] [--cyclecolor] [--cyclealpha]\n",
   19.18 +                    "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
   19.19                      argv[0], CommonUsage(state));
   19.20              return 1;
   19.21          }
    20.1 --- a/test/testintersections.c	Fri Feb 04 19:18:08 2011 -0800
    20.2 +++ b/test/testintersections.c	Fri Feb 04 19:50:56 2011 -0800
    20.3 @@ -223,6 +223,9 @@
    20.4                      } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
    20.5                          blendMode = SDL_BLENDMODE_ADD;
    20.6                          consumed = 2;
    20.7 +                    } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
    20.8 +                        blendMode = SDL_BLENDMODE_MOD;
    20.9 +                        consumed = 2;
   20.10                      }
   20.11                  }
   20.12              } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
   20.13 @@ -238,7 +241,7 @@
   20.14          }
   20.15          if (consumed < 0) {
   20.16              fprintf(stderr,
   20.17 -                    "Usage: %s %s [--blend none|blend|add] [--cyclecolor] [--cyclealpha]\n",
   20.18 +                    "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
   20.19                      argv[0], CommonUsage(state));
   20.20              return 1;
   20.21          }
    21.1 --- a/test/testsprite2.c	Fri Feb 04 19:18:08 2011 -0800
    21.2 +++ b/test/testsprite2.c	Fri Feb 04 19:50:56 2011 -0800
    21.3 @@ -237,6 +237,9 @@
    21.4                      } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
    21.5                          blendMode = SDL_BLENDMODE_ADD;
    21.6                          consumed = 2;
    21.7 +                    } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
    21.8 +                        blendMode = SDL_BLENDMODE_MOD;
    21.9 +                        consumed = 2;
   21.10                      }
   21.11                  }
   21.12              } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
   21.13 @@ -252,7 +255,7 @@
   21.14          }
   21.15          if (consumed < 0) {
   21.16              fprintf(stderr,
   21.17 -                    "Usage: %s %s [--blend none|blend|add] [--cyclecolor] [--cyclealpha]\n",
   21.18 +                    "Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
   21.19                      argv[0], CommonUsage(state));
   21.20              quit(1);
   21.21          }