0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-04 21:35:04 +00:00

(screen.c)Fixed redraw issue

This commit is contained in:
neauoire 2023-09-02 18:34:04 -07:00
parent fb892e4329
commit a323cb5c56
3 changed files with 7 additions and 8 deletions

View file

@ -214,11 +214,9 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
Uint16 height = uxn_screen.height; Uint16 height = uxn_screen.height;
if(x < width && y < height) if(x < width && y < height)
layer[x + y * width] = color; layer[x + y * width] = color;
x += 1; screen_change(x, y, x + 1, y + 1);
y += 1; if(d[0x6] & 0x1) POKE2(port_x, x + 1);
screen_change(x, y, x, y); if(d[0x6] & 0x2) POKE2(port_y, y + 1);
if(d[0x6] & 0x1) POKE2(port_x, x);
if(d[0x6] & 0x2) POKE2(port_y, y);
} }
break; break;
} }

View file

@ -31,8 +31,11 @@ WITH REGARD TO THIS SOFTWARE.
#define N2_(v) { r = (v); L = r; X = r >> 8; } #define N2_(v) { r = (v); L = r; X = r >> 8; }
#define L2_(v) { r = (v); Y = r; Z = r >> 8; } #define L2_(v) { r = (v); Y = r; Z = r >> 8; }
#define DEI(p) (dei_masks[p] ? emu_dei(u, (p)) : u->dev[(p)])
#define DEO(p, v) { u->dev[p] = v; if(deo_masks[p]) emu_deo(u, p); }
#define FLIP { s = ins & 0x40 ? &u->wst : &u->rst; } #define FLIP { s = ins & 0x40 ? &u->wst : &u->rst; }
#define SHIFT(y) { r = s->ptr + (y); ptr = s->dat + r - 1; s->ptr = r; } #define SHIFT(y) { s->ptr += (y); ptr = s->dat + s->ptr - 1; }
#define SET(x, y) { SHIFT((ins & 0x80) ? x + y : y) } #define SET(x, y) { SHIFT((ins & 0x80) ? x + y : y) }
int int

View file

@ -13,8 +13,6 @@ WITH REGARD TO THIS SOFTWARE.
#define PEEK2(d) (*(d) << 8 | (d)[1]) #define PEEK2(d) (*(d) << 8 | (d)[1])
#define POKE2(d, v) { *(d) = (v) >> 8; (d)[1] = (v); } #define POKE2(d, v) { *(d) = (v) >> 8; (d)[1] = (v); }
#define DEI(p) (dei_masks[p] ? emu_dei(u, (p)) : u->dev[(p)])
#define DEO(p, v) { u->dev[p] = v; if(deo_masks[p]) emu_deo(u, p); }
/* clang-format on */ /* clang-format on */