summaryrefslogtreecommitdiff
path: root/hw/vga_template.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/vga_template.h')
-rw-r--r--hw/vga_template.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/vga_template.h b/hw/vga_template.h
index cc4df95e35..810b4b128b 100644
--- a/hw/vga_template.h
+++ b/hw/vga_template.h
@@ -391,6 +391,26 @@ static void glue(vga_draw_line16_, DEPTH)(VGAState *s1, uint8_t *d,
}
/*
+ * 24 bit color
+ */
+static void glue(vga_draw_line24_, DEPTH)(VGAState *s1, uint8_t *d,
+ const uint8_t *s, int width)
+{
+ int w;
+ uint32_t r, g, b;
+
+ w = width;
+ do {
+ b = s[0];
+ g = s[1];
+ r = s[2];
+ ((PIXEL_TYPE *)d)[0] = glue(rgb_to_pixel, DEPTH)(r, g, b);
+ s += 3;
+ d += BPP;
+ } while (--w != 0);
+}
+
+/*
* 32 bit color
*/
static void glue(vga_draw_line32_, DEPTH)(VGAState *s1, uint8_t *d,