commit b686211
Devine Lu Linvega
·
2026-01-08 00:36:53 +0000 UTC
parent 44741f9
Removed temp array
1 files changed,
+5,
-8
+5,
-8
1@@ -639,17 +639,14 @@ screen_deo_sprite(void)
2 const Uint8 *sch1 = &ram[rA + qfy];
3 const Uint8 *sch2 = is_2bpp ? sch1 + 8 : NULL;
4 for(row = 0; row < 8; row++, dst += stride, sch1 += fy, sch2 += fy) {
5+ int qx = qfx;
6 int ch1 = *sch1;
7 int ch2 = is_2bpp ? (*sch2 << 1) : 0;
8- Uint8 pixels[8];
9 int px;
10- for(px = 0; px < 8; px++) {
11- int idx = (fx > 0) ? (7 - px) : px;
12- pixels[px] = ((ch1 >> idx) & 1) | ((ch2 >> idx) & 2);
13- }
14- for(px = 0; px < 8; px++) {
15- if(opaque || pixels[px])
16- dst[px] = (dst[px] & layer_mask) | table[pixels[px]];
17+ for(px = 0; px < 8; px++, qx -= fx) {
18+ int color = ((ch1 >> qx) & 1) | ((ch2 >> qx) & 2);
19+ if(opaque || color)
20+ dst[px] = (dst[px] & layer_mask) | table[color];
21 }
22 }
23 }