Revision 4fa0f5d2 hw/vga_template.h
b/hw/vga_template.h | ||
---|---|---|
391 | 391 |
} |
392 | 392 |
|
393 | 393 |
/* |
394 |
* 24 bit color |
|
395 |
*/ |
|
396 |
static void glue(vga_draw_line24_, DEPTH)(VGAState *s1, uint8_t *d, |
|
397 |
const uint8_t *s, int width) |
|
398 |
{ |
|
399 |
int w; |
|
400 |
uint32_t r, g, b; |
|
401 |
|
|
402 |
w = width; |
|
403 |
do { |
|
404 |
b = s[0]; |
|
405 |
g = s[1]; |
|
406 |
r = s[2]; |
|
407 |
((PIXEL_TYPE *)d)[0] = glue(rgb_to_pixel, DEPTH)(r, g, b); |
|
408 |
s += 3; |
|
409 |
d += BPP; |
|
410 |
} while (--w != 0); |
|
411 |
} |
|
412 |
|
|
413 |
/* |
|
394 | 414 |
* 32 bit color |
395 | 415 |
*/ |
396 | 416 |
static void glue(vga_draw_line32_, DEPTH)(VGAState *s1, uint8_t *d, |
Also available in: Unified diff