Mail Archives: djgpp/1999/07/13/16:52:17
Then I suggest you use a 256-color bitmap as a temporary buffer, then you
can do all your calculations and spit out a 16-bit color bitmap...
At 03:30 PM 7/13/99 -0400, you wrote:
>varobert AT colba DOT net wrote:
>>
>> 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).
>>
>
>First of all, thank you for the response.
>
>It seems like a plausible idea; in fact, this is how I do it in
>256-color mode...
>But with true-color, I have to cast the pointer when accessing the
>Bitmap, like this:
>
> Color = ( (short*) Bitmap->line[y] ) [x];
>
>But when I do this, the Color becomes a 16-bit value, not a palette
>index. So, using the code I have above, is there a way to do lighting
>effects (as you can see, I have no way of implementing the method of a
>[256][256] array).
>
>
- Raw text -