Re: [AD] minor issues

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


Elias Pschernig wrote:
Probably best to provide an is_linear_bmp.. wait -
that function already exists. I wonder if it could just be used (and its
meaning extended to mean: linear bitmaps can have no line gaps).

Well, the docs say this:
"Historically there were only linear and planar bitmaps for Allegro, so is_linear_bitmap() is actually an alias for !is_planar_bitmap()."

What about making is_contiguous_bitmap for if the bitmap data is contiguous in memory?

Oh, and do you think something similiar can be done for clear_to_color?

Maybe, but remember: memset only works properly on 8-bit bitmaps (and 24/32 if setting a shade of gray, and 16 if setting white or black only). If you try to pass a 16/24/32 bit value, it'll chop all but the LSB and copy that to every byte. AFAIK, there are asm instructions to copy 16 and 32-bit values en mass, but we'd have to supply functions for them.




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