home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Zone / VRZONE.ISO / mac / PC / REND386 / JIREND / GDC.H < prev    next >
C/C++ Source or Header  |  1993-04-11  |  1KB  |  51 lines

  1. // gdc.h
  2. // Global 3D Controller Defines and Function Prototypes
  3. // Created by: Jerry Isdale, i.e. Isdale Engineering
  4.   
  5. #ifndef GLOBAL_DEVICES_CONTROLLER
  6. #define GLOBAL_DEVICES_CONTROLLER
  7.   
  8. // Modes
  9. #define GDC_MODE_POLLED 0x35
  10. #define GDC_MODE_BYTE3  0x3A
  11. #define GDC_MODE_BYTE1  0x3E
  12.   
  13. // Global 3D Controller linear codes
  14. #define GDC_MOVE_DN 0x20
  15. #define GDC_MOVE_UP 0x10
  16. #define GDC_MOVE_LF 0x08
  17. #define GDC_MOVE_RT 0x04
  18. #define GDC_MOVE_BK 0x02
  19. #define GDC_MOVE_FW 0x01
  20.   
  21. // Global 3D Controller rotation codes
  22. #define GDC_ROLL_CC 0x20
  23. #define GDC_ROLL_CW 0x10
  24. #define GDC_PITCH_D 0x08
  25. #define GDC_PITCH_U 0x04
  26. #define GDC_YAW_LEF 0x02
  27. #define GDC_YAW_RIT 0x01
  28.   
  29. #ifndef TRUE
  30. #define TRUE 1
  31. #define FALSE 0
  32. #endif
  33.   
  34. //--------------------------------------
  35. unsigned char gdc_init( int port );
  36. // set_mode works only on later devices
  37. unsigned char gdc_set_mode ( unsigned char mode );
  38. void gdc_read (unsigned *linear, unsigned *rotation, unsigned *button);
  39. void gdc_tactile ( unsigned char intensity, int length );
  40. void gdc_tactile_pulse ( unsigned char time );
  41. void gdc_remove(void);
  42.   
  43. // for REND386 Only
  44. void gdc_UpdatePos(void);
  45. //--------------------------------------
  46. extern int use_gdc; // global devices controller ball used in REND386
  47.              // set value to id of com port to be used
  48. //--------------------------------------
  49. #endif // GLOBAL_DEVICES_CONTROLLER
  50.   
  51.