Re: [AD] COLORCONV_KEEP_TRANS in datafiles + cleanup

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


> I tried using dat2s/fixup_datafile instead of load_datafile in your test
> program, and the error really showed up.

Then we must fix it.

> The last 2 lines in the patch are related to this. Maybe I should try to
> come up with something which looks a bit nicer and uses
> bitmap_mask_color()?

Can't you use a single test on 'c' instead of three on the RGB components ?
A little comment would also be nice.

Moreover, if you removed the empty lines between the /* ... color */ and the
code, the patch would be even nicer :-)

> (The docs don't even mention that any flags have an effect on
> fixup_datafile, but ignoring it seems wrong..)

I agree.

> Besides this, I fixed the un-needed drawing_mode now, and the 2nd case
> level for 15bit.
>
> I also tested RLE_SPRITES, luckily control and databytes are never mixed
> there so no problems with any conversions. They work even when data-bytes
> get the same value as the EOL marker.
>
> So after this patch, it should be possible to load any bitmap data into
> any colordepth, and transparency would be preserved when the KEEP_TRANS
> flag is set.

That's fine. I'm willing to apply these modifications to both trunk and
branch, given that the docs have been lying in the 4.0.x releases. However,
we could also choose the other way round (fixing the docs on the branch) in
a more conservative spirit. Thoughts ?

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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