commit 925d0d1

Devine Lu Linvega  ·  2026-06-13 17:05:03 +0000 UTC
parent 60cf3aa
Cannot figured out how to remove the stride multiplication from the sprite loop..
1 files changed,  +3, -4
+3, -4
 1@@ -508,11 +508,10 @@ screen_deo_sprite(void)
 2 	const int blend = ctrl & 0xf;
 3 	const Uint8 opaque_mask = blend % 5;
 4 	const Uint8 *table = blend_lut[blend][layer >> 6];
 5-	const int dy_stride = dy * stride;
 6-	int x0 = x + 8, y0 = y + 8, row_offset = y0 * stride;
 7-	for(i = 0; i <= rML; i++, x0 += dx, y0 += dy, row_offset += dy_stride, rA += addr_incr) {
 8+	for(i = 0; i <= rML; i++, x += dx, y += dy, rA += addr_incr) {
 9+		const Uint16 x0 = x + 8, y0 = y + 8;
10 		if(x0 + 8 >= stride || y0 + 8 >= screen_hmar2) continue;
11-		Uint8 *dst = screen_layers + row_offset + x0;
12+		Uint8 *dst = screen_layers + y0 * stride + x0;
13 		const Uint8 *col = &ram[rA + col_start];
14 		for(j = 0; j < 8; j++, dst += stride, col += col_delta) {
15 			Uint8 *d = dst;