commit fd7196b
Devine Lu Linvega
·
2025-12-31 01:19:45 +0000 UTC
parent a207a93
Removed height variable
1 files changed,
+7,
-11
+7,
-11
1@@ -590,7 +590,7 @@ screen_draw_pixel(void)
2 static void
3 screen_draw_sprite(void)
4 {
5- int i, qy, x = rX, y = rY, layer_mask;
6+ int i, x = rX, y = rY, layer_mask;
7 int fx, fy, qfx, qfy, dxy, dyx, row;
8 const Uint8 *table;
9 const int ctrl = dev[0x2f];
10@@ -611,13 +611,11 @@ screen_draw_sprite(void)
11 if(ctrl & 0x80) {
12 const int addr_incr = rMA << 2;
13 for(i = 0; i <= rML; i++, x += dyx, y += dxy, rA += addr_incr) {
14- const Uint16 xmar2 = x + 16, ymar2 = y + 16, xmar = x + 8;
15- if(xmar2 == xmar + 8 && xmar2 < screen_wmar2 && ymar2 < screen_hmar2) {
16- const Uint16 ymar = y + 8;
17- const int height = ymar2 - ymar;
18+ const Uint16 xmar2 = x + 16, ymar2 = y + 16, xmar = x + 8, ymar = y + 8;
19+ if(xmar2 == xmar + 8 && ymar2 == ymar + 8 && xmar2 < screen_wmar2 && ymar2 < screen_hmar2) {
20 Uint8 *dst = &screen_layers[xmar + ymar * screen_wmar2];
21 Uint8 *sch1 = &ram[rA + qfy], *sch2 = sch1 + 8;
22- for(row = 0; row < height; row++, dst += screen_wmar2, sch1 += fy, sch2 += fy) {
23+ for(row = 0; row < 8; row++, dst += screen_wmar2, sch1 += fy, sch2 += fy) {
24 const int ch1 = *sch1, ch2 = *sch2 << 1;
25 int qx = qfx;
26 if(opaque)
27@@ -630,13 +628,11 @@ screen_draw_sprite(void)
28 } else {
29 const int addr_incr = rMA << 1;
30 for(i = 0; i <= rML; i++, x += dyx, y += dxy, rA += addr_incr) {
31- const Uint16 xmar2 = x + 16, ymar2 = y + 16, xmar = x + 8;
32- if(xmar2 == xmar + 8 && xmar2 < screen_wmar2 && ymar2 < screen_hmar2) {
33- const Uint16 ymar = y + 8;
34- const int height = ymar2 - ymar;
35+ const Uint16 xmar2 = x + 16, ymar2 = y + 16, xmar = x + 8, ymar = y + 8;
36+ if(xmar2 == xmar + 8 && ymar2 == ymar + 8 && xmar2 < screen_wmar2 && ymar2 < screen_hmar2) {
37 Uint8 *dst = &screen_layers[xmar + ymar * screen_wmar2];
38 Uint8 *sch1 = &ram[rA + qfy];
39- for(row = 0; row < height; row++, dst += screen_wmar2, sch1 += fy) {
40+ for(row = 0; row < 8; row++, dst += screen_wmar2, sch1 += fy) {
41 const int ch1 = *sch1;
42 int qx = qfx;
43 if(opaque)