commit 77d929c

Devine Lu Linvega  ·  2026-01-08 00:55:19 +0000 UTC
parent aa845f9
Cleanup
1 files changed,  +4, -8
+4, -8
 1@@ -609,17 +609,14 @@ static const Uint8 blending[16][2][4] = {
 2 static void
 3 screen_deo_sprite(void)
 4 {
 5-	int i, row, px;
 6-	int x = rX, y = rY;
 7+	int i, row, px, x = rX, y = rY;
 8 	const int ctrl = dev[0x2f];
 9 	const int blend = ctrl & 0xf;
10 	const int opaque = blend % 5;
11-	const int fx = (ctrl & 0x10) ? -1 : 1;
12-	const int fy = (ctrl & 0x20) ? -1 : 1;
13+	const int fx = (ctrl & 0x10) ? -1 : 1, dyx = fx * rDY;
14+	const int fy = (ctrl & 0x20) ? -1 : 1, dxy = fy * rDX;
15 	const int qfx = (ctrl & 0x10) ? 0 : 7;
16 	const int qfy = (ctrl & 0x20) ? 7 : 0;
17-	const int dyx = fx * rDY;
18-	const int dxy = fy * rDX;
19 	const int layer_mask = (ctrl & 0x40) ? 0x3 : 0xc;
20 	const Uint8 *table = (ctrl & 0x40) ? blending[blend][1] : blending[blend][0];
21 	const int is_2bpp = (ctrl & 0x80) != 0;
22@@ -633,8 +630,7 @@ screen_deo_sprite(void)
23 		const Uint8 *sch2 = is_2bpp ? sch1 + 8 : NULL;
24 		for(row = 0; row < 8; row++, dst += stride, sch1 += fy, sch2 += fy) {
25 			int qx = qfx;
26-			int ch1 = *sch1;
27-			int ch2 = is_2bpp ? (*sch2 << 1) : 0;
28+			const int ch1 = *sch1, ch2 = is_2bpp ? (*sch2 << 1) : 0;
29 			for(px = 0; px < 8; px++, qx -= fx) {
30 				int color = ((ch1 >> qx) & 1) | ((ch2 >> qx) & 2);
31 				if(opaque || color)