1 /*
2 
3 Copyright (C) 2015-2018 Night Dive Studios, LLC.
4 
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 #define MAX_MOVE_KEYBINDS  256
20 
21 #define CODE_Q         0x0C
22 #define CODE_W         0x0D
23 #define CODE_E         0x0E
24 #define CODE_A         0x00
25 #define CODE_S         0x01
26 #define CODE_D         0x02
27 #define CODE_Z         0x06
28 #define CODE_X         0x07
29 #define CODE_C         0x08
30 #define CODE_R         0x0F
31 #define CODE_V         0x09
32 #define CODE_ENTER     0x24
33 #define CODE_J         0x26
34 #define CODE_SPACE     0x31
35 #define CODE_UP        0x7E
36 #define CODE_LEFT      0x7B
37 #define CODE_RIGHT     0x7C
38 #define CODE_DOWN      0x7D
39 #define CODE_KP_ENTER  0x4C
40 #define CODE_KP_HOME   0x59
41 #define CODE_KP_UP     0x5B
42 #define CODE_KP_PGUP   0x5C
43 #define CODE_KP_LEFT   0x56
44 #define CODE_KP_5      0x57
45 #define CODE_KP_RIGHT  0x58
46 #define CODE_KP_END    0x53
47 #define CODE_KP_DOWN   0x54
48 #define CODE_KP_PGDN   0x55
49 
50 typedef struct MOVE_KEYBIND_STRUCT {int code, move;} MOVE_KEYBIND;
51 
52 enum
53 {
54   M_RUNFORWARD,
55   M_FORWARD,
56   M_FASTTURNLEFT,
57   M_TURNLEFT,
58   M_FASTTURNRIGHT,
59   M_TURNRIGHT,
60   M_BACK,
61   M_SLIDELEFT,
62   M_SLIDERIGHT,
63   M_JUMP,
64   M_LEANUP,
65   M_LEANLEFT,
66   M_LEANRIGHT,
67   M_LOOKUP,
68   M_LOOKDOWN,
69   M_RUNLEFT,
70   M_RUNRIGHT,
71   M_THRUST, //cyber start
72   M_CLIMB,
73   M_BANKLEFT,
74   M_BANKRIGHT,
75   M_DIVE,
76   M_ROLLRIGHT,
77   M_ROLLLEFT,
78   M_CLIMBLEFT,
79   M_CLIMBRIGHT,
80   M_DIVERIGHT,
81   M_DIVELEFT,
82 
83   NUM_MOVES
84 };
85