commit f4f29de
Devine Lu Linvega
·
2023-04-13 16:59:23 +0000 UTC
parent 1fb58f0
Fixed issue with screen fill layer
1 files changed,
+3,
-1
+3,
-1
1@@ -16,6 +16,8 @@ WITH REGARD TO THIS SOFTWARE.
2
3 UxnScreen uxn_screen;
4
5+/* c = !ch ? (color % 5 ? color >> 2 : 0) : color % 4 + ch == 1 ? 0 : (ch - 2 + (color & 3)) % 3 + 1; */
6+
7 static Uint8 blending[4][16] = {
8 {0, 0, 0, 0, 1, 0, 1, 1, 2, 2, 0, 2, 3, 3, 3, 0},
9 {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3},
10@@ -134,7 +136,7 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
11 break;
12 case 0xe: {
13 Uint16 x = PEEK2(d + 0x8), y = PEEK2(d + 0xa);
14- Layer *layer = (d[0xf] & 0x40) ? &uxn_screen.fg : &uxn_screen.bg;
15+ Layer *layer = (d[0xe] & 0x40) ? &uxn_screen.fg : &uxn_screen.bg;
16 if(d[0xe] & 0x80) {
17 Uint8 xflip = d[0xe] & 0x10, yflip = d[0xe] & 0x20;
18 screen_fill(&uxn_screen, layer, xflip ? 0 : x, yflip ? 0 : y, xflip ? x : uxn_screen.width, yflip ? y : uxn_screen.height, d[0xe] & 0x3);