Subversion Repositories HelenOS-historic

Rev

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

Rev 862 Rev 886
Line 124... Line 124...
124
    green = (color >> 5) & 0x3f;
124
    green = (color >> 5) & 0x3f;
125
    blue = color & 0x1f;
125
    blue = color & 0x1f;
126
    return (red << (16+3)) | (green << (8+2)) | (blue << 3);
126
    return (red << (16+3)) | (green << (8+2)) | (blue << 3);
127
}
127
}
128
 
128
 
129
/** Put pixel - 8-bit depth (3:3:2) */
129
/** Put pixel - 8-bit depth (3:2:3) */
130
static void putpixel_1byte(int x,int y,int color)
130
static void putpixel_1byte(int x,int y,int color)
131
{
131
{
132
    int compcolor;
132
    int compcolor;
133
 
133
 
134
    /* 3-bit, 3-bits, 2-bits */
134
    /* 3-bit, 2-bits, 3-bits */
135
    compcolor = RED(color,3) << 5 \
135
    compcolor = RED(color,3) << 5 \
136
        | GREEN(color,3) << 2 \
136
        | GREEN(color,2) << 3 \
137
        | BLUE(color,2);
137
        | BLUE(color,3);
138
    fbaddress[POINTPOS(x,y)] = compcolor;
138
    fbaddress[POINTPOS(x,y)] = compcolor;
139
}
139
}
140
 
140
 
141
 
141
 
142
static int getpixel_1byte(int x,int y)
142
static int getpixel_1byte(int x,int y)
Line 144... Line 144...
144
    int color;
144
    int color;
145
    int red,green,blue;
145
    int red,green,blue;
146
 
146
 
147
    color = fbaddress[POINTPOS(x,y)];
147
    color = fbaddress[POINTPOS(x,y)];
148
    red = (color >> 5) & 0x7;
148
    red = (color >> 5) & 0x7;
149
    green = (color >> 5) & 0x7;
149
    green = (color >> 3) & 0x7;
150
    blue = color & 0x3;
150
    blue = color & 0x3;
151
    return (red << (16+5)) | (green << (8+5)) | blue << 6;
151
    return (red << (16+5)) | (green << (8+5)) | blue << 6;
152
}
152
}
153
 
153
 
154
static void clear_line(int y);
154
static void clear_line(int y);