1 /* Crude PCX file loading and display for 640x480 image at boot */
3 unsigned char *pcxColormap(unsigned char *gfx_file, int gfx_len)
5 return(gfx_file + gfx_len - 768);
8 extern void scrPutPixel( int x, int y, unsigned char c );
10 static void inline do_putpixel(int offset, unsigned char c)
12 scrPutPixel(offset % 640, offset / 640, c);
15 void pcxDisplay(unsigned char *gfx_file, unsigned gfx_len)
17 int offset, file_offset, i, c, f;
19 for(offset = 0, file_offset = 128; offset < 640 * 480 && file_offset < gfx_len - 769; file_offset++)
21 if(((c = gfx_file[file_offset]) & 0xc0) == 0xc0)
23 f = gfx_file[++file_offset];
25 for(i = 0; i < c; ++i)
26 do_putpixel(offset++, f);
29 do_putpixel(offset++, c);