Rev 4182 | Rev 4223 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4182 | Rev 4187 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | static unsigned int rows; |
75 | static unsigned int rows; |
76 | static unsigned int position = 0; |
76 | static unsigned int position = 0; |
77 | 77 | ||
78 | #define BG_COLOR 0x000080 |
78 | #define BG_COLOR 0x000080 |
79 | #define FG_COLOR 0xffff00 |
79 | #define FG_COLOR 0xffff00 |
- | 80 | #define INV_COLOR 0xaaaaaa |
|
80 | 81 | ||
81 | #define CURSOR 0x2588 |
82 | #define CURSOR 0x2588 |
82 | 83 | ||
83 | #define RED(x, bits) ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1)) |
84 | #define RED(x, bits) ((x >> (8 + 8 + 8 - bits)) & ((1 << bits) - 1)) |
84 | #define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1)) |
85 | #define GREEN(x, bits) ((x >> (8 + 8 - bits)) & ((1 << bits) - 1)) |
Line 342... | Line 343... | ||
342 | { |
343 | { |
343 | /* Prerender glyphs */ |
344 | /* Prerender glyphs */ |
344 | uint16_t glyph; |
345 | uint16_t glyph; |
345 | 346 | ||
346 | for (glyph = 0; glyph < FONT_GLYPHS; glyph++) { |
347 | 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 | ||
347 | unsigned int y; |
355 | unsigned int y; |
348 | 356 | ||
349 | for (y = 0; y < FONT_SCANLINES; y++) { |
357 | for (y = 0; y < FONT_SCANLINES; y++) { |
350 | unsigned int x; |
358 | unsigned int x; |
351 | 359 | ||
352 | for (x = 0; x < FONT_WIDTH; x++) { |
360 | for (x = 0; x < FONT_WIDTH; x++) { |
353 | void *dst = &glyphs[GLYPH_POS(glyph, y) + |
361 | void *dst = &glyphs[GLYPH_POS(glyph, y) + |
354 | x * pixelbytes]; |
362 | x * pixelbytes]; |
355 | uint32_t rgb = (fb_font[glyph][y] & |
363 | uint32_t rgb = (fb_font[glyph][y] & |
356 | (1 << (7 - x))) ? FG_COLOR : BG_COLOR; |
364 | (1 << (7 - x))) ? fg_color : BG_COLOR; |
357 | rgb_conv(dst, rgb); |
365 | rgb_conv(dst, rgb); |
358 | } |
366 | } |
359 | } |
367 | } |
360 | } |
368 | } |
361 | 369 |