+#define BLEND(y, x, a) (y + (((x-y) * a)>>8))
+
+ unsigned char da = background.a, dr = background.r, dg = background.g, db = background.b;
+ int sa = i * 16;
+ if (sa < 256)
+ {
+ da = BLEND(background.a, foreground.a, sa) & 0xFF;
+ dr = BLEND(background.r, foreground.r, sa) & 0xFF;
+ dg = BLEND(background.g, foreground.g, sa) & 0xFF;
+ db = BLEND(background.b, foreground.b, sa) & 0xFF;
+ }
+#undef BLEND
+ da ^= 0xFF;
+ lookup32_normal[i]=db | (dg << 8) | (dr << 16) | (da << 24);;