blob: 58b69f4e9ff281c6ec61eeed48e78836064c3cc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#ifndef INPUT_H
#define INPUT_H
#include "types.h"
struct key {
i32 last;
i32 current;
};
struct input {
struct key escape;
struct key right;
struct key left;
struct key up;
struct key down;
struct key space;
struct key start;
};
struct input init_input(void);
void update_input(struct input *input);
i32 key_first_press(struct key key);
i32 key_is_pressed(struct key key);
i32 key_was_pressed(struct key key);
#endif
|