]> Shamusworld >> Repos - virtualjaguar/blob - src/include/fbmpop24.h
Initial revision
[virtualjaguar] / src / include / fbmpop24.h
1                 if (flags&FLAGS_HFLIP)
2                 {
3                         if (flags&FLAGS_TRANSPARENT)
4                         {
5                                 while (iwidth)
6                                 {
7                                         uint32 data=jaguar_byte_read(ptr++);
8                                         data<<=8;
9                                         data|=jaguar_byte_read(ptr++);
10                                         data<<=8;
11                                         data|=jaguar_byte_read(ptr++);
12                                         data<<=8;
13                                         data|=jaguar_byte_read(ptr++);
14                                         if (data)
15                                         {
16                                                 *current_line_buffer--=(data>>24)&0xff;
17                                                 *current_line_buffer--=(data>>16)&0xff;
18                                                 *current_line_buffer--=(data>> 8)&0xff;
19                                                 *current_line_buffer--=data      &0xff;
20                                         }
21                                         else
22                                                 current_line_buffer-=4;
23                                         iwidth--;
24                                 }
25                         }
26                         else
27                         {
28                                 while (iwidth)
29                                 {
30                                         *current_line_buffer++=jaguar_byte_read(ptr++);
31                                         *current_line_buffer++=jaguar_byte_read(ptr++);
32                                         *current_line_buffer++=jaguar_byte_read(ptr++);
33                                         *current_line_buffer++=jaguar_byte_read(ptr++);
34                                         iwidth--;
35                                 }
36                         }
37                 }
38                 else
39                 {
40                         if (flags&FLAGS_TRANSPARENT)
41                         {
42                                 while (iwidth)
43                                 {
44                                         uint32 data=jaguar_byte_read(ptr++);
45                                         data<<=8;
46                                         data|=jaguar_byte_read(ptr++);
47                                         data<<=8;
48                                         data|=jaguar_byte_read(ptr++);
49                                         data<<=8;
50                                         data|=jaguar_byte_read(ptr++);
51                                         if (data)
52                                         {
53                                                 *current_line_buffer++=(data>>24)&0xff;
54                                                 *current_line_buffer++=(data>>16)&0xff;
55                                                 *current_line_buffer++=(data>> 8)&0xff;
56                                                 *current_line_buffer++=data      &0xff;
57                                         }
58                                         else
59                                                 current_line_buffer+=4;
60                                         iwidth--;
61                                 }
62                         }
63                         else
64                         {
65                                 while (iwidth)
66                                 {
67                                         *current_line_buffer++=jaguar_byte_read(ptr++);
68                                         *current_line_buffer++=jaguar_byte_read(ptr++);
69                                         *current_line_buffer++=jaguar_byte_read(ptr++);
70                                         *current_line_buffer++=jaguar_byte_read(ptr++);
71                                         iwidth--;
72                                 }
73                         }
74                 }