Re: [AD] compare ALLEGRO_COLOR with memcmp

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


On 2011-06-06, at 7:50 PM, Trent Gamblin wrote:
> For his own code, sure, if he's manipulating ALLEGRO_COLOR internals. But think of where memcmp is used in Allegro 5.
> al_convert_mask_to_alpha. You pass an al_map_rgba(r,g,b,a) to it, if you're calculating numbers from internals and passing
> it to that function than you already know that's it's not going to work due to the nature of floating point numbers... All I'm saying
> is al_convert_mask_to_alpha(bitmap, al_map_rgb(r, g, b)) will always work with memcmp (possibly won't if you're messing
> with FPU settings, but you'd have to be doing that while doing al_convert_mask_to_alpha and that seems a little bit
> unlikely).
> 
> Trent

In short: Why should we cater to people who don't know how floats work in this particular instance?

Trent





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