1 /* $Id: kconfig.h,v 1.5 2004-08-28 23:17:45 schaffner 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
28 typedef struct _control_info {
30 fix vertical_thrust_time;
32 fix sideways_thrust_time;
34 fix forward_thrust_time;
36 ubyte rear_view_down_count;
37 ubyte rear_view_down_state;
39 ubyte fire_primary_down_count;
40 ubyte fire_primary_state;
41 ubyte fire_secondary_state;
42 ubyte fire_secondary_down_count;
43 ubyte fire_flare_down_count;
45 ubyte drop_bomb_down_count;
47 ubyte automap_down_count;
51 //char oem_message[64];
53 ubyte afterburner_state;
54 ubyte cycle_primary_count;
55 ubyte cycle_secondary_count;
56 ubyte headlight_count;
59 typedef struct ext_control_info {
61 fix vertical_thrust_time;
63 fix sideways_thrust_time;
65 fix forward_thrust_time;
67 ubyte rear_view_down_count;
68 ubyte rear_view_down_state;
70 ubyte fire_primary_down_count;
71 ubyte fire_primary_state;
72 ubyte fire_secondary_state;
73 ubyte fire_secondary_down_count;
74 ubyte fire_flare_down_count;
76 ubyte drop_bomb_down_count;
78 ubyte automap_down_count;
81 //vms_angvec heading; // for version >=1.0
82 //char oem_message[64]; // for version >=1.0
84 //vms_vector ship_pos // for version >=2.0
85 //vms_matrix ship_orient // for version >=2.0
87 //ubyte cycle_primary_count // for version >=3.0
88 //ubyte cycle_secondary_count // for version >=3.0
89 //ubyte afterburner_state // for version >=3.0
90 //ubyte headlight_count // for version >=3.0
92 // everything below this line is for version >=4.0
94 //ubyte headlight_state
96 //int primary_weapon_flags
97 //int secondary_weapon_flags
98 //ubyte Primary_weapon_selected
99 //ubyte Secondary_weapon_selected
101 //vms_vector force_vector
102 //vms_matrix force_matrix
104 //int x_vibrate_info[2]
105 //int y_vibrate_info[2]
107 //int x_vibrate_clear
108 //int y_vibrate_clear
112 //ubyte keyboard[128]; // scan code array, not ascii
113 //ubyte current_guidebot_command;
115 //ubyte Reactor_blown
119 typedef struct advanced_ext_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 // everything below this line is for version >=1.0
144 char oem_message[64];
146 // everything below this line is for version >=2.0
149 vms_matrix ship_orient;
151 // everything below this line is for version >=3.0
153 ubyte cycle_primary_count;
154 ubyte cycle_secondary_count;
155 ubyte afterburner_state;
156 ubyte headlight_count;
158 // everything below this line is for version >=4.0
160 int primary_weapon_flags;
161 int secondary_weapon_flags;
162 ubyte current_primary_weapon;
163 ubyte current_secondary_weapon;
165 vms_vector force_vector;
166 vms_matrix force_matrix;
168 int x_vibrate_info[2];
169 int y_vibrate_info[2];
176 ubyte headlight_state;
177 ubyte current_guidebot_command;
179 ubyte keyboard[128]; // scan code array, not ascii
183 } advanced_ext_control_info;
185 extern ubyte ExtGameStatus;
186 extern control_info Controls;
187 extern void controls_read_all();
188 extern void kconfig(int n, char *title);
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
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
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
202 extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
203 extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
205 extern char *control_text[CONTROL_MAX_TYPES];
207 extern void kc_set_controls();
209 // Tries to use vfx1 head tracking.
210 void kconfig_sense_init();
212 //set the cruise speed to zero
213 extern void reset_cruise(void);
215 extern int kconfig_is_axes_used(int axis);
217 extern void kconfig_init_external_controls(int intno, int address);
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
225 #endif /* _KCONFIG_H */