From: Tudor Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro won't display more than 1 PCX (properly)!!! Date: Sat, 25 Jan 1997 21:46:56 -0800 Organization: Communications Accesibles Montreal Lines: 40 Message-ID: <32EAEFD0.F6E@cam.org> References: <5ce17t$68h AT news DOT interlog DOT com> Reply-To: tudor AT cam DOT org NNTP-Posting-Host: dynppp-142.hip.cam.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Gautam N. Lad wrote: > Please help. Is this possible, or am I hopeless! ;( In that order ? Ugh, no and yes :) The thing is,you can't use 2 palettes in the same time.Coz there is only ONE palette.All this palette thing is: On yar video board you have a palette, that is:an array of color values. When you set the palette in Allegro,it takes the values you feed him and stiks them in the VGA port 3ch (I guess) Well the thing is when you represent an image on the screen,an ordynary pixel doesn't have a color like Blue or Yellow,it has a pallete index #.It says 'this pixel has the color value found in the 'x' pallete entry'. then the monitor takes the color from that pallete array entry (I don't know how to name it :) So you can display as many pics on the screen as you like as long as they use the same palette. in example:If they use different palletes this happens: the first image uses the first pallete entry.That entry represents red. So when you put the image on the screen, the red is red :) The second image uses the first entry too,but this one isn't red,it's blue. the first entry of the VGA pallete gets changed. So when you put the second one on the screen, you have 2 images using the same entry for different colors. What you saw as red you now see as blue. Now the red turns blue :) See what I mean? I know it's somehow confusing. Mail me for further explaining if you feel up to it :) -- tudor 'at' cam 'dot' org yoda69 'at' hotmail 'dot' com http://www.cam.org/~tudor -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d-(--) s(-):(+) a? C+ UL>++++ P L>+++++ E- W++ N o K---(----) w--- O---- M-- V-? PS+++ PE Y PGP t+ 5-- X+++>++++ R tv b+ DI D+ G e->++ h>++ r- y>+++++ ------END GEEK CODE BLOCK------