Re: [AD] bmp_write15(), _[get|put]pixel15()

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


> What's the rationale of having bmp_write15(), _putpixel15(),
> _getpixel15()? AFAGCS (As Far As Grep Can See), they are identical to
> the 16 bit versions on all platforms.

IMHO it's cleaner to consistently use distinct names for the 15-bit and
16-bit versions of drawing routines, because they can be quite different (in
particular, the 5.5.5 format is easier to manipulate than the 5.6.5 format,
see for example the color conversion routines).

> If it's just for completeness and/or to allow possible future platforms do
> define them differently, then I think we could avoid some code duplication
> in e.g. the rotation scanline drawers by merging 15 and 16 bit versions.
> We could let each platform define a macro PIXEL_15_EQUALS_16 or
> something similar, and check it so that it still works in possible future
> ports. OK?

That sounds sensible to me, as long as the interface is not modified.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



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