Changeset 98895c5c in mainline for kernel/genarch/src/fb/fb.c


Ignore:
Timestamp:
2009-03-24T16:09:17Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2fce275
Parents:
6a75902c
Message:

simplify glyph mapping function
draw invalid glyphs with a distinctive color

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/fb/fb.c

    r6a75902c r98895c5c  
    7878#define BG_COLOR     0x000080
    7979#define FG_COLOR     0xffff00
     80#define INV_COLOR    0xaaaaaa
    8081
    8182#define CURSOR       0x2588
     
    345346       
    346347        for (glyph = 0; glyph < FONT_GLYPHS; glyph++) {
     348                uint32_t fg_color;
     349               
     350                if (glyph == FONT_GLYPHS - 1)
     351                        fg_color = INV_COLOR;
     352                else
     353                        fg_color = FG_COLOR;
     354               
    347355                unsigned int y;
    348356               
     
    354362                                    x * pixelbytes];
    355363                                uint32_t rgb = (fb_font[glyph][y] &
    356                                     (1 << (7 - x))) ? FG_COLOR : BG_COLOR;
     364                                    (1 << (7 - x))) ? fg_color : BG_COLOR;
    357365                                rgb_conv(dst, rgb);
    358366                        }
Note: See TracChangeset for help on using the changeset viewer.