10 void VL_MungePic (unsigned char far *source, unsigned width, unsigned height)
\r
12 unsigned x,y,plane,size,pwidth;
\r
13 unsigned char far *temp, far *dest, far *srcline;
\r
15 size = width*height;
\r
18 errout ("VL_MungePic: Not divisable by 4!\n");
\r
21 // copy the pic to a temp buffer
\r
23 temp = (unsigned char far *)farmalloc (size);
\r
25 errout ("Non enough memory for munge buffer!\n");
\r
27 _fmemcpy (temp,source,size);
\r
30 // munge it back into the original buffer
\r
35 for (plane=0;plane<4;plane++)
\r
38 for (y=0;y<height;y++)
\r
40 for (x=0;x<pwidth;x++)
\r
41 *dest++ = *(srcline+x*4+plane);
\r