1 #ifndef INPUT_H_INCLUDED
2 #define INPUT_H_INCLUDED
3 
4 /************************************************************************
5  * This file is part of Wizznic.                                        *
6  * Copyright 2009-2015 Jimmy Christensen <dusted@dusted.dk>             *
7  * Wizznic is free software: you can redistribute it and/or modify      *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or    *
10  * (at your option) any later version.                                  *
11  *                                                                      *
12  * Wizznic is distributed in the hope that it will be useful,           *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
15  * GNU General Public License for more details.                         *
16  *                                                                      *
17  * You should have received a copy of the GNU General Public License    *
18  * along with Wizznic.  If not, see <http://www.gnu.org/licenses/>.     *
19  ************************************************************************/
20 
21 #include <SDL/SDL.h>
22 #include "pointer.h"
23 #include "board.h"
24 
25 #define C_UP 0
26 #define C_DOWN 1
27 #define C_LEFT 2
28 #define C_RIGHT 3
29 #define C_BTNY 4
30 #define C_BTNX 5
31 #define C_BTNA 6
32 #define C_BTNB 7
33 #define C_SHOULDERA 8
34 #define C_SHOULDERB 9
35 #define C_BTNMENU 10
36 #define C_BTNSELECT 11
37 #define C_BTNVOLUP 12
38 #define C_BTNVOLDOWN 13
39 #define C_NUM 14
40 
41 #ifndef PLATFORM_JOY_DEADZONE
42 #define PLATFORM_JOY_DEADZONE 500
43 #endif
44 
45 SDLKey getChar();
46 void setButton(int btn); //Nasty
47 int getButton(int btn);
48 int getBtnTime(int btn);
49 void resetBtnTimer(int btn);
50 void resetBtn(int btn);
51 void resetMouseBtn();
52 void resetBtnAll();
53 int runControls();
54 void initControls();
55 
56 #endif // INPUT_H_INCLUDED
57