delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/20/20:31:04

From: "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is a good palette for 8-Bit Grafix?
Date: Wed, 20 Oct 1999 17:20:39 -0500
Organization: Rose-Hulman Institute of Technology
Lines: 35
Sender: AFSAUTH AT yerricde DOT laptop DOT rose-hulman DOT edu
Message-ID: <7ulfat$eo7$1@solomon.cs.rose-hulman.edu>
References: <7uhdij$sfb$1 AT rohrpostix DOT uta4you DOT at> <380D499C DOT F017D7D8 AT snetch DOT cpg DOT com DOT au>
NNTP-Posting-Host: yerricde.laptop.rose-hulman.edu
X-Trace: solomon.cs.rose-hulman.edu 940458141 15111 137.112.205.146 (20 Oct 1999 22:22:21 GMT)
X-Complaints-To: news AT cs DOT rose-hulman DOT edu
NNTP-Posting-Date: 20 Oct 1999 22:22:21 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

frEk <20014670 AT snatch DOT com> wrote:

> What immediately comes to mind is using a palette sort of truecolor
like... ie.
> Instead of for example the hicolor 5-5-5 palette, within 8 bits you use a
3-3-2
> palette which means 3 bits of red, 3 for green, 2 for blue...

I wouldn't. You can't get real grays in a 8 by 8 by 4 cell,
only approximations. Use the "web safe" palette instead.
Copy it from the DOSArena binary:
http://yerricde.tripod.com/binaries/darena1b.zip
It's in the file "dosarena.dat" and called "PCPAL".
To pull it out, load dosarena.dat in Allegro's grabber
(a.k.a. SkinArenaEdit), set the current palette to PCPAL,
and save LOGO_PCX as a PCX or BMP bitmap.
Then grab the bitmap's palette in your Allegro program's
datafile.

Oh, and if you want idiot-proof skinnable graphics, use
Allegro datafiles, but access your datafiles by name.
This way, the program doesn't need to be recompiled
if extraneous files are added to a skin. Check out the
function "GetResource" in dosarena.c in the sources:
http://yerricde.tripod.com/binaries/darena1s.zip
to find out how.

--
Damian Yerrick
CM 398, Rose-Hulman Institute of Technology
5500 Wabash Ave
Terre Haute, IN 47803
http://come.to/yerrick


- Raw text -


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