Re: [AD] demo of new joystick API

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


Grzegorz Adam Hankiewicz wrote:

On 2004-09-06, Peter Wang <tjaden@xxxxxxxxxx> wrote:
3. Button states were changed from bits (i.e. pressed or released)
into integer values.  This is to support analogue buttons.
Neither the Linux nor DirectX drivers support analogue buttons
yet, though.

If you are designing something like this into the future, you might
want to use floats in range -1 to 1 instead of integers, to avoid
any possible issue with "DirectX gives -127 to 128 and Linux gives
-512 to 512" or similar.

Linux gives -32767 to 32767, and DirectInput lets you choose the range of values :-P But yeah, I know what you mean.

- Function: void al_uninstall_joystick_driver(void)

remove seems shorter to type, and the so far naming trend.

I always thought "remove" was a dumb opposite of "install". Time to get rid of it.

4. As a simple optimisation, I'm thinking of adding a "timestamp"
or "watermark" field to the joystate structure.

What happened to "premature optimization is the root of all evil"?
Just forget that until the new version can be used in an actual game
and you can profile the time spent on copying/updating structures.

I will coerce my brother into using the new joystick API for Raid'em ;-)

Peter




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