commit 22f934f
Devine Lu Linvega
·
2026-01-10 03:28:47 +0000 UTC
parent 5ae0406
Merged cases back
1 files changed,
+9,
-16
+9,
-16
1@@ -618,22 +618,15 @@ screen_deo_sprite(void)
2 const Uint8 *src = &ram[rA + qfy];
3 for(j = 0; j < 8; j++, dst += stride, src += src_stride) {
4 const int ch1 = *src, ch2 = is_2bpp ? (src[8] << 1) : 0;
5- Uint8 *d = dst;
6- Uint8 bit = flipx ? 0x01 : 0x80;
7- if(flipx)
8- for(int px = 0; px < 8; px++, d++) {
9- const int color = ((ch1 & bit) ? 1 : 0) | ((ch2 & (bit << 1)) ? 2 : 0);
10- const Uint8 mask = (color | opaque_mask) ? 0xFF : 0x00;
11- const Uint8 newp = (*d & layer_mask) | table[color];
12- *d = (*d & ~mask) | (newp & mask), bit <<= 1;
13- }
14- else
15- for(int px = 0; px < 8; px++, d++) {
16- const int color = ((ch1 & bit) ? 1 : 0) | ((ch2 & (bit << 1)) ? 2 : 0);
17- const Uint8 mask = (color | opaque_mask) ? 0xFF : 0x00;
18- const Uint8 newp = (*d & layer_mask) | table[color];
19- *d = (*d & ~mask) | (newp & mask), bit >>= 1;
20- }
21+ Uint8 *d = dst, bit = flipx ? 0x01 : 0x80;
22+ for(int px = 0; px < 8; px++, d++) {
23+ const int color = ((ch1 & bit) ? 1 : 0) | ((ch2 & (bit << 1)) ? 2 : 0);
24+ const Uint8 mask = (color | opaque_mask) ? 0xFF : 0x00;
25+ const Uint8 newp = (*d & layer_mask) | table[color];
26+ *d = (*d & ~mask) | (newp & mask);
27+ if(flipx) bit <<= 1;
28+ else bit >>= 1;
29+ }
30 }
31 }
32 if(!screen_reqdraw) {