delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/14/06:25:55

From: Alexei Levenko <alexei DOT Levenko AT in DOT stud DOT tu-ilmenau DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro 16-bit, using palettes and such
Date: Wed, 14 Jul 1999 11:40:33 +0200
Organization: TU Ilmenau
Lines: 21
Message-ID: <378C5B11.630BFDD1@in.stud.tu-ilmenau.de>
References: <378B39FB DOT F8D2A665 AT ameritech DOT net>
NNTP-Posting-Host: lanai.theoinf.tu-ilmenau.de
Mime-Version: 1.0
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en,ru
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> 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?
there is no palette in 16-bit color mode

> Basically, how do I shade bitmaps to make them darker/lighter, using an
> array or a palette?
umm, maybe you just convert bitmaps from 8-bit to 16-bit and then work
with these
like if you had
	char bitmap[size]
now you will have
	RGB bitmap[size]
and then do all the lighting and stuff with code as
	bitmap[i].R++;
or whatever

i may be wrong, i am not familiar with allegro

- Raw text -


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