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 vidConvCpyRGB32 (void *to, void *from, int pixels)
8 unsigned short *ps = from;
11 for (; pixels; pixels--, ps++, pd++)
13 *pd = ((*ps<<20)&0xe00000) | ((*ps<<8)&0xe000) | ((*ps>>4)&0xe0);
18 void vidConvCpyRGB32sh(void *to, void *from, int pixels)
20 unsigned short *ps = from;
21 unsigned int *pd = to;
23 for (; pixels; pixels--, ps++, pd++)
25 *pd = ((*ps<<20)&0xe00000) | ((*ps<<8)&0xe000) | ((*ps>>4)&0xe0);
31 void vidConvCpyRGB32hi(void *to, void *from, int pixels)
33 unsigned short *ps = from;
34 unsigned int *pd = to;
36 for (; pixels; pixels--, ps++, pd++)
38 *pd = ((*ps<<20)&0xe00000) | ((*ps<<8)&0xe000) | ((*ps>>4)&0xe0);
41 if (*pd & 0x01000000) *pd |= 0x00e00000;
42 if (*pd & 0x00010000) *pd |= 0x0000e000;
43 if (*pd & 0x00000100) *pd |= 0x000000e0;
49 void vidcpy_m2(void *dest, void *src, int m32col, int with_32c_border)
51 unsigned char *pd = dest, *ps = src;
55 for (i = 0; i < 224; i++)
59 for (u = 0; u < 256; u++)
65 for (i = 0; i < 224; i++)
68 for (u = 0; u < 320; u++)
74 void vidcpy_m2_rot(void *dest, void *src, int m32col, int with_32c_border)
78 void rotated_blit8 (void *dst, void *linesx4, int y, int is_32col)
82 void rotated_blit16(void *dst, void *linesx4, int y, int is_32col)