commit 53ddc88
Devine Lu Linvega
·
2026-01-11 19:11:25 +0000 UTC
parent 35eb6c4
Removed useless check for 0
1 files changed,
+8,
-9
+8,
-9
1@@ -601,13 +601,14 @@ screen_deo_sprite(void)
2 int i, j, x = rX, y = rY;
3 const int ctrl = dev[0x2f];
4 const int blend = ctrl & 0xf;
5- const int opaque_mask = opaque_lut[blend];
6 const int flipx = ctrl & 0x10, flipy = ctrl & 0x20;
7- const int dx = flipx ? -rDY : rDY, dy = flipy ? -rDX : rDX;
8- const int layer_mask = (ctrl & 0x40) ? 0x3 : 0xc;
9- const Uint8 *table = (ctrl & 0x40) ? blend_lut[blend][1] : blend_lut[blend][0];
10- const int is_2bpp = (ctrl & 0x80) != 0;
11+ const int layer = ctrl & 0x40;
12+ const int layer_mask = layer ? 0x3 : 0xc;
13+ const Uint8 *table = blend_lut[blend][layer >> 6];
14+ const int opaque_mask = opaque_lut[blend];
15+ const int is_2bpp = ctrl & 0x80;
16 const int addr_incr = rMA << (is_2bpp ? 2 : 1);
17+ const int dx = flipx ? -rDY : rDY, dy = flipy ? -rDX : rDX;
18 const int stride = screen_wmar2;
19 const int row_start = flipx ? 0 : 7;
20 const int src_delta = flipy ? -1 : 1;
21@@ -630,10 +631,8 @@ screen_deo_sprite(void)
22 }
23 }
24 if(!screen_reqdraw) {
25- int x1 = flipx ? x : rX;
26- int x2 = flipx ? rX : x;
27- int y1 = flipy ? y : rY;
28- int y2 = flipy ? rY : y;
29+ int x1 = flipx ? x : rX, x2 = flipx ? rX : x;
30+ int y1 = flipy ? y : rY, y2 = flipy ? rY : y;
31 screen_change(x1 - 8, y1 - 8, x2 + 8, y2 + 8);
32 }
33 if(rMX) rX += flipx ? -rDX : rDX;