Subversion Repositories HelenOS-historic

Rev

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

Rev 1327 Rev 1334
Line 89... Line 89...
89
/** Put pixel - 24-bit depth */
89
/** Put pixel - 24-bit depth */
90
static void putpixel_3byte(unsigned int x, unsigned int y, int color)
90
static void putpixel_3byte(unsigned int x, unsigned int y, int color)
91
{
91
{
92
    unsigned int startbyte = POINTPOS(x, y);
92
    unsigned int startbyte = POINTPOS(x, y);
93
 
93
 
94
#ifdef BIG_ENDIAN
94
#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
95
    fbaddress[startbyte] = RED(color, 8);
95
    fbaddress[startbyte] = RED(color, 8);
96
    fbaddress[startbyte + 1] = GREEN(color, 8);
96
    fbaddress[startbyte + 1] = GREEN(color, 8);
97
    fbaddress[startbyte + 2] = BLUE(color, 8);
97
    fbaddress[startbyte + 2] = BLUE(color, 8);
98
#else
98
#else
99
    fbaddress[startbyte + 2] = RED(color, 8);
99
    fbaddress[startbyte + 2] = RED(color, 8);
Line 105... Line 105...
105
/** Return pixel color - 24-bit depth */
105
/** Return pixel color - 24-bit depth */
106
static int getpixel_3byte(unsigned int x, unsigned int y)
106
static int getpixel_3byte(unsigned int x, unsigned int y)
107
{
107
{
108
    unsigned int startbyte = POINTPOS(x, y);
108
    unsigned int startbyte = POINTPOS(x, y);
109
 
109
 
110
#ifdef BIG_ENDIAN
110
#if (defined(BIG_ENDIAN) || defined(FB_BIG_ENDIAN))
111
    return fbaddress[startbyte] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 2];
111
    return fbaddress[startbyte] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 2];
112
#else
112
#else
113
    return fbaddress[startbyte + 2] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 0];
113
    return fbaddress[startbyte + 2] << 16 | fbaddress[startbyte + 1] << 8 | fbaddress[startbyte + 0];
114
#endif  
114
#endif  
115
}
115
}