RE: [AD] Another GFX_SAFE patch, now the demo (fwd)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Since this patch shows that it's not so easy to write games supporting
> every color depth, I think I'm going to write some functions which given a
> datafile convert all of it's BMP/RLE sprites to the actual color depth, so
> that you could do something like this in a program:
>
> 	set_gfx_mode(GFX_SAFE, 0, 0, 0, 0)
> 	data = load_datafile ("data.dat");
> 	convert_datafile_graphics (data, data[GAME_PAL].dat);

load_datafile will convert the bitmaps and rle sprites if you call
set_color_conversion(COLORCONV_TOTAL);
or something along those lines, before the call to load_datafile.
There might be a catch for 32 bit RGBA bitmaps, which should stay
the same regardless of the mode, or the alpha would be lost. Maybe
it already does this too, I don't know.

--
Lyrian



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/