home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / diags / gport101.zip / GPORT.H < prev    next >
C/C++ Source or Header  |  1991-08-31  |  2KB  |  117 lines

  1. /*
  2. // GPORT.H
  3. //
  4. // Copyright (c) 1991 Bri Productions
  5. //
  6. */
  7.  
  8.  
  9.  
  10. /*
  11. //-------------------------------------
  12. //
  13. // GamOpen valid axis bits
  14. //
  15. //-------------------------------------
  16. */
  17.  
  18. #define  JAX_VAL  0x1
  19. #define  JAY_VAL  0x2
  20. #define  JBX_VAL  0x4
  21. #define  JBY_VAL  0x8
  22. #define  JA_VAL   (JAX_VAL) | (JAY_VAL)
  23. #define  JB_VAL   (JBX_VAL) | (JBY_VAL)
  24.  
  25.  
  26.  
  27. /*
  28. //-------------------------------------
  29. //
  30. // joysticks
  31. //
  32. //-------------------------------------
  33. */
  34.  
  35. #define  JA    0
  36. #define  JB    1
  37.  
  38.  
  39. /*
  40. //-------------------------------------
  41. //
  42. // joystick axes
  43. //
  44. //-------------------------------------
  45. */
  46.  
  47. #define  JAX    0
  48. #define  JAY    1
  49. #define  JBX    2
  50. #define  JBY    3
  51.  
  52.  
  53. /*
  54. //-------------------------------------
  55. //
  56. // joystick buttons
  57. //
  58. //-------------------------------------
  59. */
  60.  
  61. #define  BA1_CURR   0x01
  62. #define  BA2_CURR   0x02
  63. #define  BB1_CURR   0x04
  64. #define  BB2_CURR   0x08
  65. #define  BA1_PEND   0x10
  66. #define  BA2_PEND   0x20
  67. #define  BB1_PEND   0x40
  68. #define  BB2_PEND   0x80
  69.  
  70.  
  71.  
  72. /*
  73. //-------------------------------------
  74. //
  75. // centering modes
  76. //
  77. //-------------------------------------
  78. */
  79.  
  80. #define MEAN   1
  81. #define REAL   0
  82.  
  83.  
  84.  
  85. /*
  86. //-------------------------------------
  87. //
  88. // byte typedef
  89. //
  90. //-------------------------------------
  91. */
  92.  
  93. #ifndef BYTE
  94. #define BYTE
  95. typedef unsigned char byte;
  96. #endif
  97.  
  98.  
  99.  
  100.  
  101. /*
  102. //-------------------------------------
  103. //
  104. // function prototypes
  105. //
  106. //-------------------------------------
  107. */
  108.  
  109. int      GamOpen     (void);
  110. void     GamClose    (void);
  111. signed   GamAxis     (byte axis);
  112. void     GamAxes     (byte stick, signed *x, signed *y);
  113. unsigned GamRawAxis  (byte axis);
  114. void     GamCalAxis  (byte axis, unsigned raw_value);
  115. byte     GamButton   (void);
  116. void     GamCenter   (byte mode);
  117.