From: toudi Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro truecolor problem Date: Wed, 14 Jul 1999 00:39:58 +0200 Organization: beautiful piramids Lines: 29 Sender: pienkny AT pa52 DOT warszawa DOT ppp DOT tpnet DOT pl Message-ID: <378BC03E.8CD3AC44@friko6.onet.pl> References: <378B958E DOT 5B0C3F7 AT ameritech DOT net> NNTP-Posting-Host: pa52.warszawa.ppp.tpnet.pl Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Trace: news.onet.pl 931907444 15187 212.160.52.52 (13 Jul 1999 23:10:44 GMT) X-Complaints-To: abuse AT onet DOT pl NNTP-Posting-Date: 13 Jul 1999 23:10:44 GMT X-Mailer: Mozilla 4.5 [pl] (Win95; I) X-Accept-Language: pl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > I'm having trouble understanding how to implement shading using allegro, > in 16-bit mode. My code looks like this: > > Color = ( (short*) Bitmap->line[y] ) [x]; > > "Bitmap" is a 256-color Bitmap, and I'm in 16-bit color mode. What I > don't understand is: How can I implement a shading buffer into my > current code. > > I know that in 256-color mode, I could have simply made a [256][256] > LUT, which allegro provides, but now I'm lost. Can anyone help? > > Thanks in advance! :-) In truecolor modes you must use r,g,b triplet to calculate pixel colour. You can write your own BLEND routine. Another way is to manipulate 8bit bitmaps, then blit them to the screen, Allegro will convert them to 16bit. Read about 'blit' function in Allegro docs. -- mailto:pienkny AT friko6 DOT onet DOT pl +4822368951