commit 63e8ecf
Devine Lu Linvega
·
2026-02-18 04:46:17 +0000 UTC
parent ea1832d
Removed useless variable
1 files changed,
+10,
-11
+10,
-11
1@@ -525,7 +525,6 @@ screen_deo_sprite(void)
2 const int layer = ctrl & 0x40, layer_mask = layer ? 0x3 : 0xc;
3 const int blend = ctrl & 0xf;
4 const int opaque_mask = blend % 5;
5- const int shift_right = flipx ? 0 : 1;
6 const int row_step = flipy ? -1 : 1;
7 const int row_start = flipy ? 7 : 0;
8 const Uint8 *table = blend_lut[blend][layer >> 6];
9@@ -538,15 +537,15 @@ screen_deo_sprite(void)
10 const Uint8 *rowptr = &ram[rA + row_start];
11 for(j = 0; j < 8; j++, dst += screen_wmar2, rowptr += row_step) {
12 Uint8 *d = dst, bits1 = rowptr[0], bits2 = rowptr[8];
13- if(shift_right)
14- for(int k = 0; k < 8; k++, d++, bits1 <<= 1, bits2 <<= 1) {
15- int color = (bits1 >> 7) | ((bits2 >> 6) & 2);
16+ if(flipx)
17+ for(int k = 0; k < 8; k++, d++, bits1 >>= 1, bits2 >>= 1) {
18+ int color = (bits1 & 1) | ((bits2 << 1) & 2);
19 if(opaque_mask || color)
20 *d = (*d & layer_mask) | table[color];
21 }
22 else
23- for(int k = 0; k < 8; k++, d++, bits1 >>= 1, bits2 >>= 1) {
24- int color = (bits1 & 1) | ((bits2 << 1) & 2);
25+ for(int k = 0; k < 8; k++, d++, bits1 <<= 1, bits2 <<= 1) {
26+ int color = (bits1 >> 7) | ((bits2 >> 6) & 2);
27 if(opaque_mask || color)
28 *d = (*d & layer_mask) | table[color];
29 }
30@@ -561,15 +560,15 @@ screen_deo_sprite(void)
31 const Uint8 *rowptr = &ram[rA + row_start];
32 for(j = 0; j < 8; j++, dst += screen_wmar2, rowptr += row_step) {
33 Uint8 *d = dst, bits = rowptr[0];
34- if(shift_right)
35- for(int k = 0; k < 8; k++, d++, bits <<= 1) {
36- int color = bits >> 7;
37+ if(flipx)
38+ for(int k = 0; k < 8; k++, d++, bits >>= 1) {
39+ int color = bits & 1;
40 if(opaque_mask || color)
41 *d = (*d & layer_mask) | table[color];
42 }
43 else
44- for(int k = 0; k < 8; k++, d++, bits >>= 1) {
45- int color = bits & 1;
46+ for(int k = 0; k < 8; k++, d++, bits <<= 1) {
47+ int color = bits >> 7;
48 if(opaque_mask || color)
49 *d = (*d & layer_mask) | table[color];
50 }