gameport.pas 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {
  2. This file is part of the Free Pascal run time library.
  3. A file in Amiga system run time library.
  4. Copyright (c) 1998 by Nils Sjoholm
  5. member of the Amiga RTL development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit gameport;
  13. INTERFACE
  14. uses exec;
  15. const
  16. {***** GamePort commands *****}
  17. GPD_READEVENT = CMD_NONSTD + 0;
  18. GPD_ASKCTYPE = CMD_NONSTD + 1;
  19. GPD_SETCTYPE = CMD_NONSTD + 2;
  20. GPD_ASKTRIGGER = CMD_NONSTD + 3;
  21. GPD_SETTRIGGER = CMD_NONSTD + 4;
  22. {***** GamePort structures *****}
  23. { gpt_Keys }
  24. GPTB_DOWNKEYS = 0;
  25. GPTF_DOWNKEYS = 1;
  26. GPTB_UPKEYS = 1;
  27. GPTF_UPKEYS = 2;
  28. type
  29. pGamePortTrigger = ^tGamePortTrigger;
  30. tGamePortTrigger = record
  31. gpt_Keys : Word; { key transition triggers }
  32. gpt_Timeout : Word; { time trigger (vertical blank units) }
  33. gpt_XDelta : Word; { X distance trigger }
  34. gpt_YDelta : Word; { Y distance trigger }
  35. end;
  36. const
  37. {***** Controller Types *****}
  38. GPCT_ALLOCATED = -1; { allocated by another user }
  39. GPCT_NOCONTROLLER = 0;
  40. GPCT_MOUSE = 1;
  41. GPCT_RELJOYSTICK = 2;
  42. GPCT_ABSJOYSTICK = 3;
  43. {***** Errors *****}
  44. GPDERR_SETCTYPE = 1; { this controller not valid at this time }
  45. IMPLEMENTATION
  46. end.