src/render/software/SDL_blendline.c
changeset 5981 75caa8a7d559
parent 5535 96594ac5fd1a
child 6138 4c64952a58fb
equal deleted inserted replaced
5980:612b41c44af1 5981:75caa8a7d559
   122 static void
   122 static void
   123 SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   123 SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   124                      SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   124                      SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   125                      SDL_bool draw_end)
   125                      SDL_bool draw_end)
   126 {
   126 {
   127     const SDL_PixelFormat *fmt = dst->format;
       
   128     unsigned r, g, b, a, inva;
   127     unsigned r, g, b, a, inva;
   129 
   128 
   130     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   129     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   131         r = DRAW_MUL(_r, _a);
   130         r = DRAW_MUL(_r, _a);
   132         g = DRAW_MUL(_g, _a);
   131         g = DRAW_MUL(_g, _a);
   214 static void
   213 static void
   215 SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   214 SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   216                      SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   215                      SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   217                      SDL_bool draw_end)
   216                      SDL_bool draw_end)
   218 {
   217 {
   219     const SDL_PixelFormat *fmt = dst->format;
       
   220     unsigned r, g, b, a, inva;
   218     unsigned r, g, b, a, inva;
   221 
   219 
   222     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   220     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   223         r = DRAW_MUL(_r, _a);
   221         r = DRAW_MUL(_r, _a);
   224         g = DRAW_MUL(_g, _a);
   222         g = DRAW_MUL(_g, _a);
   490 static void
   488 static void
   491 SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   489 SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   492                      SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   490                      SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   493                      SDL_bool draw_end)
   491                      SDL_bool draw_end)
   494 {
   492 {
   495     const SDL_PixelFormat *fmt = dst->format;
       
   496     unsigned r, g, b, a, inva;
   493     unsigned r, g, b, a, inva;
   497 
   494 
   498     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   495     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   499         r = DRAW_MUL(_r, _a);
   496         r = DRAW_MUL(_r, _a);
   500         g = DRAW_MUL(_g, _a);
   497         g = DRAW_MUL(_g, _a);
   582 static void
   579 static void
   583 SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   580 SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
   584                        SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   581                        SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
   585                        SDL_bool draw_end)
   582                        SDL_bool draw_end)
   586 {
   583 {
   587     const SDL_PixelFormat *fmt = dst->format;
       
   588     unsigned r, g, b, a, inva;
   584     unsigned r, g, b, a, inva;
   589 
   585 
   590     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   586     if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
   591         r = DRAW_MUL(_r, _a);
   587         r = DRAW_MUL(_r, _a);
   592         g = DRAW_MUL(_g, _a);
   588         g = DRAW_MUL(_g, _a);