Rev 4211 | Rev 4232 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4211 | Rev 4226 | ||
---|---|---|---|
Line 66... | Line 66... | ||
66 | #include "pointer_mask.xbm" |
66 | #include "pointer_mask.xbm" |
67 | 67 | ||
68 | #define DEFAULT_BGCOLOR 0xf0f0f0 |
68 | #define DEFAULT_BGCOLOR 0xf0f0f0 |
69 | #define DEFAULT_FGCOLOR 0x000000 |
69 | #define DEFAULT_FGCOLOR 0x000000 |
70 | 70 | ||
- | 71 | #define GLYPH_UNAVAIL '?' |
|
- | 72 | ||
71 | #define MAX_ANIM_LEN 8 |
73 | #define MAX_ANIM_LEN 8 |
72 | #define MAX_ANIMATIONS 4 |
74 | #define MAX_ANIMATIONS 4 |
73 | #define MAX_PIXMAPS 256 /**< Maximum number of saved pixmaps */ |
75 | #define MAX_PIXMAPS 256 /**< Maximum number of saved pixmaps */ |
74 | #define MAX_VIEWPORTS 128 /**< Viewport is a rectangular area on the screen */ |
76 | #define MAX_VIEWPORTS 128 /**< Viewport is a rectangular area on the screen */ |
75 | 77 | ||
76 | /** Function to render a pixel from a RGB value. */ |
78 | /** Function to render a pixel from a RGB value. */ |
77 | typedef void (*rgb_conv_t)(void *, uint32_t); |
79 | typedef void (*rgb_conv_t)(void *, uint32_t); |
78 | 80 | ||
79 | /** Function to draw a glyph. */ |
81 | /** Function to draw a glyph. */ |
80 | typedef void (*dg_t)(unsigned int x, unsigned int y, bool cursor, |
82 | typedef void (*dg_t)(unsigned int x, unsigned int y, bool cursor, |
81 | uint8_t *glyphs, uint8_t glyph, uint32_t fg_color, uint32_t bg_color); |
83 | uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color); |
82 | 84 | ||
83 | struct { |
85 | struct { |
84 | uint8_t *fb_addr; |
86 | uint8_t *fb_addr; |
85 | 87 | ||
86 | unsigned int xres; |
88 | unsigned int xres; |
Line 667... | Line 669... | ||
667 | unsigned long mask; |
669 | unsigned long mask; |
668 | unsigned int ww, d_add; |
670 | unsigned int ww, d_add; |
669 | 671 | ||
670 | /* Check glyph range. */ |
672 | /* Check glyph range. */ |
671 | if (glyph >= FONT_GLYPHS) |
673 | if (glyph >= FONT_GLYPHS) |
672 | return; |
674 | glyph = GLYPH_UNAVAIL; |
673 | 675 | ||
674 | /* |
676 | /* |
675 | * Prepare a pair of words, one filled with foreground-color |
677 | * Prepare a pair of words, one filled with foreground-color |
676 | * pattern and the other filled with background-color pattern. |
678 | * pattern and the other filled with background-color pattern. |
677 | */ |
679 | */ |
Line 731... | Line 733... | ||
731 | unsigned int d_add; |
733 | unsigned int d_add; |
732 | uint8_t b; |
734 | uint8_t b; |
733 | 735 | ||
734 | /* Check glyph range. */ |
736 | /* Check glyph range. */ |
735 | if (glyph >= FONT_GLYPHS) |
737 | if (glyph >= FONT_GLYPHS) |
736 | return; |
738 | glyph = GLYPH_UNAVAIL; |
737 | 739 | ||
738 | /* Pre-render 1x the foreground and background color pixels. */ |
740 | /* Pre-render 1x the foreground and background color pixels. */ |
739 | if (cursor) { |
741 | if (cursor) { |
740 | screen.rgb_conv(fg_buf, bg_color); |
742 | screen.rgb_conv(fg_buf, bg_color); |
741 | screen.rgb_conv(bg_buf, fg_color); |
743 | screen.rgb_conv(bg_buf, fg_color); |