commit 0799c4b

Devine Lu Linvega  ·  2026-06-14 17:05:45 +0000 UTC
parent e37ca48
Removed multiplication from sprite drawing loop
1 files changed,  +4, -2
+4, -2
 1@@ -508,10 +508,12 @@ 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-	for(i = 0; i <= rML; i++, x += dx, y += dy, rA += addr_incr) {
 6+	const int row_step = dy * stride;
 7+	int row_base = (y + 8) * stride;
 8+	for(i = 0; i <= rML; i++, x += dx, y += dy, rA += addr_incr, row_base += row_step) {
 9 		const Uint16 x0 = x + 8, y0 = y + 8;
10 		if(x0 + 8 >= stride || y0 + 8 >= screen_hmar2) continue;
11-		Uint8 *dst = screen_layers + y0 * stride + x0;
12+		Uint8 *dst = screen_layers + row_base + 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;