Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1780 → Rev 1781

/uspace/trunk/fb/fb.c
70,7 → 70,7
typedef int (*conv2rgb_fn_t)(void *);
 
struct {
__u8 *fbaddress ;
uint8_t *fbaddress ;
 
unsigned int xres ;
unsigned int yres ;
94,7 → 94,7
int cursor_active, cur_col, cur_row;
int cursor_shown;
/* Double buffering */
__u8 *dbdata;
uint8_t *dbdata;
unsigned int dboffset;
unsigned int paused;
} viewport_t;
120,7 → 120,7
typedef struct {
unsigned int width;
unsigned int height;
__u8 *data;
uint8_t *data;
} pixmap_t;
static pixmap_t pixmaps[MAX_PIXMAPS];
 
153,7 → 153,7
 
static void rgb_3byte(void *dst, int rgb)
{
__u8 *scr = dst;
uint8_t *scr = dst;
#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
scr[0] = RED(rgb, 8);
scr[1] = GREEN(rgb, 8);
169,7 → 169,7
 
static int byte3_rgb(void *src)
{
__u8 *scr = src;
uint8_t *scr = src;
#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
return scr[0] << 16 | scr[1] << 8 | scr[2];
#else
181,13 → 181,13
static void rgb_2byte(void *dst, int rgb)
{
/* 5-bit, 6-bits, 5-bits */
*((__u16 *)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | BLUE(rgb, 5);
*((uint16_t *)(dst)) = RED(rgb, 5) << 11 | GREEN(rgb, 6) << 5 | BLUE(rgb, 5);
}
 
/** 16-bit depth (5:6:5) */
static int byte2_rgb(void *src)
{
int color = *(__u16 *)(src);
int color = *(uint16_t *)(src);
return (((color >> 11) & 0x1f) << (16 + 3)) | (((color >> 5) & 0x3f) << (8 + 2)) | ((color & 0x1f) << 3);
}
 
194,13 → 194,13
/** Put pixel - 8-bit depth (3:2:3) */
static void rgb_1byte(void *dst, int rgb)
{
*(__u8 *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);
*(uint8_t *)dst = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | BLUE(rgb, 3);
}
 
/** Return pixel color - 8-bit depth (3:2:3) */
static int byte1_rgb(void *src)
{
int color = *(__u8 *)src;
int color = *(uint8_t *)src;
return (((color >> 5) & 0x7) << (16 + 5)) | (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5);
}
 
376,7 → 376,7
* @param style Color of the character
* @param transparent If false, print background color
*/
static void draw_glyph(viewport_t *vport,__u8 glyph, unsigned int sx, unsigned int sy,
static void draw_glyph(viewport_t *vport,uint8_t glyph, unsigned int sx, unsigned int sy,
style_t style, int transparent)
{
int i;