Re: [AD] Triggers under Linux

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


On 03/16/2015 05:35 AM, Trent Gamblin wrote:
I have an objection to float though. Currently all Allegro games do this:

if (state.button[x]) {
}

In my opinion doing that with a float is bad form. But if it breaks code
(I don't see how but if) we should keep it as an int and just use 0 or 1.

I'd rather keep it as is, and add a button_pressure field for the floating point variant and change the semantic of the button field to be 0 or non-zero with an unspecified non-zero point (but actually set to 32K just so we don't break existing code). It's essentially how the mouse events work now anyway.

-SL





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