commit ea1832d

Devine Lu Linvega  ·  2026-02-18 04:39:24 +0000 UTC
parent 02632b8
Reduced masking
1 files changed,  +3, -3
+3, -3
 1@@ -540,13 +540,13 @@ screen_deo_sprite(void)
 2 				Uint8 *d = dst, bits1 = rowptr[0], bits2 = rowptr[8];
 3 				if(shift_right)
 4 					for(int k = 0; k < 8; k++, d++, bits1 <<= 1, bits2 <<= 1) {
 5-						int color = ((bits1 >> 7) & 1) | ((bits2 >> 6) & 2);
 6+						int color = (bits1 >> 7) | ((bits2 >> 6) & 2);
 7 						if(opaque_mask || color)
 8 							*d = (*d & layer_mask) | table[color];
 9 					}
10 				else
11 					for(int k = 0; k < 8; k++, d++, bits1 >>= 1, bits2 >>= 1) {
12-						int color = (bits1 & 1) | ((bits2 & 1) << 1);
13+						int color = (bits1 & 1) | ((bits2 << 1) & 2);
14 						if(opaque_mask || color)
15 							*d = (*d & layer_mask) | table[color];
16 					}
17@@ -563,7 +563,7 @@ screen_deo_sprite(void)
18 				Uint8 *d = dst, bits = rowptr[0];
19 				if(shift_right)
20 					for(int k = 0; k < 8; k++, d++, bits <<= 1) {
21-						int color = (bits >> 7) & 1;
22+						int color = bits >> 7;
23 						if(opaque_mask || color)
24 							*d = (*d & layer_mask) | table[color];
25 					}