Mail Archives: djgpp/1997/07/25/05:35:16
I'm displaying PCX files to the screen in VESA mode 0x101 (640x480x256). The
problem is that the palette either:
a) isn't being loaded correctly, or
b) isn't being set correctly.
This is what I'm doing:
byte pal[768];
FILE f;
/* open the file and load the palette */
f=fopen("file.pcx","rb");
fseek(f,-768,SEEK_END);
fread(pal,1,768,f);
fclose(f);
/* set the vga palette */
outportb(0x3c8,0);
for(i=0;i<768;i++)
outportb(0x3c9,pal[i]);
This isn't working!
Should I be setting the palette some other way?
Thanx in advance,
--
| David Orme <>< | "Striving for Excellence" |
| phreadd AT powerup DOT com DOT au | |
| powerup.com.au/~phreadd | "Professional Newbie" |
- Raw text -