commit c02e8ed
Devine Lu Linvega
·
2026-01-09 21:14:08 +0000 UTC
parent 9574807
Cache part of ctrl byte
1 files changed,
+4,
-4
+4,
-4
1@@ -599,10 +599,10 @@ screen_deo_sprite(void)
2 const int ctrl = dev[0x2f];
3 const int blend = ctrl & 0xf;
4 const int opaque = blend % 5;
5- const int fx = (ctrl & 0x10) ? -1 : 1, dyx = fx * rDY;
6- const int fy = (ctrl & 0x20) ? -1 : 1, dxy = fy * rDX;
7- const int qfx = (ctrl & 0x10) ? 0 : 7;
8- const int qfy = (ctrl & 0x20) ? 7 : 0;
9+ const int flipx = ctrl & 0x10, fx = flipx ? -1 : 1, qfx = flipx ? 0 : 7;
10+ const int flipy = ctrl & 0x20, fy = flipy ? -1 : 1, qfy = flipy ? 7 : 0;
11+ const int dyx = fx * rDY;
12+ const int dxy = fy * rDX;
13 const int layer_mask = (ctrl & 0x40) ? 0x3 : 0xc;
14 const Uint8 *table = (ctrl & 0x40) ? blending[blend][1] : blending[blend][0];
15 const int is_2bpp = (ctrl & 0x80) != 0;