home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / kconfig.h < prev    next >
Text File  |  1998-06-08  |  6KB  |  183 lines

  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-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/main/rcs/kconfig.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:29:38 $
  18.  * 
  19.  * Prototypes for reading controls
  20.  * 
  21.  * $Log: kconfig.h $
  22.  * Revision 2.0  1995/02/27  11:29:38  john
  23.  * New version 2.0, which has no anonymous unions, builds with
  24.  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  25.  * 
  26.  * Revision 1.23  1995/01/12  11:41:44  john
  27.  * Added external control reading.
  28.  * 
  29.  * Revision 1.22  1994/12/07  16:15:30  john
  30.  * Added command to check to see if a joystick axes has been used.
  31.  * 
  32.  * Revision 1.21  1994/11/29  03:46:29  john
  33.  * Added joystick sensitivity; Added sound channels to detail menu.  Removed -maxchannels
  34.  * command line arg.
  35.  * 
  36.  * Revision 1.20  1994/11/22  16:54:45  mike
  37.  * autorepeat on missiles.
  38.  * 
  39.  * Revision 1.19  1994/11/07  14:01:27  john
  40.  * Changed the gamma correction sequencing.
  41.  * 
  42.  * Revision 1.18  1994/11/01  16:40:02  john
  43.  * Added Gamma correction.
  44.  * 
  45.  * Revision 1.17  1994/10/25  23:09:24  john
  46.  * Made the automap key configurable.
  47.  * 
  48.  * Revision 1.16  1994/10/24  19:56:51  john
  49.  * Made the new user setup prompt for config options.
  50.  * 
  51.  * Revision 1.15  1994/10/24  17:44:18  john
  52.  * Added stereo channel reversing.
  53.  * 
  54.  * Revision 1.14  1994/10/22  13:19:33  john
  55.  * Took out toggle primary/secondary weapons.  Fixed black
  56.  * background for 'axes' and 'buttons' text.
  57.  * 
  58.  * Revision 1.13  1994/10/17  13:06:51  john
  59.  * Moved the descent.cfg info into the player config file.
  60.  * 
  61.  * Revision 1.12  1994/10/14  12:14:47  john
  62.  * Changed code so that by doing DEL+F12 saves the current kconfig
  63.  * values as default. Added support for drop_bomb key.  Took out
  64.  * unused slots for keyboard.  Made keyboard use control_type of 0
  65.  * save slots.
  66.  * 
  67.  * Revision 1.11  1994/10/13  19:21:33  john
  68.  * Added separate config saves for different devices.
  69.  * Made all the devices work together better, such as mice won't
  70.  * get read when you're playing with the joystick.
  71.  * 
  72.  * Revision 1.10  1994/10/13  15:18:41  john
  73.  * Started ripping out old afterburner, show message, show automap
  74.  * keys in the keyboard config stuff.
  75.  * 
  76.  * Revision 1.9  1994/10/13  11:35:27  john
  77.  * Made Thrustmaster FCS Hat work.  Put a background behind the
  78.  * keyboard configure.  Took out turn_sensitivity.  Changed sound/config
  79.  * menu to new menu. Made F6 be calibrate joystick.
  80.  * 
  81.  * Revision 1.8  1994/10/06  14:10:50  matt
  82.  * New function reset_cruise()
  83.  * 
  84.  * Revision 1.7  1994/10/03  14:58:25  john
  85.  * Added rear_view_down_state so that the rear view can
  86.  * work like the automap.
  87.  * 
  88.  * Revision 1.6  1994/09/30  12:37:25  john
  89.  * Added midi,digi volume to configuration.
  90.  * 
  91.  * Revision 1.5  1994/09/19  18:49:59  john
  92.  * Added switch to disable joystick.
  93.  * 
  94.  * Revision 1.4  1994/09/15  16:11:21  john
  95.  * Added support for VFX1 head tracking. Fixed bug with memory over-
  96.  * write when using stereo mode.
  97.  * 
  98.  * Revision 1.3  1994/09/12  11:47:38  john
  99.  * Made stupid cruise work better.  Make kconfig values get
  100.  * read/written to disk.
  101.  * 
  102.  * Revision 1.2  1994/09/10  15:46:55  john
  103.  * First version of new keyboard configuration.
  104.  * 
  105.  * Revision 1.1  1994/09/10  13:51:40  john
  106.  * Initial revision
  107.  * 
  108.  * 
  109.  */
  110.  
  111.  
  112.  
  113. #ifndef _KCONFIG_H
  114. #define _KCONFIG_H
  115.  
  116. typedef struct control_info {
  117.     fix    pitch_time;                        
  118.     fix    vertical_thrust_time;
  119.     fix    heading_time;
  120.     fix    sideways_thrust_time;
  121.     fix    bank_time;
  122.     fix    forward_thrust_time;
  123.     
  124.     ubyte    rear_view_down_count;    
  125.     ubyte    rear_view_down_state;    
  126.     
  127.     ubyte    fire_primary_down_count;
  128.     ubyte    fire_primary_state;
  129.     ubyte    fire_secondary_state;
  130.     ubyte    fire_secondary_down_count;
  131.     ubyte    fire_flare_down_count;
  132.  
  133.     ubyte    drop_bomb_down_count;    
  134.  
  135.     ubyte    automap_down_count;
  136.     ubyte    automap_state;
  137.         
  138. } control_info;
  139.  
  140. extern control_info Controls;
  141. extern void controls_read_all();
  142. extern void kconfig(int n, char * title );
  143.  
  144. extern ubyte Config_digi_volume;
  145. extern ubyte Config_midi_volume;
  146. extern ubyte Config_control_type;
  147. extern ubyte Config_channels_reversed;
  148. extern ubyte Config_joystick_sensitivity;
  149.  
  150. #define CONTROL_NONE 0
  151. #define CONTROL_JOYSTICK 1
  152. #define CONTROL_FLIGHTSTICK_PRO 2
  153. #define CONTROL_THRUSTMASTER_FCS 3
  154. #define CONTROL_GRAVIS_GAMEPAD 4
  155. #define CONTROL_MOUSE 5
  156. #define CONTROL_CYBERMAN 6
  157. #define CONTROL_MAX_TYPES 7
  158.  
  159. #define NUM_KEY_CONTROLS 46
  160. #define NUM_OTHER_CONTROLS 27
  161. #define MAX_CONTROLS 50
  162.  
  163. extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
  164. extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
  165.  
  166. extern char *control_text[CONTROL_MAX_TYPES];
  167.  
  168. extern void kc_set_controls();
  169.  
  170. // Tries to use vfx1 head tracking.
  171. void kconfig_sense_init();
  172.  
  173. //set the cruise speed to zero
  174. extern void reset_cruise(void);
  175.  
  176. extern int kconfig_is_axes_used(int axis);
  177.  
  178. extern void kconfig_init_external_controls(int intno, int address);
  179.  
  180.  
  181. #endif
  182. 
  183.