commit d9f987c

Devine Lu Linvega  ·  2024-11-25 18:39:28 +0000 UTC
parent 690f89b
(screen) Cleanup
1 files changed,  +3, -5
+3, -5
 1@@ -31,11 +31,9 @@ static Uint8 blending[4][16] = {
 2 static void
 3 screen_2bpp(Uint8 *layer, Uint8 *addr, Uint16 x1, Uint16 y1, Uint16 blend, int fx, int fy)
 4 {
 5-	int x, y, opaque = (blend % 5);
 6-	for(y = y1; y < y1 + 8; y++) {
 7-		int ptr = fy < 0 ? 7 - (y - y1) : y - y1 * fy;
 8-		int ch1 = addr[ptr], ch2 = addr[ptr + 8];
 9-		int row = y * MAR2(uxn_screen.width);
10+	int x, y, ptr, opaque = (blend % 5);
11+	for(y = y1, ptr = fy < 0 ? 7 : 0; y < y1 + 8; y++, ptr += fy) {
12+		int ch1 = addr[ptr], ch2 = addr[ptr + 8], row = y * MAR2(uxn_screen.width);
13 		for(x = x1; x < x1 + 8; x++) {
14 			int shift = (fx > 0 ? 7 - (x - x1) : x - x1);
15 			int color = ((ch1 >> shift) & 1) | (((ch2 >> shift) & 1) << 1);