home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / devices / gameport.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  1KB  |  56 lines

  1. #ifndef DEVICES_GAMEPORT_H
  2. #define DEVICES_GAMEPORT_H
  3. /*
  4. **    $VER: gameport.h 36.1 (5.11.90)
  5. **    Includes Release 40.15
  6. **
  7. **    GamePort device command definitions
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef    EXEC_TYPES_H
  14. #include    "exec/types.h"
  15. #endif
  16.  
  17. #ifndef    EXEC_IO_H
  18. #include    "exec/io.h"
  19. #endif
  20.  
  21. /******     GamePort commands ******/
  22. #define     GPD_READEVENT       (CMD_NONSTD+0)
  23. #define     GPD_ASKCTYPE       (CMD_NONSTD+1)
  24. #define     GPD_SETCTYPE       (CMD_NONSTD+2)
  25. #define     GPD_ASKTRIGGER       (CMD_NONSTD+3)
  26. #define     GPD_SETTRIGGER       (CMD_NONSTD+4)
  27.  
  28. /******     GamePort structures ******/
  29.  
  30. /* gpt_Keys */
  31. #define     GPTB_DOWNKEYS       0
  32. #define     GPTF_DOWNKEYS       (1<<0)
  33. #define     GPTB_UPKEYS       1
  34. #define     GPTF_UPKEYS       (1<<1)
  35.  
  36. struct GamePortTrigger {
  37.    UWORD gpt_Keys;       /* key transition triggers */
  38.    UWORD gpt_Timeout;       /* time trigger (vertical blank units) */
  39.    UWORD gpt_XDelta;       /* X distance trigger */
  40.    UWORD gpt_YDelta;       /* Y distance trigger */
  41. };
  42.  
  43. /****** Controller Types ******/
  44. #define     GPCT_ALLOCATED       -1     /* allocated by another user */
  45. #define     GPCT_NOCONTROLLER 0
  46.  
  47. #define     GPCT_MOUSE       1
  48. #define     GPCT_RELJOYSTICK  2
  49. #define     GPCT_ABSJOYSTICK  3
  50.  
  51.  
  52. /****** Errors ******/
  53. #define     GPDERR_SETCTYPE   1     /* this controller not valid at this time */
  54.  
  55. #endif    /* DEVICES_GAMEPORT_H */
  56.