2 // Convert 0000bbb0 ggg0rrr0 0000bbb0 ggg0rrr0
3 // to 00000000 rrr00000 ggg00000 bbb00000 ...
4 // TODO: rm when gp2x/emu.c is no longer used
6 void bgr444_to_rgb32(void *to, void *from)
8 unsigned short *ps = from;
12 for (pixels = 0x40; pixels; pixels--, ps++, pd++)
14 *pd = ((*ps<<20)&0xe00000) | ((*ps<<8)&0xe000) | ((*ps>>4)&0xe0);
19 void bgr444_to_rgb32_sh(void *to, void *from)
21 unsigned short *ps = from;
22 unsigned int *pd = to;
26 for (pixels = 0x40; pixels; pixels--, ps++, pd++)
28 *pd = ((*ps<<20)&0xe00000) | ((*ps<<8)&0xe000) | ((*ps>>4)&0xe0);
35 for (pixels = 0x40; pixels; pixels--, ps++, pd++)
37 *pd = ((*ps<<20)&0xe00000) | ((*ps<<8)&0xe000) | ((*ps>>4)&0xe0);
40 if (*pd & 0x01000000) *pd |= 0x00e00000;
41 if (*pd & 0x00010000) *pd |= 0x0000e000;
42 if (*pd & 0x00000100) *pd |= 0x000000e0;
48 void vidcpy_m2(void *dest, void *src, int m32col, int with_32c_border)
50 unsigned char *pd = dest, *ps = src;
54 for (i = 0; i < 224; i++)
58 for (u = 0; u < 256; u++)
64 for (i = 0; i < 224; i++)
67 for (u = 0; u < 320; u++)
73 void vidcpy_m2_rot(void *dest, void *src, int m32col, int with_32c_border)
77 void rotated_blit8 (void *dst, void *linesx4, int y, int is_32col)
81 void rotated_blit16(void *dst, void *linesx4, int y, int is_32col)