home · contact · privacy
Removed redundancy between record_control() and player_control() by re-writing their...
[plomrogue] / src / control.h
1 /* control.h
2  *
3  * Routines for handling control input from keyboard or record file.
4  */
5
6 #ifndef CONTROL_H
7 #define CONTROL_H
8
9 #include <stdint.h> /* for uint8_t */
10
11
12
13 /* Return keycode to action of "name" if available in current window config. */
14 extern uint16_t get_available_keycode_to_action(char * name);
15
16
17
18 /* Control the player character, either via action id "action" or pressed "key".
19  * Return 1 on success, 0 if no appropriate action to trigger was found.
20  */
21 extern uint8_t player_control_by_id(int action);
22 extern uint8_t player_control_by_key(int key);
23
24
25
26 /* Control via "key" active window's geometry / keybindings in respective config
27  * view.
28  */
29 extern uint8_t wingeom_control(int key);
30 extern uint8_t winkeyb_control(int key);
31
32
33
34 /* Call by "key" further game / window management actions that don't influence
35  * the player character. If the "quit" action is called, return 1 (instead of
36  * exiting directly).
37  */
38 extern uint8_t meta_control(int key);
39
40
41
42 #endif