From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro won't display more than 1 PCX (properly)!!! Date: Sun, 26 Jan 1997 00:58:59 GMT Organization: Southwest Missouri State University Lines: 16 Message-ID: <32eaab6f.7831583@ursa.smsu.edu> References: <5ce17t$68h AT news DOT interlog DOT com> NNTP-Posting-Host: huwawa.p13.smsu.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 25 Jan 1997 22:25:01 GMT, "Gautam N. Lad" wrote: [snip] >I modified the example EX15.C source to display two different PCXs. >So, here's the code. Now what I don't understand is why >does Allegro use one palette to display an image, and when another >palette is created for another image, that original palette >gets screwed up, and starts using the palette from the new palette. That is a limitation of the palette system on the PC. Only 256 colors can exist simultaneously on the (S)VGA using the palette. When your second image wrote its palette to the VGA palette hardware, the old palette data was overwritten and all colors on the screen (regardless of what palette was used to create them) are translated according to the new palette. The only way around this is to convert all simultaneously displayed images to a single common palette.