Changeset 67ebf21 in mainline for uspace/srv/fb/fb.c
- Timestamp:
- 2009-04-04T16:26:18Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4527fb5
- Parents:
- 7d440e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fb/fb.c
r7d440e3 r67ebf21 389 389 unsigned int row, col; 390 390 unsigned int x, y; 391 uint 8_t glyph;391 uint32_t glyph; 392 392 uint32_t fg_color; 393 393 uint32_t bg_color; … … 466 466 for (x = 0; x < FONT_WIDTH; x++) { 467 467 screen.rgb_conv(&vport->glyphs[GLYPH_POS(glyph, y, false) + x * screen.pixelbytes], 468 (fb_font[glyph * FONT_SCANLINES +y] & (1 << (7 - x)))468 (fb_font[glyph][y] & (1 << (7 - x))) 469 469 ? 0xffffff : 0x000000); 470 470 471 471 screen.rgb_conv(&vport->glyphs[GLYPH_POS(glyph, y, true) + x * screen.pixelbytes], 472 (fb_font[glyph * FONT_SCANLINES +y] & (1 << (7 - x)))472 (fb_font[glyph][y] & (1 << (7 - x))) 473 473 ? 0x000000 : 0xffffff); 474 474 } … … 670 670 unsigned int ww, d_add; 671 671 672 /* Check glyph range. */673 if (glyph >= FONT_GLYPHS)674 glyph = GLYPH_UNAVAIL;675 676 672 /* 677 673 * Prepare a pair of words, one filled with foreground-color … … 734 730 uint8_t b; 735 731 736 /* Check glyph range. */737 if (glyph >= FONT_GLYPHS)738 glyph = GLYPH_UNAVAIL;739 740 732 /* Pre-render 1x the foreground and background color pixels. */ 741 733 if (cursor) { … … 755 747 for (yd = 0; yd < FONT_SCANLINES; yd++) { 756 748 /* Byte containing bits of the glyph scanline. */ 757 b = fb_font[glyph * FONT_SCANLINES +yd];749 b = fb_font[glyph][yd]; 758 750 759 751 for (i = 0; i < FONT_WIDTH; i++) { … … 856 848 857 849 bbp = &vport->backbuf[BB_POS(vport, col, row)]; 858 bbp->glyph = (uint32_t) c;850 bbp->glyph = fb_font_glyph(c); 859 851 bbp->fg_color = vport->attr.fg_color; 860 852 bbp->bg_color = vport->attr.bg_color; … … 899 891 900 892 bbp = &vport->backbuf[BB_POS(vport, col, row)]; 901 uint32_t glyph = bbp->glyph;902 893 903 894 a = &data[j * w + i].attrs; 904 895 rgb_from_attr(&rgb, a); 905 896 906 bbp->glyph = data[j * w + i].character;897 bbp->glyph = fb_font_glyph(data[j * w + i].character); 907 898 bbp->fg_color = rgb.fg_color; 908 899 bbp->bg_color = rgb.bg_color; … … 1520 1511 unsigned int i; 1521 1512 int scroll; 1522 uint32_t glyph;1513 wchar_t ch; 1523 1514 unsigned int row, col; 1524 1515 … … 1557 1548 1558 1549 case FB_PUTCHAR: 1559 glyph = IPC_GET_ARG1(call);1550 ch = IPC_GET_ARG1(call); 1560 1551 row = IPC_GET_ARG2(call); 1561 1552 col = IPC_GET_ARG3(call); … … 1567 1558 ipc_answer_0(callid, EOK); 1568 1559 1569 draw_char(vport, glyph, col, row);1560 draw_char(vport, ch, col, row); 1570 1561 1571 1562 /* Message already answered */
Note:
See TracChangeset
for help on using the changeset viewer.