]> icculus.org git repositories - btb/d2x.git/blob - main/kconfig.h
remove rcs tags
[btb/d2x.git] / main / kconfig.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14 /*
15  *
16  * Prototypes for reading controls
17  *
18  */
19
20
21 #ifndef _KCONFIG_H
22 #define _KCONFIG_H
23
24 #include "config.h"
25 #include "gamestat.h"
26
27 typedef struct _control_info {
28         fix pitch_time;
29         fix vertical_thrust_time;
30         fix heading_time;
31         fix sideways_thrust_time;
32         fix bank_time;
33         fix forward_thrust_time;
34
35         ubyte rear_view_down_count;
36         ubyte rear_view_down_state;
37
38         ubyte fire_primary_down_count;
39         ubyte fire_primary_state;
40         ubyte fire_secondary_state;
41         ubyte fire_secondary_down_count;
42         ubyte fire_flare_down_count;
43
44         ubyte drop_bomb_down_count;
45
46         ubyte automap_down_count;
47         ubyte automap_state;
48
49         //vms_angvec heading;
50         //char oem_message[64];
51
52         ubyte afterburner_state;
53         ubyte cycle_primary_count;
54         ubyte cycle_secondary_count;
55         ubyte headlight_count;
56 } control_info;
57
58 typedef struct ext_control_info {
59         fix pitch_time;
60         fix vertical_thrust_time;
61         fix heading_time;
62         fix sideways_thrust_time;
63         fix bank_time;
64         fix forward_thrust_time;
65
66         ubyte rear_view_down_count;
67         ubyte rear_view_down_state;
68
69         ubyte fire_primary_down_count;
70         ubyte fire_primary_state;
71         ubyte fire_secondary_state;
72         ubyte fire_secondary_down_count;
73         ubyte fire_flare_down_count;
74
75         ubyte drop_bomb_down_count;
76
77         ubyte automap_down_count;
78         ubyte automap_state;
79
80         //vms_angvec heading;               // for version >=1.0
81         //char oem_message[64];         // for version >=1.0
82
83         //vms_vector ship_pos           // for version >=2.0
84         //vms_matrix ship_orient        // for version >=2.0
85
86         //ubyte cycle_primary_count     // for version >=3.0
87         //ubyte cycle_secondary_count   // for version >=3.0
88         //ubyte afterburner_state       // for version >=3.0
89         //ubyte headlight_count         // for version >=3.0
90
91         // everything below this line is for version >=4.0
92
93         //ubyte headlight_state
94
95         //int primary_weapon_flags
96         //int secondary_weapon_flags
97         //ubyte Primary_weapon_selected
98         //ubyte Secondary_weapon_selected
99
100         //vms_vector force_vector
101         //vms_matrix force_matrix
102         //int joltinfo[3]
103         //int x_vibrate_info[2]
104         //int y_vibrate_info[2]
105
106         //int x_vibrate_clear
107         //int y_vibrate_clear
108
109         //ubyte game_status;
110
111         //ubyte keyboard[128];          // scan code array, not ascii
112         //ubyte current_guidebot_command;
113
114         //ubyte Reactor_blown
115
116 } ext_control_info;
117
118 typedef struct advanced_ext_control_info {
119         fix pitch_time;
120         fix vertical_thrust_time;
121         fix heading_time;
122         fix sideways_thrust_time;
123         fix bank_time;
124         fix forward_thrust_time;
125
126         ubyte rear_view_down_count;
127         ubyte rear_view_down_state;
128
129         ubyte fire_primary_down_count;
130         ubyte fire_primary_state;
131         ubyte fire_secondary_state;
132         ubyte fire_secondary_down_count;
133         ubyte fire_flare_down_count;
134
135         ubyte drop_bomb_down_count;
136
137         ubyte automap_down_count;
138         ubyte automap_state;
139
140         // everything below this line is for version >=1.0
141
142         vms_angvec heading;
143         char oem_message[64];
144
145         // everything below this line is for version >=2.0
146
147         vms_vector ship_pos;
148         vms_matrix ship_orient;
149
150         // everything below this line is for version >=3.0
151
152         ubyte cycle_primary_count;
153         ubyte cycle_secondary_count;
154         ubyte afterburner_state;
155         ubyte headlight_count;
156
157         // everything below this line is for version >=4.0
158
159         int primary_weapon_flags;
160         int secondary_weapon_flags;
161         ubyte current_primary_weapon;
162         ubyte current_secondary_weapon;
163
164         vms_vector force_vector;
165         vms_matrix force_matrix;
166         int joltinfo[3];
167         int x_vibrate_info[2];
168         int y_vibrate_info[2];
169
170         int x_vibrate_clear;
171         int y_vibrate_clear;
172
173         ubyte game_status;
174
175         ubyte headlight_state;
176         ubyte current_guidebot_command;
177
178         ubyte keyboard[128];    // scan code array, not ascii
179
180         ubyte Reactor_blown;
181
182 } advanced_ext_control_info;
183
184 extern ubyte ExtGameStatus;
185 extern control_info Controls;
186 extern void controls_read_all();
187 extern void controls_read_console();
188 extern void kconfig(int n, char *title);
189
190 // added on 2/4/99 by Victor Rachels to add new keys menu
191 #define NUM_D2X_CONTROLS    20
192 #define MAX_D2X_CONTROLS    40
193
194 extern ubyte kconfig_d2x_settings[MAX_D2X_CONTROLS];
195 extern ubyte default_kconfig_d2x_settings[MAX_D2X_CONTROLS];
196 // end this section addition - VR
197
198 #define NUM_KEY_CONTROLS    57
199 #define NUM_OTHER_CONTROLS  31
200 #define MAX_CONTROLS        60          // there are actually 48, so this leaves room for more
201
202 extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
203 extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
204
205 extern char *control_text[CONTROL_MAX_TYPES];
206
207 extern void kc_set_controls();
208
209 // Tries to use vfx1 head tracking.
210 void kconfig_sense_init();
211
212 //set the cruise speed to zero
213 extern void reset_cruise(void);
214
215 extern int kconfig_is_axes_used(int axis);
216
217 extern void kconfig_init_external_controls(int intno, int address);
218
219 // the following methods added by WraithX, 4/17/00
220 extern int isJoyRotationKey(int test_key);       //tells if "test_key" is setup for rotation on the joy
221 extern int isMouseRotationKey(int test_key);     //tells if "test_key" is setup for rotation on the mouse
222 extern int isKeyboardRotationKey(int test_key);  //tells if "test_key" is setup for rotation on the keyboard
223 // end addition - WraithX
224
225 #endif /* _KCONFIG_H */