delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/13/15:12:59

From: varobert AT colba DOT net
Message-Id: <3.0.32.19990713151216.0079f2b0@mail.colba.net>
X-Sender: varobert AT mail DOT colba DOT net
X-Mailer: Windows Eudora Pro Version 3.0 (32)
Date: Tue, 13 Jul 1999 15:12:18 -0400
To: djgpp AT delorie DOT com
Subject: Re: Allegro 16-bit, using palettes and such
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Since all your bmps are 256 color, you could use a lookup table, say one of
256x256, with one entry per color per shade, with 256 color and 256 shades,
which you precalculate for each bitmaps (that you load in 256 colors).

At 09:07 AM 7/13/99 -0400, you wrote:
>Hi! Thanks for taking the time to read this.
>
>I am programming a 3D-Engine in 16-bit color, but am using 256-color
>.bmp files.  I would like to be able to shade the textures, so that they
>appear differently lit from different viewpoints.  So what I need is a
>way to create a palette that contains shades of each color from black to
>that color.  But using 16-bit color, how do I create a palette that I
>can use?
>
>Basically, how do I shade bitmaps to make them darker/lighter, using an
>array or a palette?
>
>Thanx in advance for the help!
>
>

- Raw text -


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