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.
22 typedef struct _control_info {
24 fix vertical_thrust_time;
26 fix sideways_thrust_time;
28 fix forward_thrust_time;
30 ubyte rear_view_down_count;
31 ubyte rear_view_down_state;
33 ubyte fire_primary_down_count;
34 ubyte fire_primary_state;
35 ubyte fire_secondary_state;
36 ubyte fire_secondary_down_count;
37 ubyte fire_flare_down_count;
39 ubyte drop_bomb_down_count;
41 ubyte automap_down_count;
44 // vms_angvec heading;
45 // char oem_message[64];
47 ubyte afterburner_state;
48 ubyte cycle_primary_count;
49 ubyte cycle_secondary_count;
50 ubyte headlight_count;
53 typedef struct ext_control_info {
55 fix vertical_thrust_time;
57 fix sideways_thrust_time;
59 fix forward_thrust_time;
61 ubyte rear_view_down_count;
62 ubyte rear_view_down_state;
64 ubyte fire_primary_down_count;
65 ubyte fire_primary_state;
66 ubyte fire_secondary_state;
67 ubyte fire_secondary_down_count;
68 ubyte fire_flare_down_count;
70 ubyte drop_bomb_down_count;
72 ubyte automap_down_count;
75 // vms_angvec heading; // for version >=1.0
76 // char oem_message[64]; // for version >=1.0
78 // vms_vector ship_pos // for version >=2.0
79 // vms_matrix ship_orient // for version >=2.0
81 // ubyte cycle_primary_count // for version >=3.0
82 // ubyte cycle_secondary_count // for version >=3.0
83 // ubyte afterburner_state // for version >=3.0
84 // ubyte headlight_count // for version >=3.0
86 // everything below this line is for version >=4.0
88 // ubyte headlight_state
90 // int primary_weapon_flags
91 // int secondary_weapon_flags
92 // ubyte Primary_weapon_selected
93 // ubyte Secondary_weapon_selected
95 // vms_vector force_vector
96 // vms_matrix force_matrix
98 // int x_vibrate_info[2]
99 // int y_vibrate_info[2]
101 // int x_vibrate_clear
102 // int y_vibrate_clear
104 // ubyte game_status;
106 // ubyte keyboard[128]; // scan code array, not ascii
107 // ubyte current_guidebot_command;
109 // ubyte Reactor_blown
113 typedef struct advanced_ext_control_info {
115 fix vertical_thrust_time;
117 fix sideways_thrust_time;
119 fix forward_thrust_time;
121 ubyte rear_view_down_count;
122 ubyte rear_view_down_state;
124 ubyte fire_primary_down_count;
125 ubyte fire_primary_state;
126 ubyte fire_secondary_state;
127 ubyte fire_secondary_down_count;
128 ubyte fire_flare_down_count;
130 ubyte drop_bomb_down_count;
132 ubyte automap_down_count;
135 // everything below this line is for version >=1.0
138 char oem_message[64];
140 // everything below this line is for version >=2.0
143 vms_matrix ship_orient;
145 // everything below this line is for version >=3.0
147 ubyte cycle_primary_count;
148 ubyte cycle_secondary_count;
149 ubyte afterburner_state;
150 ubyte headlight_count;
152 // everything below this line is for version >=4.0
154 int primary_weapon_flags;
155 int secondary_weapon_flags;
156 ubyte current_primary_weapon;
157 ubyte current_secondary_weapon;
160 vms_vector force_vector;
161 vms_matrix force_matrix;
163 int x_vibrate_info[2];
164 int y_vibrate_info[2];
171 ubyte headlight_state;
172 ubyte current_guidebot_command;
174 ubyte keyboard[128]; // scan code array, not ascii
178 } advanced_ext_control_info;
180 extern ubyte ExtGameStatus;
181 extern control_info Controls;
182 extern void controls_read_all();
183 extern void kconfig(int n, char * title );
185 #define NUM_KEY_CONTROLS 57
186 #define NUM_OTHER_CONTROLS 31
187 #define MAX_CONTROLS 60 //there are actually 48, so this leaves room for more
189 extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
190 extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
192 extern char *control_text[CONTROL_MAX_TYPES];
194 extern void kc_set_controls();
196 // Tries to use vfx1 head tracking.
197 void kconfig_sense_init();
199 //set the cruise speed to zero
200 extern void reset_cruise(void);
202 extern int kconfig_is_axes_used(int axis);
204 extern void kconfig_init_external_controls(int intno, int address);