home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff247.lzh / AnalogJoystick / AJoystick.h < prev    next >
C/C++ Source or Header  |  1989-09-15  |  2KB  |  60 lines

  1.  
  2.  
  3. /*********************************************************/
  4. /*                                                       */
  5. /* Copyright (c) 1989, David Kinzer, All Rights Reserved */
  6. /*                                                       */
  7. /* Permission hereby granted to redistribute this        */
  8. /* program in unmodified form in a not for profit manner.*/
  9. /*                                                       */
  10. /* Permission hereby granted to use this software freely */
  11. /* in programs, commercial or not.                       */
  12. /*                                                       */
  13. /*                                                       */
  14. /*********************************************************/
  15. /*                                                       */
  16. /* AJoystick.h                                           */
  17. /*                                                       */
  18. /* Include file for using Analog Joystick Routines       */
  19. /* AJOYUNITx is used for OpenAJoystick and ReadAJoystick */
  20. /* read calls                                            */
  21. /*                                                       */
  22. /*********************************************************/
  23.  
  24.  
  25. #define AJOYUNIT0   1L
  26. #define AJOYUNIT1   2L
  27.  
  28. /* UxBySINGLE is used for OpenAJoystick calls to specify */
  29. /*            single trigger on the button press         */
  30.  
  31. #define U0B1SINGLE  0x0100L
  32. #define U0B2SINGLE  0x0200L
  33. #define U0B3SINGLE  0x0400L
  34. #define U0B4SINGLE  0x0800L
  35. #define U1B1SINGLE  0x1000L
  36. #define U1B2SINGLE  0x2000L
  37. #define U1B3SINGLE  0x4000L
  38. #define U1B4SINGLE  0x8000L
  39.  
  40.  
  41. /* Data from ReadAJoystick is returned to an AJoyData   */
  42. /* structure                                            */
  43.  
  44. struct AJoyData {
  45.    unsigned short x;
  46.    unsigned short y;
  47.    unsigned char button1;
  48.    unsigned char button2;
  49.    unsigned char button3;
  50.    unsigned char button4;
  51. };
  52.  
  53. /* button data will be one of the following             */
  54.  
  55. #define BUTTONDOWN  -1
  56. #define BUTTONUP    0
  57.  
  58. /* End: AJoystick.h                                     */
  59.  
  60.