Mail Archives: djgpp/1999/10/19/21:19:40
Message-ID: | <380CCF3E.8F0756BD@gtcom.net>
|
From: | Krogg <krogg DOT no DOT to DOT spam AT gtcom DOT net>
|
X-Mailer: | Mozilla 4.61 [en] (Win95; U)
|
X-Accept-Language: | en-US,en-GB,en,ja
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: What is a good palette for 8-Bit Grafix?
|
References: | <7uhdij$sfb$1 AT rohrpostix DOT uta4you DOT at>
|
Lines: | 71
|
Date: | Tue, 19 Oct 1999 16:06:22 -0400
|
NNTP-Posting-Host: | 12.6.67.182
|
X-Trace: | eagle.america.net 940363773 12.6.67.182 (Tue, 19 Oct 1999 16:09:33 EDT)
|
NNTP-Posting-Date: | Tue, 19 Oct 1999 16:09:33 EDT
|
Organization: | 24hoursupport.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Roland Moritz wrote:
>
> I want to create a game in Mode-X with Allegro, and now my problem is the
> following:
> Which Palette should I use? How can I make it, that every important color is
> in the palette, and that there are colors in the palette, which enable me to
> make smooth color-changes (for instance when I need the colors to draw a
> picture where a orange gradually turns to a grey or something...)? Can I
> download a good 8-Bit palette somewhere, or has anyone got any tips for how
> to make it?
Roland,there is a very nice palette editor called EZpalette that
i really like.It _could_ have more features but as it stands it
is great.You can get it here:
ftp://x2ftp.oulu.fi/pub/msdos/programming/grutils/ezpalette.zip
You have to know how to load the palette after you have created it
so i will give some source.
-------------------begin snipits-----------------------
PALLETE my_pallete; /* make a pallete struct,call it my_pallete */
/* this should be a global,outside main() */
main() /* just showing where to put stuff */
{
loadpal(); /* call the palette loader function */
set_pallete(pallete); /* change the current palette to your palette */
}
loadpal()
{
int i;
FILE *PALFILE=fopen("mypal.pal","rb"); /* change "mypal.pal" */
/* to what ever you want */
for(i=0;i<256;i++)
{
//fscanf(PALFILE,"%c%c%c",&pallete[i].r,&pallete[i].g,&pallete[i].b);
my_pallete[i].r=(int)getc(PALFILE);
my_pallete[i].g=(int)getc(PALFILE);
my_pallete[i].b=(int)getc(PALFILE);
}
fclose(PALFILE);
}
--------------end snipits---------------------------------
you could do other things,but this will get ya started.
I could send ya some of my palettes if you want to ask
my email.
AND does anyone know why "palette" is mispelt "pallete" in
allegro?
--
|"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""|
| `.`/""""""\,',' my sig is too big, |
|SEE HIS ( / \ \' SEE HIS but its really cool. |
| FACE \/<> <>\/ SMILE |
| / W \ Visit my ascii art site: |
| ,'\_|||||_/`. http://www.gtcom.net/~krogg/ascii/ |
| ,',' ||| `.`. krogg DOT no DOT to DOT spam AT gtcom DOT net |
|____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|
- Raw text -