Debian Codegraph @

src/sdl_driver.h

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 // (c) 2007 Robert Schuster ([email protected])
2 //
3 // Licensed under the GNU GPL v2 or, at your option, any later version.
4
5 #ifndef SDL_DRIVER_H
6 #define SDL_DRIVER_H
7
8 #include <map>
9
10 #include <SDL/SDL.h>
11
12 #include "guichan/guichan.hpp"
13 #include "guichan/guichan/sdl.hpp"
14
15 #include "input.h"
16
17 class SDLDriver {
18
19 enum MouseState { INITIAL, MOVED, RESET_NEEDED };
20
21 public:
22 SDLDriver(InputHandler &);
23
24 ~SDLDriver();
25
26 void loop();
27
28 gcn::SDLInput *getSDLInput();
29
30 Input &getSensedInput();
31
32 void initActionMap();
33
34 void setSenseMode(bool);
35
36 private:
37 void input(InputType, int, int, int, int);
38
39 void toggleGrab();
40
41 std::pair< int, int> key(InputType, int, int, int);
42
43 InputHandler &inputHandler;
44
45 std::map< std::pair<int, int>, GameAction > actionMap;
46
47 SDL_Joystick **sticks;
48
49 gcn::SDLInput *sdlInput;
50
51 Input *sensedInput;
52 };
53
54 #endif