Fix tms9918a transparent color rendering
[qemu/z80.git] / hw / pixel_ops_dup.h
blobda74d5dcc3533ee7e35d5f23d3c75d504c2c35c5
1 static inline unsigned int rgb_to_pixel8_dup(unsigned int r, unsigned int g,
2 unsigned int b)
4 unsigned int col;
5 col = rgb_to_pixel8(r, g, b);
6 col |= col << 8;
7 col |= col << 16;
8 return col;
11 static inline unsigned int rgb_to_pixel15_dup(unsigned int r, unsigned int g,
12 unsigned int b)
14 unsigned int col;
15 col = rgb_to_pixel15(r, g, b);
16 col |= col << 16;
17 return col;
20 static inline unsigned int rgb_to_pixel15bgr_dup(unsigned int r, unsigned int g,
21 unsigned int b)
23 unsigned int col;
24 col = rgb_to_pixel15bgr(r, g, b);
25 col |= col << 16;
26 return col;
29 static inline unsigned int rgb_to_pixel16_dup(unsigned int r, unsigned int g,
30 unsigned int b)
32 unsigned int col;
33 col = rgb_to_pixel16(r, g, b);
34 col |= col << 16;
35 return col;
38 static inline unsigned int rgb_to_pixel16bgr_dup(unsigned int r, unsigned int g,
39 unsigned int b)
41 unsigned int col;
42 col = rgb_to_pixel16bgr(r, g, b);
43 col |= col << 16;
44 return col;
47 static inline unsigned int rgb_to_pixel32_dup(unsigned int r, unsigned int g,
48 unsigned int b)
50 unsigned int col;
51 col = rgb_to_pixel32(r, g, b);
52 return col;
55 static inline unsigned int rgb_to_pixel32bgr_dup(unsigned int r, unsigned int g,
56 unsigned int b)
58 unsigned int col;
59 col = rgb_to_pixel32bgr(r, g, b);
60 return col;