Mail Archives: djgpp/1999/10/28/01:51:23
Heya
> Lasse Hassing writes:
> > int main() {
> > FlukkiB = load_pcx("flukki.pcx", MyPal);
> > generate_optimized_palette(FlukkiB, MyPal, NULL);
> [snip]
> > // init Allegro!!
> > allegro_init();
Actually, looking on the generate_optimized_palette (...), used in the
makes me think of a previous problem I was having.
I write a lot of GameBoy stuff so recently I was trying to write a 4
colour quantizer to convert to the GameBoy's screen. I used
generate_optimized_palette with an array leaving 4 values and it left me
a protection fault. As soon as I changed the number of colours needed to
256 colours it worked. Would there be any reason it's doing this?
I could write a quick set of example code if necessary...
> > // Set active palete
> > set_pallete(MyPal);
>
> Not a bug, but there is no reason to use any palette stuff (or to
> bother with the previous palette generation) since your program
> is running in a truecolor mode.
But, select_palette() and unselect_palette() would work fine in this
case right if it was a 256 colour bitmap being loaded with
set_color_conversion (COLORCONV_NONE); ?
- Michael
- Raw text -