1 /* $Id: kconfig.h,v 1.4 2004-05-21 02:46:07 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Prototypes for reading controls
20 * Revision 1.1 1995/05/16 15:58:27 allender
23 * Revision 2.0 1995/02/27 11:29:38 john
24 * New version 2.0, which has no anonymous unions, builds with
25 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
27 * Revision 1.23 1995/01/12 11:41:44 john
28 * Added external control reading.
30 * Revision 1.22 1994/12/07 16:15:30 john
31 * Added command to check to see if a joystick axes has been used.
33 * Revision 1.21 1994/11/29 03:46:29 john
34 * Added joystick sensitivity; Added sound channels to detail menu. Removed -maxchannels
37 * Revision 1.20 1994/11/22 16:54:45 mike
38 * autorepeat on missiles.
40 * Revision 1.19 1994/11/07 14:01:27 john
41 * Changed the gamma correction sequencing.
43 * Revision 1.18 1994/11/01 16:40:02 john
44 * Added Gamma correction.
46 * Revision 1.17 1994/10/25 23:09:24 john
47 * Made the automap key configurable.
49 * Revision 1.16 1994/10/24 19:56:51 john
50 * Made the new user setup prompt for config options.
52 * Revision 1.15 1994/10/24 17:44:18 john
53 * Added stereo channel reversing.
55 * Revision 1.14 1994/10/22 13:19:33 john
56 * Took out toggle primary/secondary weapons. Fixed black
57 * background for 'axes' and 'buttons' text.
59 * Revision 1.13 1994/10/17 13:06:51 john
60 * Moved the descent.cfg info into the player config file.
62 * Revision 1.12 1994/10/14 12:14:47 john
63 * Changed code so that by doing DEL+F12 saves the current kconfig
64 * values as default. Added support for drop_bomb key. Took out
65 * unused slots for keyboard. Made keyboard use control_type of 0
68 * Revision 1.11 1994/10/13 19:21:33 john
69 * Added separate config saves for different devices.
70 * Made all the devices work together better, such as mice won't
71 * get read when you're playing with the joystick.
73 * Revision 1.10 1994/10/13 15:18:41 john
74 * Started ripping out old afterburner, show message, show automap
75 * keys in the keyboard config stuff.
77 * Revision 1.9 1994/10/13 11:35:27 john
78 * Made Thrustmaster FCS Hat work. Put a background behind the
79 * keyboard configure. Took out turn_sensitivity. Changed sound/config
80 * menu to new menu. Made F6 be calibrate joystick.
82 * Revision 1.8 1994/10/06 14:10:50 matt
83 * New function reset_cruise()
85 * Revision 1.7 1994/10/03 14:58:25 john
86 * Added rear_view_down_state so that the rear view can
87 * work like the automap.
89 * Revision 1.6 1994/09/30 12:37:25 john
90 * Added midi,digi volume to configuration.
92 * Revision 1.5 1994/09/19 18:49:59 john
93 * Added switch to disable joystick.
95 * Revision 1.4 1994/09/15 16:11:21 john
96 * Added support for VFX1 head tracking. Fixed bug with memory over-
97 * write when using stereo mode.
99 * Revision 1.3 1994/09/12 11:47:38 john
100 * Made stupid cruise work better. Make kconfig values get
101 * read/written to disk.
103 * Revision 1.2 1994/09/10 15:46:55 john
104 * First version of new keyboard configuration.
106 * Revision 1.1 1994/09/10 13:51:40 john
117 #include "gamestat.h"
119 typedef struct _control_info {
121 fix vertical_thrust_time;
123 fix sideways_thrust_time;
125 fix forward_thrust_time;
127 ubyte rear_view_down_count;
128 ubyte rear_view_down_state;
130 ubyte fire_primary_down_count;
131 ubyte fire_primary_state;
132 ubyte fire_secondary_state;
133 ubyte fire_secondary_down_count;
134 ubyte fire_flare_down_count;
136 ubyte drop_bomb_down_count;
138 ubyte automap_down_count;
141 //vms_angvec heading;
142 //char oem_message[64];
144 ubyte afterburner_state;
145 ubyte cycle_primary_count;
146 ubyte cycle_secondary_count;
147 ubyte headlight_count;
150 typedef struct ext_control_info {
152 fix vertical_thrust_time;
154 fix sideways_thrust_time;
156 fix forward_thrust_time;
158 ubyte rear_view_down_count;
159 ubyte rear_view_down_state;
161 ubyte fire_primary_down_count;
162 ubyte fire_primary_state;
163 ubyte fire_secondary_state;
164 ubyte fire_secondary_down_count;
165 ubyte fire_flare_down_count;
167 ubyte drop_bomb_down_count;
169 ubyte automap_down_count;
172 //vms_angvec heading; // for version >=1.0
173 //char oem_message[64]; // for version >=1.0
175 //vms_vector ship_pos // for version >=2.0
176 //vms_matrix ship_orient // for version >=2.0
178 //ubyte cycle_primary_count // for version >=3.0
179 //ubyte cycle_secondary_count // for version >=3.0
180 //ubyte afterburner_state // for version >=3.0
181 //ubyte headlight_count // for version >=3.0
183 // everything below this line is for version >=4.0
185 //ubyte headlight_state
187 //int primary_weapon_flags
188 //int secondary_weapon_flags
189 //ubyte Primary_weapon_selected
190 //ubyte Secondary_weapon_selected
192 //vms_vector force_vector
193 //vms_matrix force_matrix
195 //int x_vibrate_info[2]
196 //int y_vibrate_info[2]
198 //int x_vibrate_clear
199 //int y_vibrate_clear
203 //ubyte keyboard[128]; // scan code array, not ascii
204 //ubyte current_guidebot_command;
206 //ubyte Reactor_blown
210 typedef struct advanced_ext_control_info {
212 fix vertical_thrust_time;
214 fix sideways_thrust_time;
216 fix forward_thrust_time;
218 ubyte rear_view_down_count;
219 ubyte rear_view_down_state;
221 ubyte fire_primary_down_count;
222 ubyte fire_primary_state;
223 ubyte fire_secondary_state;
224 ubyte fire_secondary_down_count;
225 ubyte fire_flare_down_count;
227 ubyte drop_bomb_down_count;
229 ubyte automap_down_count;
232 // everything below this line is for version >=1.0
235 char oem_message[64];
237 // everything below this line is for version >=2.0
240 vms_matrix ship_orient;
242 // everything below this line is for version >=3.0
244 ubyte cycle_primary_count;
245 ubyte cycle_secondary_count;
246 ubyte afterburner_state;
247 ubyte headlight_count;
249 // everything below this line is for version >=4.0
251 int primary_weapon_flags;
252 int secondary_weapon_flags;
253 ubyte current_primary_weapon;
254 ubyte current_secondary_weapon;
256 vms_vector force_vector;
257 vms_matrix force_matrix;
259 int x_vibrate_info[2];
260 int y_vibrate_info[2];
267 ubyte headlight_state;
268 ubyte current_guidebot_command;
270 ubyte keyboard[128]; // scan code array, not ascii
274 } advanced_ext_control_info;
276 extern ubyte ExtGameStatus;
277 extern control_info Controls;
278 extern void controls_read_all();
279 extern void kconfig(int n, char *title);
281 // added on 2/4/99 by Victor Rachels to add new keys menu
282 #define NUM_D2X_CONTROLS 20
283 #define MAX_D2X_CONTROLS 40
285 extern ubyte kconfig_d2x_settings[MAX_D2X_CONTROLS];
286 extern ubyte default_kconfig_d2x_settings[MAX_D2X_CONTROLS];
287 // end this section addition - VR
289 #define NUM_KEY_CONTROLS 57
290 #define NUM_OTHER_CONTROLS 31
291 #define MAX_CONTROLS 60 // there are actually 48, so this leaves room for more
293 extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
294 extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
296 extern char *control_text[CONTROL_MAX_TYPES];
298 extern void kc_set_controls();
300 // Tries to use vfx1 head tracking.
301 void kconfig_sense_init();
303 //set the cruise speed to zero
304 extern void reset_cruise(void);
306 extern int kconfig_is_axes_used(int axis);
308 extern void kconfig_init_external_controls(int intno, int address);
310 // the following methods added by WraithX, 4/17/00
311 extern int isJoyRotationKey(int test_key); //tells if "test_key" is setup for rotation on the joy
312 extern int isMouseRotationKey(int test_key); //tells if "test_key" is setup for rotation on the mouse
313 extern int isKeyboardRotationKey(int test_key); //tells if "test_key" is setup for rotation on the keyboard
314 // end addition - WraithX
316 #endif /* _KCONFIG_H */