[AD] Input routines

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


void al_get_keyboard_state(ALLEGRO_KBDSTATE* ret_state)
bool al_key_down(const ALLEGRO_KBDSTATE* state, int keycode)
bool al_set_keyboard_leds( int leds ) //notice, no keyboard or
keyboard state supplied

I have a question. What is the purpose (for the end user) for getting
the keyboard state to check if a key is down?
Wouldn't it be more straight forward for a user to call 'bool
al_key_down(int keycode)'

The same goes for mouse routines
void al_get_mouse_state(ALLEGRO_MSESTATE* ret_state)
bool al_mouse_button_down(ALLEGRO_MSESTATE* state, int button)

With the joysticks you can fetch the state given a joystick.. so I do
see a point.
void al_get_joystick_state(ALLEGRO_JOYSTICK* joy, ALLEGRO_JOYSTATE* ret_state)
but with the joystick there is no button down function etc.

--ryan




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