Rev 3707 | Rev 3710 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3707 | Rev 3709 | ||
---|---|---|---|
Line 157... | Line 157... | ||
157 | * will most likely use a color palette. The color appearance |
157 | * will most likely use a color palette. The color appearance |
158 | * will be pretty random and depend on the default installed |
158 | * will be pretty random and depend on the default installed |
159 | * palette. This could be fixed by supporting custom palette |
159 | * palette. This could be fixed by supporting custom palette |
160 | * and setting it to simulate the 8-bit truecolor. |
160 | * and setting it to simulate the 8-bit truecolor. |
161 | * |
161 | * |
162 | * Currently we set the palette on the ia32 and sparc64 port. |
162 | * Currently we set the palette on the ia32, amd64 and sparc64 port. |
163 | * |
163 | * |
164 | * Note that the byte is being inverted by this function. The reason is |
164 | * Note that the byte is being inverted by this function. The reason is |
165 | * that we would like to use a color palette where the white color code |
165 | * that we would like to use a color palette where the white color code |
166 | * is 0 and the black color code is 255, as some machines (SunBlade 1500) |
166 | * is 0 and the black color code is 255, as some machines (Sun Blade 1500) |
167 | * use these codes for black and white and prevent to set codes |
167 | * use these codes for black and white and prevent to set codes |
168 | * 0 and 255 to other colors. |
168 | * 0 and 255 to other colors. |
- | 169 | * |
|
169 | */ |
170 | */ |
170 | static void rgb_323(void *dst, uint32_t rgb) |
171 | static void rgb_323(void *dst, uint32_t rgb) |
171 | { |
172 | { |
172 | *((uint8_t *) dst) |
173 | *((uint8_t *) dst) |
173 | = ~((RED(rgb, 3) << 5) | (GREEN(rgb, 2) << 3) | BLUE(rgb, 3)); |
174 | = ~((RED(rgb, 3) << 5) | (GREEN(rgb, 2) << 3) | BLUE(rgb, 3)); |