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 #ifndef _KCONFIG_H 17 #define _KCONFIG_H 18 19 #include "config.h" 20 #include "gamestat.h" 21 22 typedef struct _control_info { 23 fix pitch_time; 24 fix vertical_thrust_time; 25 fix heading_time; 26 fix sideways_thrust_time; 27 fix bank_time; 28 fix forward_thrust_time; 29 30 ubyte rear_view_down_count; 31 ubyte rear_view_down_state; 32 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; 38 39 ubyte drop_bomb_down_count; 40 41 ubyte automap_down_count; 42 ubyte automap_state; 43 44 // vms_angvec heading; 45 // char oem_message[64]; 46 47 ubyte afterburner_state; 48 ubyte cycle_primary_count; 49 ubyte cycle_secondary_count; 50 ubyte headlight_count; 51 } control_info; 52 53 typedef struct ext_control_info { 54 fix pitch_time; 55 fix vertical_thrust_time; 56 fix heading_time; 57 fix sideways_thrust_time; 58 fix bank_time; 59 fix forward_thrust_time; 60 61 ubyte rear_view_down_count; 62 ubyte rear_view_down_state; 63 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; 69 70 ubyte drop_bomb_down_count; 71 72 ubyte automap_down_count; 73 ubyte automap_state; 74 75 // vms_angvec heading; // for version >=1.0 76 // char oem_message[64]; // for version >=1.0 77 78 // vms_vector ship_pos // for version >=2.0 79 // vms_matrix ship_orient // for version >=2.0 80 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 85 86 // everything below this line is for version >=4.0 87 88 // ubyte headlight_state 89 90 // int primary_weapon_flags 91 // int secondary_weapon_flags 92 // ubyte Primary_weapon_selected 93 // ubyte Secondary_weapon_selected 94 95 // vms_vector force_vector 96 // vms_matrix force_matrix 97 // int joltinfo[3] 98 // int x_vibrate_info[2] 99 // int y_vibrate_info[2] 100 101 // int x_vibrate_clear 102 // int y_vibrate_clear 103 104 // ubyte game_status; 105 106 // ubyte keyboard[128]; // scan code array, not ascii 107 // ubyte current_guidebot_command; 108 109 // ubyte Reactor_blown 110 111 } ext_control_info; 112 113 typedef struct advanced_ext_control_info { 114 fix pitch_time; 115 fix vertical_thrust_time; 116 fix heading_time; 117 fix sideways_thrust_time; 118 fix bank_time; 119 fix forward_thrust_time; 120 121 ubyte rear_view_down_count; 122 ubyte rear_view_down_state; 123 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; 129 130 ubyte drop_bomb_down_count; 131 132 ubyte automap_down_count; 133 ubyte automap_state; 134 135 // everything below this line is for version >=1.0 136 137 vms_angvec heading; 138 char oem_message[64]; 139 140 // everything below this line is for version >=2.0 141 142 vms_vector ship_pos; 143 vms_matrix ship_orient; 144 145 // everything below this line is for version >=3.0 146 147 ubyte cycle_primary_count; 148 ubyte cycle_secondary_count; 149 ubyte afterburner_state; 150 ubyte headlight_count; 151 152 // everything below this line is for version >=4.0 153 154 int primary_weapon_flags; 155 int secondary_weapon_flags; 156 ubyte current_primary_weapon; 157 ubyte current_secondary_weapon; 158 159 160 vms_vector force_vector; 161 vms_matrix force_matrix; 162 int joltinfo[3]; 163 int x_vibrate_info[2]; 164 int y_vibrate_info[2]; 165 166 int x_vibrate_clear; 167 int y_vibrate_clear; 168 169 ubyte game_status; 170 171 ubyte headlight_state; 172 ubyte current_guidebot_command; 173 174 ubyte keyboard[128]; // scan code array, not ascii 175 176 ubyte Reactor_blown; 177 178 } advanced_ext_control_info; 179 180 extern ubyte ExtGameStatus; 181 extern control_info Controls; 182 extern void controls_read_all(); 183 extern void kconfig(int n, char * title ); 184 185 //added on 2/4/99 by Victor Rachels to add new keys menu 186 #define NUM_D2X_CONTROLS 20 187 #define MAX_D2X_CONTROLS 40 188 189 extern ubyte kconfig_d2x_settings[MAX_D2X_CONTROLS]; 190 extern ubyte default_kconfig_d2x_settings[MAX_D2X_CONTROLS]; 191 //end this section addition - VR 192 193 #define NUM_KEY_CONTROLS 57 194 #define NUM_OTHER_CONTROLS 31 195 #define MAX_CONTROLS 60 //there are actually 48, so this leaves room for more 196 197 extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS]; 198 extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS]; 199 200 extern char *control_text[CONTROL_MAX_TYPES]; 201 202 extern void kc_set_controls(); 203 204 // Tries to use vfx1 head tracking. 205 void kconfig_sense_init(); 206 207 //set the cruise speed to zero 208 extern void reset_cruise(void); 209 210 extern int kconfig_is_axes_used(int axis); 211 212 extern void kconfig_init_external_controls(int intno, int address); 213 214 215 #endif 216