home · contact · privacy
79e5976e7b5010019df474c994ac4fa25dea2e91
[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
10
11 #include <stdint.h> /* for uint8_t */
12 struct World;
13
14
15
16 /* Control the player character, either via recorded "action" or pressed "key".
17  */
18 extern void record_control(int action, struct World * world);
19 extern uint8_t player_control(int key, struct World * world);
20
21
22
23 /* Call by "key" game / window management actions that don't influence the
24  * player character. If the "quit" action is called, return 1 (instead of
25  * exiting directly).
26  */
27 extern uint8_t meta_control(int key, struct World * world);
28
29
30
31 #endif