commit d7c05e0
Devine Lu Linvega
·
2026-01-10 00:40:19 +0000 UTC
parent c8ee996
Removed px
1 files changed,
+5,
-4
+5,
-4
1@@ -595,7 +595,7 @@ screen_deo_pixel(void)
2 static void
3 screen_deo_sprite(void)
4 {
5- int i, px, x = rX, y = rY;
6+ int i, x = rX, y = rY;
7 const int ctrl = dev[0x2f];
8 const int blend = ctrl & 0xf;
9 const int opaque = blend % 5;
10@@ -618,14 +618,15 @@ screen_deo_sprite(void)
11 Uint8 *dst = &screen_layers[x0 + y0 * stride];
12 const Uint8 *src = &ram[rA + qfy];
13 const Uint8 *src_end = src + 8 * src_stride;
14-
15 for(; src != src_end; dst += stride, src += src_stride) {
16 const int ch1 = *src, ch2 = is_2bpp ? (src[8] << 1) : 0;
17 int qx = qfx;
18- for(px = 0; px < 8; px++, qx += qx_step) {
19+ Uint8 *d = dst;
20+ const Uint8 *d_end = dst + 8;
21+ for(; d != d_end; d++, qx += qx_step) {
22 int color = ((ch1 >> qx) & 1) | ((ch2 >> qx) & 2);
23 if(opaque || color)
24- dst[px] = (dst[px] & layer_mask) | table[color];
25+ *d = (*d & layer_mask) | table[color];
26 }
27 }
28 }