version 1.87, 2018/10/18 07:57:57 |
version 1.88, 2018/10/25 15:13:38 |
|
|
grid_empty_line(struct grid *gd, u_int py, u_int bg) |
grid_empty_line(struct grid *gd, u_int py, u_int bg) |
{ |
{ |
memset(&gd->linedata[py], 0, sizeof gd->linedata[py]); |
memset(&gd->linedata[py], 0, sizeof gd->linedata[py]); |
if (bg != 8) |
if (!COLOUR_DEFAULT(bg)) |
grid_expand_line(gd, py, gd->sx, bg); |
grid_expand_line(gd, py, gd->sx, bg); |
} |
} |
|
|
|
|
void |
void |
grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg) |
grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg) |
{ |
{ |
u_int xx, yy; |
struct grid_line *gl; |
|
u_int xx, yy; |
|
|
if (nx == 0 || ny == 0) |
if (nx == 0 || ny == 0) |
return; |
return; |
|
|
return; |
return; |
|
|
for (yy = py; yy < py + ny; yy++) { |
for (yy = py; yy < py + ny; yy++) { |
if (px + nx >= gd->sx && px < gd->linedata[yy].cellused) |
gl = &gd->linedata[yy]; |
gd->linedata[yy].cellused = px; |
if (px + nx >= gd->sx && px < gl->cellused) |
if (px > gd->linedata[yy].cellsize && bg == 8) |
gl->cellused = px; |
|
if (px > gl->cellsize && COLOUR_DEFAULT(bg)) |
continue; |
continue; |
if (px + nx >= gd->linedata[yy].cellsize && bg == 8) { |
if (px + nx >= gl->cellsize && COLOUR_DEFAULT(bg)) { |
gd->linedata[yy].cellsize = px; |
gl->cellsize = px; |
continue; |
continue; |
} |
} |
grid_expand_line(gd, yy, px + nx, 8); /* default bg first */ |
grid_expand_line(gd, yy, px + nx, 8); /* default bg first */ |