Re: [AD] demo of new joystick API

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


Chris wrote:

Peter Wang wrote:

Like, instead of having one axis that goes from -1 to 1 (or -32768 to 32767), we make two buttons that both go from o to 1 (or 32767). One of the buttons would be "pressed" when the axis is negative, and the other when it's positive. They would not be able to be pressed at the same time (think of mapping a two-axis N64/Gamecube-type joystick into a four-button analog D-Pad).


I see. I personally think that's further up the food chain and Allegro shouldn't be responsible for doing that kind of mapping.

There's not going to be multiple keyboards, so it was always going to be just "kbd = al_install_keyboard();"


If there's only going to be one keyboard, why not have a global for it, then?


*Maybe*. If it's going to be used a lot, it should be short. Sticking to our namespace rules, the shortest reasonable global variable name would probably be 'al_kbd', which is not particularly short. Then people will probably end up defining their own globals anyway.

Depending on what the API looks like in the end, maybe the handle won't be needed at all, except when registering the keyboard with an event queue.

Though I don't know why there won't be multiple keyboards.. can't you have more than one with USB keyboards? It would be useful for multiplayer games on the same machine.


AFAIK multiple keyboards are not possible on a PC (due to the interrupts). Maybe something to investigate.

'get' is fine. I just wasn't sure about 'unget', although libc has been using it for years so we can probably consider it a word :-)


I would've thought get/release was fine, but if you think unget works better, I guess that's good.


Oh, right.

Peter




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