www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/29/22:39:50

From: Jose Manuel Lopez-Cepero <sigma AT ctv DOT es>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Silly newbie question - Allegro/palletes
Date: Sat, 29 Mar 1997 22:29:32 +0100
Organization: Unisource Espana NEWS SERVER
Lines: 26
Message-ID: <333D89BC.4981@ctv.es>
References: <3332BFFF DOT 1569 AT interlog DOT com>
Reply-To: sigma AT ctv DOT es
NNTP-Posting-Host: macarena.ctv.es
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello!
Adam Lawrence wrote:
> 
>         I'm programming away in DJGPP using Allegro and sprites. I draw the
> sprites (for now) using the cheezy Windows Paint program. I cannot seem
> to load or create a pallete that displays the colors of all the sprites
> correctly. My 'spaceship' looks fine but its shots, instead of being
> yellow and red, are an odd-shade of purple. Is there some sort of
> workaround for this?

Sure. :-)

I suppose you are using a *different* palette for each sprite. Bad Thing
:-). To make it look fine you must convert your sprites so they all use
the same palette. If you want a trick to avoid messing I would create a
new screen with a painting program on 24bit color, place all the sprites
here, convert it back to 256 color and you will get a screen with all
your sprites; extract them from here (using the grabber, for instance)
and use the palette the image has. This way they will display perfectly.

Good luck!

-- 
 _*                        
\ |/_|\/||\                                 sigma AT ctv DOT es      
_\|\/|  ||_\  (formerly Sigmatech)      Jerez / Cadiz / Spain

- Raw text -


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