commit 650d305

Devine Lu Linvega  ·  2026-01-10 01:48:34 +0000 UTC
parent d7c05e0
Bring back row counting
1 files changed,  +3, -3
+3, -3
 1@@ -595,7 +595,7 @@ screen_deo_pixel(void)
 2 static void
 3 screen_deo_sprite(void)
 4 {
 5-	int i, x = rX, y = rY;
 6+	int i, j, x = rX, y = rY;
 7 	const int ctrl = dev[0x2f];
 8 	const int blend = ctrl & 0xf;
 9 	const int opaque = blend % 5;
10@@ -615,10 +615,10 @@ screen_deo_sprite(void)
11 	for(i = 0; i <= rML; i++, x += dx, y += dy, rA += addr_incr) {
12 		const Uint16 x0 = x + 8, y0 = y + 8;
13 		if(x0 + 8 >= stride || y0 + 8 >= screen_hmar2) continue;
14-		Uint8 *dst = &screen_layers[x0 + y0 * stride];
15+		Uint8 *dst = screen_layers + y0 * stride + x0;
16 		const Uint8 *src = &ram[rA + qfy];
17 		const Uint8 *src_end = src + 8 * src_stride;
18-		for(; src != src_end; dst += stride, src += src_stride) {
19+		for(j = 0; j < 8; j++, dst += stride, src += src_stride) {
20 			const int ch1 = *src, ch2 = is_2bpp ? (src[8] << 1) : 0;
21 			int qx = qfx;
22 			Uint8 *d = dst;