Screen debugger forces a full screen redraw
This commit is contained in:
parent
4690a113c4
commit
68e4d82df5
|
@ -150,14 +150,16 @@ screen_redraw(Uxn *u)
|
|||
Uint8 *fg = uxn_screen.fg, *bg = uxn_screen.bg;
|
||||
Uint32 palette[16], *pixels = uxn_screen.pixels;
|
||||
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;
|
||||
y1 = uxn_screen.y1;
|
||||
x2 = uxn_screen.x2 > w ? w : uxn_screen.x2;
|
||||
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++)
|
||||
palette[i] = uxn_screen.palette[(i >> 2) ? (i >> 2) : (i & 3)];
|
||||
for(y = y1; y < y2; y++)
|
||||
|
@ -165,8 +167,6 @@ screen_redraw(Uxn *u)
|
|||
i = x + y * w;
|
||||
pixels[i] = palette[fg[i] << 2 | bg[i]];
|
||||
}
|
||||
uxn_screen.x1 = uxn_screen.y1 = 0xffff;
|
||||
uxn_screen.x2 = uxn_screen.y2 = 0;
|
||||
}
|
||||
|
||||
Uint8
|
||||
|
|
Loading…
Reference in New Issue