commit fa4d32b
Devine Lu Linvega
·
2026-01-11 18:53:17 +0000 UTC
parent fddeb23
Removed pixel macro again, cannot make up my mind..
1 files changed,
+11,
-14
+11,
-14
1@@ -595,14 +595,6 @@ screen_deo_pixel(void)
2 }
3 }
4
5-#define PIXEL(bit) \
6- { \
7- const int color = ((ch1 & bit) ? 1 : 0) | ((ch2 & (bit << 1)) ? 2 : 0); \
8- const Uint8 mask = (color | opaque_mask) ? 0xff : 0x00; \
9- const Uint8 next = (*d & layer_mask) | table[color]; \
10- *d = (*d & ~mask) | (next & mask); \
11- }
12-
13 static void
14 screen_deo_sprite(void)
15 {
16@@ -626,13 +618,18 @@ screen_deo_sprite(void)
17 const Uint8 *src = &ram[rA + qfy];
18 for(j = 0; j < 8; j++, dst += stride, src += src_stride) {
19 const int ch1 = *src, ch2 = is_2bpp ? (src[8] << 1) : 0;
20+ int bit = flipx ? 0x01 : 0x80;
21 Uint8 *d = dst;
22- if(flipx)
23- for(int px = 0, bit = 0x01; px < 8; px++, d++, bit <<= 1)
24- PIXEL(bit)
25- else
26- for(int px = 0, bit = 0x80; px < 8; px++, d++, bit >>= 1)
27- PIXEL(bit)
28+ for(int px = 0; px < 8; px++, d++) {
29+ const int color = ((ch1 & bit) ? 1 : 0) | ((ch2 & (bit << 1)) ? 2 : 0);
30+ const Uint8 mask = (color | opaque_mask) ? 0xff : 0x00;
31+ const Uint8 next = (*d & layer_mask) | table[color];
32+ *d = (*d & ~mask) | (next & mask);
33+ if(flipx)
34+ bit <<= 1;
35+ else
36+ bit >>= 1;
37+ }
38 }
39 }
40 if(!screen_reqdraw) {