commit 3f8cb82
Devine Lu Linvega
·
2026-01-08 01:02:10 +0000 UTC
parent 77d929c
Muted warning
1 files changed,
+20,
-19
+20,
-19
1@@ -440,6 +440,24 @@ static int screen_x1, screen_y1, screen_x2, screen_y2;
2 static int screen_vector, *screen_pixels, screen_palette[16];
3 static int rX, rY, rA, rMX, rMY, rMA, rML, rDX, rDY;
4
5+static const Uint8 blending[16][2][4] = {
6+ {{0, 0, 1, 2}, {0, 0, 4, 8}},
7+ {{0, 1, 2, 3}, {0, 4, 8, 12}},
8+ {{0, 2, 3, 1}, {0, 8, 12, 4}},
9+ {{0, 3, 1, 2}, {0, 12, 4, 8}},
10+ {{1, 0, 1, 2}, {4, 0, 4, 8}},
11+ {{0, 1, 2, 3}, {0, 4, 8, 12}},
12+ {{1, 2, 3, 1}, {4, 8, 12, 4}},
13+ {{1, 3, 1, 2}, {4, 12, 4, 8}},
14+ {{2, 0, 1, 2}, {8, 0, 4, 8}},
15+ {{2, 1, 2, 3}, {8, 4, 8, 12}},
16+ {{0, 2, 3, 1}, {0, 8, 12, 4}},
17+ {{2, 3, 1, 2}, {8, 12, 4, 8}},
18+ {{3, 0, 1, 2}, {12, 0, 4, 8}},
19+ {{3, 1, 2, 3}, {12, 4, 8, 12}},
20+ {{3, 2, 3, 1}, {12, 8, 12, 4}},
21+ {{0, 3, 1, 2}, {0, 12, 4, 8}}};
22+
23 void emu_redraw(void), emu_resize(void);
24
25 static void
26@@ -588,24 +606,6 @@ screen_deo_pixel(void)
27 }
28 }
29
30-static const Uint8 blending[16][2][4] = {
31- {{0, 0, 1, 2}, {0, 0, 4, 8}},
32- {{0, 1, 2, 3}, {0, 4, 8, 12}},
33- {{0, 2, 3, 1}, {0, 8, 12, 4}},
34- {{0, 3, 1, 2}, {0, 12, 4, 8}},
35- {{1, 0, 1, 2}, {4, 0, 4, 8}},
36- {{0, 1, 2, 3}, {0, 4, 8, 12}},
37- {{1, 2, 3, 1}, {4, 8, 12, 4}},
38- {{1, 3, 1, 2}, {4, 12, 4, 8}},
39- {{2, 0, 1, 2}, {8, 0, 4, 8}},
40- {{2, 1, 2, 3}, {8, 4, 8, 12}},
41- {{0, 2, 3, 1}, {0, 8, 12, 4}},
42- {{2, 3, 1, 2}, {8, 12, 4, 8}},
43- {{3, 0, 1, 2}, {12, 0, 4, 8}},
44- {{3, 1, 2, 3}, {12, 4, 8, 12}},
45- {{3, 2, 3, 1}, {12, 8, 12, 4}},
46- {{0, 3, 1, 2}, {0, 12, 4, 8}}};
47-
48 static void
49 screen_deo_sprite(void)
50 {
51@@ -628,7 +628,8 @@ screen_deo_sprite(void)
52 Uint8 *dst = &screen_layers[x0 + y0 * stride];
53 const Uint8 *sch1 = &ram[rA + qfy];
54 const Uint8 *sch2 = is_2bpp ? sch1 + 8 : NULL;
55- for(row = 0; row < 8; row++, dst += stride, sch1 += fy, sch2 += fy) {
56+ for(row = 0; row < 8; row++, dst += stride, sch1 += fy) {
57+ if(sch2) sch2 += fy
58 int qx = qfx;
59 const int ch1 = *sch1, ch2 = is_2bpp ? (*sch2 << 1) : 0;
60 for(px = 0; px < 8; px++, qx -= fx) {