src/render/software/SDL_blendline.c
changeset 5184 d976b67150c5
parent 5166 4d39eeaad00b
child 5226 710d00cb3a6a
     1.1 --- a/src/render/software/SDL_blendline.c	Fri Feb 04 19:18:08 2011 -0800
     1.2 +++ b/src/render/software/SDL_blendline.c	Fri Feb 04 19:50:56 2011 -0800
     1.3 @@ -55,6 +55,9 @@
     1.4          case SDL_BLENDMODE_ADD:
     1.5              HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
     1.6              break;
     1.7 +        case SDL_BLENDMODE_MOD:
     1.8 +            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
     1.9 +            break;
    1.10          default:
    1.11              HLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
    1.12              break;
    1.13 @@ -67,6 +70,9 @@
    1.14          case SDL_BLENDMODE_ADD:
    1.15              VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
    1.16              break;
    1.17 +        case SDL_BLENDMODE_MOD:
    1.18 +            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
    1.19 +            break;
    1.20          default:
    1.21              VLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
    1.22              break;
    1.23 @@ -79,6 +85,9 @@
    1.24          case SDL_BLENDMODE_ADD:
    1.25              DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
    1.26              break;
    1.27 +        case SDL_BLENDMODE_MOD:
    1.28 +            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
    1.29 +            break;
    1.30          default:
    1.31              DLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
    1.32              break;
    1.33 @@ -95,6 +104,11 @@
    1.34                     DRAW_SETPIXELXY2_ADD_RGB, DRAW_SETPIXELXY2_ADD_RGB,
    1.35                     draw_end);
    1.36              break;
    1.37 +        case SDL_BLENDMODE_MOD:
    1.38 +            AALINE(x1, y1, x2, y2,
    1.39 +                   DRAW_SETPIXELXY2_MOD_RGB, DRAW_SETPIXELXY2_MOD_RGB,
    1.40 +                   draw_end);
    1.41 +            break;
    1.42          default:
    1.43              AALINE(x1, y1, x2, y2,
    1.44                     DRAW_SETPIXELXY2_RGB, DRAW_SETPIXELXY2_BLEND_RGB,
    1.45 @@ -133,6 +147,9 @@
    1.46          case SDL_BLENDMODE_ADD:
    1.47              HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
    1.48              break;
    1.49 +        case SDL_BLENDMODE_MOD:
    1.50 +            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
    1.51 +            break;
    1.52          default:
    1.53              HLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
    1.54              break;
    1.55 @@ -145,6 +162,9 @@
    1.56          case SDL_BLENDMODE_ADD:
    1.57              VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
    1.58              break;
    1.59 +        case SDL_BLENDMODE_MOD:
    1.60 +            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
    1.61 +            break;
    1.62          default:
    1.63              VLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
    1.64              break;
    1.65 @@ -157,6 +177,9 @@
    1.66          case SDL_BLENDMODE_ADD:
    1.67              DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
    1.68              break;
    1.69 +        case SDL_BLENDMODE_MOD:
    1.70 +            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
    1.71 +            break;
    1.72          default:
    1.73              DLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
    1.74              break;
    1.75 @@ -173,6 +196,11 @@
    1.76                     DRAW_SETPIXELXY_ADD_RGB555, DRAW_SETPIXELXY_ADD_RGB555,
    1.77                     draw_end);
    1.78              break;
    1.79 +        case SDL_BLENDMODE_MOD:
    1.80 +            AALINE(x1, y1, x2, y2,
    1.81 +                   DRAW_SETPIXELXY_MOD_RGB555, DRAW_SETPIXELXY_MOD_RGB555,
    1.82 +                   draw_end);
    1.83 +            break;
    1.84          default:
    1.85              AALINE(x1, y1, x2, y2,
    1.86                     DRAW_SETPIXELXY_RGB555, DRAW_SETPIXELXY_BLEND_RGB555,
    1.87 @@ -211,6 +239,9 @@
    1.88          case SDL_BLENDMODE_ADD:
    1.89              HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
    1.90              break;
    1.91 +        case SDL_BLENDMODE_MOD:
    1.92 +            HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
    1.93 +            break;
    1.94          default:
    1.95              HLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
    1.96              break;
    1.97 @@ -223,6 +254,9 @@
    1.98          case SDL_BLENDMODE_ADD:
    1.99              VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
   1.100              break;
   1.101 +        case SDL_BLENDMODE_MOD:
   1.102 +            VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
   1.103 +            break;
   1.104          default:
   1.105              VLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
   1.106              break;
   1.107 @@ -235,6 +269,9 @@
   1.108          case SDL_BLENDMODE_ADD:
   1.109              DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
   1.110              break;
   1.111 +        case SDL_BLENDMODE_MOD:
   1.112 +            DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
   1.113 +            break;
   1.114          default:
   1.115              DLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
   1.116              break;
   1.117 @@ -251,6 +288,11 @@
   1.118                     DRAW_SETPIXELXY_ADD_RGB565, DRAW_SETPIXELXY_ADD_RGB565,
   1.119                     draw_end);
   1.120              break;
   1.121 +        case SDL_BLENDMODE_MOD:
   1.122 +            AALINE(x1, y1, x2, y2,
   1.123 +                   DRAW_SETPIXELXY_MOD_RGB565, DRAW_SETPIXELXY_MOD_RGB565,
   1.124 +                   draw_end);
   1.125 +            break;
   1.126          default:
   1.127              AALINE(x1, y1, x2, y2,
   1.128                     DRAW_SETPIXELXY_RGB565, DRAW_SETPIXELXY_BLEND_RGB565,
   1.129 @@ -289,6 +331,9 @@
   1.130          case SDL_BLENDMODE_ADD:
   1.131              HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
   1.132              break;
   1.133 +        case SDL_BLENDMODE_MOD:
   1.134 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
   1.135 +            break;
   1.136          default:
   1.137              HLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
   1.138              break;
   1.139 @@ -301,6 +346,9 @@
   1.140          case SDL_BLENDMODE_ADD:
   1.141              VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
   1.142              break;
   1.143 +        case SDL_BLENDMODE_MOD:
   1.144 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
   1.145 +            break;
   1.146          default:
   1.147              VLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
   1.148              break;
   1.149 @@ -313,6 +361,9 @@
   1.150          case SDL_BLENDMODE_ADD:
   1.151              DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
   1.152              break;
   1.153 +        case SDL_BLENDMODE_MOD:
   1.154 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
   1.155 +            break;
   1.156          default:
   1.157              DLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
   1.158              break;
   1.159 @@ -329,6 +380,11 @@
   1.160                     DRAW_SETPIXELXY4_ADD_RGB, DRAW_SETPIXELXY4_ADD_RGB,
   1.161                     draw_end);
   1.162              break;
   1.163 +        case SDL_BLENDMODE_MOD:
   1.164 +            AALINE(x1, y1, x2, y2,
   1.165 +                   DRAW_SETPIXELXY4_MOD_RGB, DRAW_SETPIXELXY4_MOD_RGB,
   1.166 +                   draw_end);
   1.167 +            break;
   1.168          default:
   1.169              AALINE(x1, y1, x2, y2,
   1.170                     DRAW_SETPIXELXY4_RGB, DRAW_SETPIXELXY4_BLEND_RGB,
   1.171 @@ -367,6 +423,9 @@
   1.172          case SDL_BLENDMODE_ADD:
   1.173              HLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
   1.174              break;
   1.175 +        case SDL_BLENDMODE_MOD:
   1.176 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
   1.177 +            break;
   1.178          default:
   1.179              HLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
   1.180              break;
   1.181 @@ -379,6 +438,9 @@
   1.182          case SDL_BLENDMODE_ADD:
   1.183              VLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
   1.184              break;
   1.185 +        case SDL_BLENDMODE_MOD:
   1.186 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
   1.187 +            break;
   1.188          default:
   1.189              VLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
   1.190              break;
   1.191 @@ -391,6 +453,9 @@
   1.192          case SDL_BLENDMODE_ADD:
   1.193              DLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
   1.194              break;
   1.195 +        case SDL_BLENDMODE_MOD:
   1.196 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
   1.197 +            break;
   1.198          default:
   1.199              DLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
   1.200              break;
   1.201 @@ -407,6 +472,11 @@
   1.202                     DRAW_SETPIXELXY4_ADD_RGBA, DRAW_SETPIXELXY4_ADD_RGBA,
   1.203                     draw_end);
   1.204              break;
   1.205 +        case SDL_BLENDMODE_MOD:
   1.206 +            AALINE(x1, y1, x2, y2,
   1.207 +                   DRAW_SETPIXELXY4_MOD_RGBA, DRAW_SETPIXELXY4_MOD_RGBA,
   1.208 +                   draw_end);
   1.209 +            break;
   1.210          default:
   1.211              AALINE(x1, y1, x2, y2,
   1.212                     DRAW_SETPIXELXY4_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA,
   1.213 @@ -445,6 +515,9 @@
   1.214          case SDL_BLENDMODE_ADD:
   1.215              HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
   1.216              break;
   1.217 +        case SDL_BLENDMODE_MOD:
   1.218 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
   1.219 +            break;
   1.220          default:
   1.221              HLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
   1.222              break;
   1.223 @@ -457,6 +530,9 @@
   1.224          case SDL_BLENDMODE_ADD:
   1.225              VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
   1.226              break;
   1.227 +        case SDL_BLENDMODE_MOD:
   1.228 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
   1.229 +            break;
   1.230          default:
   1.231              VLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
   1.232              break;
   1.233 @@ -469,6 +545,9 @@
   1.234          case SDL_BLENDMODE_ADD:
   1.235              DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
   1.236              break;
   1.237 +        case SDL_BLENDMODE_MOD:
   1.238 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
   1.239 +            break;
   1.240          default:
   1.241              DLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
   1.242              break;
   1.243 @@ -485,6 +564,11 @@
   1.244                     DRAW_SETPIXELXY_ADD_RGB888, DRAW_SETPIXELXY_ADD_RGB888,
   1.245                     draw_end);
   1.246              break;
   1.247 +        case SDL_BLENDMODE_MOD:
   1.248 +            AALINE(x1, y1, x2, y2,
   1.249 +                   DRAW_SETPIXELXY_MOD_RGB888, DRAW_SETPIXELXY_MOD_RGB888,
   1.250 +                   draw_end);
   1.251 +            break;
   1.252          default:
   1.253              AALINE(x1, y1, x2, y2,
   1.254                     DRAW_SETPIXELXY_RGB888, DRAW_SETPIXELXY_BLEND_RGB888,
   1.255 @@ -523,6 +607,9 @@
   1.256          case SDL_BLENDMODE_ADD:
   1.257              HLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
   1.258              break;
   1.259 +        case SDL_BLENDMODE_MOD:
   1.260 +            HLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
   1.261 +            break;
   1.262          default:
   1.263              HLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
   1.264              break;
   1.265 @@ -535,6 +622,9 @@
   1.266          case SDL_BLENDMODE_ADD:
   1.267              VLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
   1.268              break;
   1.269 +        case SDL_BLENDMODE_MOD:
   1.270 +            VLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
   1.271 +            break;
   1.272          default:
   1.273              VLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
   1.274              break;
   1.275 @@ -547,6 +637,9 @@
   1.276          case SDL_BLENDMODE_ADD:
   1.277              DLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
   1.278              break;
   1.279 +        case SDL_BLENDMODE_MOD:
   1.280 +            DLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
   1.281 +            break;
   1.282          default:
   1.283              DLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
   1.284              break;
   1.285 @@ -563,6 +656,11 @@
   1.286                     DRAW_SETPIXELXY_ADD_ARGB8888, DRAW_SETPIXELXY_ADD_ARGB8888,
   1.287                     draw_end);
   1.288              break;
   1.289 +        case SDL_BLENDMODE_MOD:
   1.290 +            AALINE(x1, y1, x2, y2,
   1.291 +                   DRAW_SETPIXELXY_MOD_ARGB8888, DRAW_SETPIXELXY_MOD_ARGB8888,
   1.292 +                   draw_end);
   1.293 +            break;
   1.294          default:
   1.295              AALINE(x1, y1, x2, y2,
   1.296                     DRAW_SETPIXELXY_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888,