Mail Archives: djgpp/1999/07/14/05:25:56
>
> 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
- Raw text -