Browse code

Removed opacity lut

Devine Lu Linvega authored on 01/03/2023 01:00:21
Showing 1 changed files
... ...
@@ -20,8 +20,7 @@ static Uint8 blending[5][16] = {
20 20
 	{0, 0, 0, 0, 1, 0, 1, 1, 2, 2, 0, 2, 3, 3, 3, 0},
21 21
 	{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3},
22 22
 	{1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1},
23
-	{2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2},
24
-	{1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0}};
23
+	{2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2}};
25 24
 
26 25
 static Uint32 palette_mono[] = {
27 26
 	0x0f000000, 0x0fffffff};
... ...
@@ -41,7 +40,7 @@ screen_write(UxnScreen *p, Layer *layer, Uint16 x, Uint16 y, Uint8 color)
41 40
 static void
42 41
 screen_blit(UxnScreen *p, Layer *layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy, Uint8 twobpp)
43 42
 {
44
-	int v, h, opaque = blending[4][color];
43
+	int v, h, opaque = (color % 5) || !color;
45 44
 	for(v = 0; v < 8; v++) {
46 45
 		Uint16 c = sprite[v] | (twobpp ? sprite[v + 8] : 0) << 8;
47 46
 		for(h = 7; h >= 0; --h, c >>= 1) {