KCONFIG.H 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. #ifndef _KCONFIG_H
  111. #define _KCONFIG_H
  112. typedef struct control_info {
  113. fix pitch_time;
  114. fix vertical_thrust_time;
  115. fix heading_time;
  116. fix sideways_thrust_time;
  117. fix bank_time;
  118. fix forward_thrust_time;
  119. ubyte rear_view_down_count;
  120. ubyte rear_view_down_state;
  121. ubyte fire_primary_down_count;
  122. ubyte fire_primary_state;
  123. ubyte fire_secondary_state;
  124. ubyte fire_secondary_down_count;
  125. ubyte fire_flare_down_count;
  126. ubyte drop_bomb_down_count;
  127. ubyte automap_down_count;
  128. ubyte automap_state;
  129. } control_info;
  130. extern control_info Controls;
  131. extern void controls_read_all();
  132. extern void kconfig(int n, char * title );
  133. extern ubyte Config_digi_volume;
  134. extern ubyte Config_midi_volume;
  135. extern ubyte Config_control_type;
  136. extern ubyte Config_channels_reversed;
  137. extern ubyte Config_joystick_sensitivity;
  138. #define CONTROL_NONE 0
  139. #define CONTROL_JOYSTICK 1
  140. #define CONTROL_FLIGHTSTICK_PRO 2
  141. #define CONTROL_THRUSTMASTER_FCS 3
  142. #define CONTROL_GRAVIS_GAMEPAD 4
  143. #define CONTROL_MOUSE 5
  144. #define CONTROL_CYBERMAN 6
  145. #define CONTROL_MAX_TYPES 7
  146. #define NUM_KEY_CONTROLS 46
  147. #define NUM_OTHER_CONTROLS 27
  148. #define MAX_CONTROLS 50
  149. extern ubyte kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
  150. extern ubyte default_kconfig_settings[CONTROL_MAX_TYPES][MAX_CONTROLS];
  151. extern char *control_text[CONTROL_MAX_TYPES];
  152. extern void kc_set_controls();
  153. // Tries to use vfx1 head tracking.
  154. void kconfig_sense_init();
  155. //set the cruise speed to zero
  156. extern void reset_cruise(void);
  157. extern int kconfig_is_axes_used(int axis);
  158. extern void kconfig_init_external_controls(int intno, int address);
  159. #endif
  160.