Subversion Repositories HelenOS

Rev

Rev 1869 | Rev 1875 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1869 Rev 1871
Line 152... Line 152...
152
}
152
}
153
 
153
 
154
static void rgb_3byte(void *dst, int rgb)
154
static void rgb_3byte(void *dst, int rgb)
155
{
155
{
156
    uint8_t *scr = dst;
156
    uint8_t *scr = dst;
157
#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
157
#if defined(FB_INVERT_ENDIAN)
158
    scr[0] = RED(rgb, 8);
158
    scr[0] = RED(rgb, 8);
159
    scr[1] = GREEN(rgb, 8);
159
    scr[1] = GREEN(rgb, 8);
160
    scr[2] = BLUE(rgb, 8);
160
    scr[2] = BLUE(rgb, 8);
161
#else
161
#else
162
    scr[2] = RED(rgb, 8);
162
    scr[2] = RED(rgb, 8);
Line 168... Line 168...
168
}
168
}
169
 
169
 
170
static int byte3_rgb(void *src)
170
static int byte3_rgb(void *src)
171
{
171
{
172
    uint8_t *scr = src;
172
    uint8_t *scr = src;
173
#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
173
#if defined(FB_INVERT_ENDIAN)
174
    return scr[0] << 16 | scr[1] << 8 | scr[2];
174
    return scr[0] << 16 | scr[1] << 8 | scr[2];
175
#else
175
#else
176
    return scr[2] << 16 | scr[1] << 8 | scr[0];
176
    return scr[2] << 16 | scr[1] << 8 | scr[0];
177
#endif  
177
#endif  
178
}
178
}