b205292cdc510bcf0217bda2ee4e872fd386c67c
[crow/jumpnbump.git] / sdl / input.c
1 #include "globals.h"
2
3 int calib_joy(int type)
4 {
5         return 1;
6 }
7
8 void update_player_actions(void)
9 {
10         player[0].action_left   = key_pressed(KEY_PL1_LEFT) == 1;
11         player[0].action_right  = key_pressed(KEY_PL1_RIGHT) == 1;
12         player[0].action_up     = key_pressed(KEY_PL1_JUMP) == 1;
13         player[1].action_left   = key_pressed(KEY_PL2_LEFT) == 1;
14         player[1].action_right  = key_pressed(KEY_PL2_RIGHT) == 1;
15         player[1].action_up     = key_pressed(KEY_PL2_JUMP) == 1;
16         player[2].action_left   = key_pressed(KEY_PL3_LEFT) == 1;
17         player[2].action_right  = key_pressed(KEY_PL3_RIGHT) == 1;
18         player[2].action_up     = key_pressed(KEY_PL3_JUMP) == 1;
19         player[3].action_left   = key_pressed(KEY_PL4_LEFT) == 1;
20         player[3].action_right  = key_pressed(KEY_PL4_RIGHT) == 1;
21         player[3].action_up     = key_pressed(KEY_PL4_JUMP) == 1;
22 }
23
24 void init_inputs(void)
25 {
26         main_info.mouse_enabled = 0;
27         main_info.joy_enabled = 0;
28 }