Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vt/hw/vga/vt_vga.c
Show First 20 Lines • Show All 639 Lines • ▼ Show 20 Lines | while (i < x + VT_VGA_PIXELS_BLOCK && | ||||
* pixels block. | * pixels block. | ||||
* | * | ||||
* While here, record what colors it uses. | * While here, record what colors it uses. | ||||
*/ | */ | ||||
col = (i - vw->vw_draw_area.tr_begin.tp_col) / vf->vf_width; | col = (i - vw->vw_draw_area.tr_begin.tp_col) / vf->vf_width; | ||||
row = (y - vw->vw_draw_area.tr_begin.tp_row) / vf->vf_height; | row = (y - vw->vw_draw_area.tr_begin.tp_row) / vf->vf_height; | ||||
c = VTBUF_GET_FIELD(vb, row, col); | vtbuf_getchar(vb, row, col, &c, &fg, &bg); | ||||
src = vtfont_lookup(vf, c); | src = vtfont_lookup(vf, c); | ||||
vt_determine_colors(c, VTBUF_ISCURSOR(vb, row, col), &fg, &bg); | |||||
if ((used_colors_list[fg] & 0x1) != 0x1) | if ((used_colors_list[fg] & 0x1) != 0x1) | ||||
used_colors++; | used_colors++; | ||||
if ((used_colors_list[bg] & 0x2) != 0x2) | if ((used_colors_list[bg] & 0x2) != 0x2) | ||||
used_colors++; | used_colors++; | ||||
used_colors_list[fg] |= 0x1; | used_colors_list[fg] |= 0x1; | ||||
used_colors_list[bg] |= 0x2; | used_colors_list[bg] |= 0x2; | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | vga_bitblt_text_txtmode(struct vt_device *vd, const struct vt_window *vw, | ||||
for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { | for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { | ||||
for (col = area->tr_begin.tp_col; | for (col = area->tr_begin.tp_col; | ||||
col < area->tr_end.tp_col; | col < area->tr_end.tp_col; | ||||
++col) { | ++col) { | ||||
/* | /* | ||||
* Get next character and its associated fg/bg | * Get next character and its associated fg/bg | ||||
* colors. | * colors. | ||||
*/ | */ | ||||
c = VTBUF_GET_FIELD(vb, row, col); | vtbuf_getchar(vb, row, col, &c, &fg, &bg); | ||||
vt_determine_colors(c, VTBUF_ISCURSOR(vb, row, col), | |||||
&fg, &bg); | |||||
/* | /* | ||||
* Convert character to CP437, which is the | * Convert character to CP437, which is the | ||||
* character set used by the VGA hardware by | * character set used by the VGA hardware by | ||||
* default. | * default. | ||||
*/ | */ | ||||
ch = vga_get_cp437(TCHAR_CHARACTER(c)); | ch = vga_get_cp437(TCHAR_CHARACTER(c)); | ||||
▲ Show 20 Lines • Show All 434 Lines • Show Last 20 Lines |