author | terom |
Sat, 06 Dec 2008 21:35:36 +0000 | |
changeset 230 | 78cf0cd69af4 |
parent 229 | 355e46effa41 |
child 233 | ff4ecea83cf5 |
permissions | -rw-r--r-- |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
1 |
#ifndef INPUT_HH |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
2 |
#define INPUT_HH |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
3 |
|
221 | 4 |
#include <stdint.h> |
230 | 5 |
#include <ClanLib/Display/input_device.h> |
221 | 6 |
#include <ClanLib/Display/keys.h> |
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
7 |
|
221 | 8 |
// const uint16_t INPUT_INTERVAL_MS = 20; |
9 |
||
10 |
enum _PlayerInput { |
|
11 |
INPUT_AIM_UP = 0x0001, |
|
12 |
INPUT_AIM_DOWN = 0x0002, |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
13 |
|
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
14 |
INPUT_MOVE_LEFT = 0x0004, |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
15 |
INPUT_MOVE_RIGHT = 0x0008, |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
16 |
|
221 | 17 |
INPUT_JUMP = 0x0010, |
18 |
INPUT_DIG = 0x0020, |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
19 |
INPUT_SHOOT = 0x0040, |
212 | 20 |
INPUT_CHANGE = 0x0080, |
229 | 21 |
INPUT_ROPE = 0x0100, |
230 | 22 |
INPUT_UNROPE = 0x0200, |
23 |
INPUT_ROPE_UP = 0x0400, |
|
24 |
INPUT_ROPE_DOWN = 0x0800, |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
25 |
}; |
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
26 |
|
221 | 27 |
typedef uint16_t PlayerInput; |
28 |
||
29 |
struct InputKeymapEntry { |
|
230 | 30 |
int keycode1, keycode2; |
221 | 31 |
enum _PlayerInput input; |
32 |
}; |
|
33 |
||
34 |
/* |
|
35 |
* Get the global input keymap |
|
36 |
*/ |
|
37 |
InputKeymapEntry* getGlobalInputKeymap (void); |
|
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
38 |
|
230 | 39 |
/* |
40 |
* Handle keycodes |
|
41 |
*/ |
|
42 |
PlayerInput handleInputDevice (CL_InputDevice &keyboard); |
|
43 |
||
185
25becd2cb026
that's not a prototype anymore... at least it shouldn't be
terom
parents:
diff
changeset
|
44 |
#endif |