foo
[deeprace] / src / input.c
1 #include <string.h>
2 #include "input.h"
3
4 static const struct input_map def_inpmap[MAX_INPUTS] = {
5         {INP_FWD, 'w', -1},
6         {INP_BACK, 's', -1},
7         {INP_LEFT, 'a', -1},
8         {INP_RIGHT, 'd', -1},
9         {INP_FIRE, ' ', 0},
10         {INP_LROLL, 'q', -1},
11         {INP_RROLL, 'e', -1}
12 };
13
14 struct input_map inpmap[MAX_INPUTS];
15
16 unsigned int inpstate;
17
18
19 void init_input(void)
20 {
21         memcpy(inpmap, def_inpmap, sizeof inpmap);
22         inpstate = 0;
23 }