diff options
Diffstat (limited to 'apps/plugins/xrick/control.h')
-rw-r--r-- | apps/plugins/xrick/control.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/apps/plugins/xrick/control.h b/apps/plugins/xrick/control.h new file mode 100644 index 0000000000..91d0a8a195 --- /dev/null +++ b/apps/plugins/xrick/control.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * xrick/control.h | ||
3 | * | ||
4 | * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). | ||
5 | * Copyright (C) 2008-2014 Pierluigi Vicinanza. | ||
6 | * All rights reserved. | ||
7 | * | ||
8 | * The use and distribution terms for this software are contained in the file | ||
9 | * named README, which can be found in the root of this distribution. By | ||
10 | * using this software in any fashion, you are agreeing to be bound by the | ||
11 | * terms of this license. | ||
12 | * | ||
13 | * You must not remove this notice, or any other, from this software. | ||
14 | */ | ||
15 | |||
16 | #ifndef _CONTROL_H | ||
17 | #define _CONTROL_H | ||
18 | |||
19 | #include "xrick/system/basic_types.h" | ||
20 | |||
21 | typedef enum | ||
22 | { | ||
23 | Control_UP = (1 << 0), | ||
24 | Control_DOWN = (1 << 1), | ||
25 | Control_LEFT = (1 << 2), | ||
26 | Control_RIGHT = (1 << 3), | ||
27 | Control_PAUSE = (1 << 4), | ||
28 | Control_END = (1 << 5), | ||
29 | Control_EXIT = (1 << 6), | ||
30 | Control_FIRE = (1 << 7) | ||
31 | } control_t; | ||
32 | |||
33 | extern unsigned control_status; | ||
34 | inline bool control_test(control_t c) { return control_status & c; } | ||
35 | inline void control_set(control_t c) { control_status |= c; } | ||
36 | inline void control_clear(control_t c) { control_status &= ~c; } | ||
37 | extern bool control_active; | ||
38 | |||
39 | #endif /* ndef _CONTROL_H */ | ||
40 | |||
41 | /* eof */ | ||