Screen debugger forces a full screen redraw

This commit is contained in:
neauoire 2023-08-16 14:02:01 -07:00
parent 4690a113c4
commit 68e4d82df5
1 changed files with 6 additions and 6 deletions

View File

@ -150,14 +150,16 @@ screen_redraw(Uxn *u)
Uint8 *fg = uxn_screen.fg, *bg = uxn_screen.bg; Uint8 *fg = uxn_screen.fg, *bg = uxn_screen.bg;
Uint32 palette[16], *pixels = uxn_screen.pixels; Uint32 palette[16], *pixels = uxn_screen.pixels;
int i, x, y, w = uxn_screen.width, h = uxn_screen.height, x1, y1, x2, y2; int i, x, y, w = uxn_screen.width, h = uxn_screen.height, x1, y1, x2, y2;
if(u->dev[0x0e]) {
screen_change(0, 0, w, h);
screen_debugger(u);
}
x1 = uxn_screen.x1; x1 = uxn_screen.x1;
y1 = uxn_screen.y1; y1 = uxn_screen.y1;
x2 = uxn_screen.x2 > w ? w : uxn_screen.x2; x2 = uxn_screen.x2 > w ? w : uxn_screen.x2;
y2 = uxn_screen.y2 > h ? h : uxn_screen.y2; y2 = uxn_screen.y2 > h ? h : uxn_screen.y2;
uxn_screen.x1 = uxn_screen.y1 = 0xffff;
uxn_screen.x2 = uxn_screen.y2 = 0;
if(u->dev[0x0e]) {
screen_change(0, 0, w, h);
screen_debugger(u);
}
for(i = 0; i < 16; i++) for(i = 0; i < 16; i++)
palette[i] = uxn_screen.palette[(i >> 2) ? (i >> 2) : (i & 3)]; palette[i] = uxn_screen.palette[(i >> 2) ? (i >> 2) : (i & 3)];
for(y = y1; y < y2; y++) for(y = y1; y < y2; y++)
@ -165,8 +167,6 @@ screen_redraw(Uxn *u)
i = x + y * w; i = x + y * w;
pixels[i] = palette[fg[i] << 2 | bg[i]]; pixels[i] = palette[fg[i] << 2 | bg[i]];
} }
uxn_screen.x1 = uxn_screen.y1 = 0xffff;
uxn_screen.x2 = uxn_screen.y2 = 0;
} }
Uint8 Uint8