Mail Archives: djgpp/1999/07/13/15:35:27
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 -