Renamed pack.c to jnbpack.c and unpack.c to jnbunpack.c.
[crow/jumpnbump.git] / sdl / input.c
1 /*
2  * input.c
3  * Copyright (C) 1998 Brainchild Design - http://brainchilddesign.com/
4  * 
5  * Copyright (C) 2001 Chuck Mason <cemason@users.sourceforge.net>
6  *
7  * Copyright (C) 2002 Florian Schulze <crow@icculus.org>
8  *
9  * Portions of this code are from the MPEG software simulation group
10  * idct implementation. This code will be replaced with a new
11  * implementation soon.
12  *
13  * This file is part of Jump'n'Bump.
14  *
15  * Jump'n'Bump is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 2 of the License, or
18  * (at your option) any later version.
19  *
20  * Jump'n'Bump is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28  */
29
30 #include "globals.h"
31
32 int calib_joy(int type)
33 {
34         return 1;
35 }
36
37 void update_player_actions(void)
38 {
39         player[0].action_left   = key_pressed(KEY_PL1_LEFT) == 1;
40         player[0].action_right  = key_pressed(KEY_PL1_RIGHT) == 1;
41         player[0].action_up     = key_pressed(KEY_PL1_JUMP) == 1;
42         player[1].action_left   = key_pressed(KEY_PL2_LEFT) == 1;
43         player[1].action_right  = key_pressed(KEY_PL2_RIGHT) == 1;
44         player[1].action_up     = key_pressed(KEY_PL2_JUMP) == 1;
45         player[2].action_left   = key_pressed(KEY_PL3_LEFT) == 1;
46         player[2].action_right  = key_pressed(KEY_PL3_RIGHT) == 1;
47         player[2].action_up     = key_pressed(KEY_PL3_JUMP) == 1;
48         player[3].action_left   = key_pressed(KEY_PL4_LEFT) == 1;
49         player[3].action_right  = key_pressed(KEY_PL4_RIGHT) == 1;
50         player[3].action_up     = key_pressed(KEY_PL4_JUMP) == 1;
51 }
52
53 void init_inputs(void)
54 {
55         main_info.mouse_enabled = 0;
56         main_info.joy_enabled = 0;
57 }