Re[2]: [AD] messy allegro 5.0 stuff |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
>>> al_get_input(AL_KEY_LEFT)
>>> al_get_input(AL_MOUSE_LEFT)
>>> al_get_input(AL_JOY_BUTTON_1)
Nice (simmilar to mine idea ;]) but doesn't allow to handle multiple
devices.
B> I don't know about this one. Input devices tend to be *very* different from
B> one another. So building a common do-everything API for input is probably a
B> bad idea. Making the API consistent is good, but making everything the same
B> isn't. Some devices are relative, some are absolute, some have digital
B> buttons, some have analogue buttons, some have multiple sticks, some have
B> roulettes, and the keyboard has 100+ keys. If someone invents a new device,
B> there's a good chance that Allegro won't be able to support it nicely with a
B> common API - Unless that API is flexible enough to accomodate just about
B> anything IMHO.
This kind of API IS flexible enough. Only thing you have to do is a
new driver for device whereas in old API you have to add some new
functions. Changes that have to made in programs are also bigger in
old API.
--
Best regards,
Grzegorz mailto:Grzegorz.Godlewski@xxxxxxxxxx