delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/25/22:49:43

To: djgpp AT delorie DOT com
Subject: Re: Allegro won't display more than 1 PCX (properly)!!!
Message-ID: <19970125.193413.4975.2.chambersb@juno.com>
References: <5ce17t$68h AT news DOT interlog DOT com>
From: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Sat, 25 Jan 1997 22:33:36 EST

On 25 Jan 1997 22:25:01 GMT "Gautam N. Lad" <gautam AT interlog DOT com> writes:
>Hi,
>Ok, since I don't know how to display PCX images, I had to resort
>to Allegro (which I think is amazing, and I look forward to the
>new version which includes some 3D goodies!!).
>
>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.
>Are ya confused?  Look at the source; it might be easier.
>
>In this program, two PCX images are loaded (I could've used a for 
>loop, but I wanted to make sure it works. Oh well.)

Of course it uses the new palette - you called setpalette on the new
palette.
You only have 256 colors to use, and when you change them, _everything_
on the screen uses the new 256 colors.

...Chambers

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019