Simplify SDL_BLENDMODE_MUL

This commit is contained in:
Sylvain
2023-03-15 21:21:57 +01:00
committed by Sylvain Becker
parent ad1a216d65
commit 99668c286b
4 changed files with 2 additions and 13 deletions

View File

@@ -91,7 +91,7 @@
#define DRAW_SETPIXEL_MUL(getpixel, setpixel) \
do { \
unsigned sr, sg, sb, sa; \
sa = 0xFF; \
(void)sa; \
getpixel; \
sr = DRAW_MUL(sr, r) + DRAW_MUL(inva, sr); \
if (sr > 0xff) \
@@ -102,9 +102,6 @@
sb = DRAW_MUL(sb, b) + DRAW_MUL(inva, sb); \
if (sb > 0xff) \
sb = 0xff; \
sa = DRAW_MUL(sa, a) + DRAW_MUL(inva, sa); \
if (sa > 0xff) \
sa = 0xff; \
setpixel; \
} while (0)

View File

@@ -868,10 +868,6 @@ static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info,
if (dstB > 255) {
dstB = 255;
}
dstA = ((srcA * dstA) + (dstA * (255 - srcA))) / 255;
if (dstA > 255) {
dstA = 255;
}
break;
}
if (FORMAT_HAS_ALPHA(dstfmt_val)) {