]> git.jsancho.org Git - lugaru.git/blob - Source/Input.h
e28b5870f8d8ff011fca31a98eaf6c6118b5aea6
[lugaru.git] / Source / Input.h
1 /*
2 Copyright (C) 2003, 2010 - Wolfire Games
3 Copyright (C) 2010 - Côme <MCMic> BERNIGAUD
4
5 This file is part of Lugaru.
6
7 Lugaru is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11
12 This program 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.
15
16 See the GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 */
22
23 #ifndef _Input_H_
24 #define _Input_H_
25
26 /**> HEADER FILES <**/
27 #include "SDL.h"
28 #include "Game.h"
29
30 /**> CONSTANT DECLARATIONS <**/
31 #define MOUSEBUTTON1 (SDL_NUM_SCANCODES + SDL_BUTTON_LEFT)
32 #define MOUSEBUTTON2 (SDL_NUM_SCANCODES + SDL_BUTTON_RIGHT)
33 #define MOUSEBUTTON3 (SDL_NUM_SCANCODES + SDL_BUTTON_MIDDLE)
34
35 /**> FUNCTION PROTOTYPES <**/
36 class Input
37 {
38 public:
39     static void Tick();
40     static bool isKeyDown(int k);
41     static bool isKeyPressed(int k);
42     static const char* keyToChar(unsigned short which);
43     static unsigned short CharToKey(const char* which);
44     static Boolean MouseClicked();
45 };
46
47 #endif