JOYSTICK.H
上传用户:lllw2006
上传日期:2007-01-05
资源大小:39k
文件大小:1k
源码类别:

游戏

开发平台:

DOS

  1. /*
  2. ** Header file for joystick library.
  3. **
  4. ** This file is part of:
  5. **
  6. ** Joystick Library for Dos.
  7. ** Version: 1.1
  8. **
  9. ** Last modified: June 15th, 1997
  10. **
  11. ** (C) 1997 Simone Zanella Productions.
  12. **
  13. ** E-mail: szanella@dsi.unive.it
  14. **         zanella@prometeo.it
  15. **
  16. ** Web:    http://www.dsi.unive.it/~szanella/index.htm
  17. **         http://members.tripod.com/~szanella/index.htm
  18. **
  19. ** --------------------------------------------------------
  20. **
  21. ** This is freeware: use it as you like, but ALWAYS include
  22. ** the original author's name in the docs of your program.
  23. **
  24. ** --------------------------------------------------------
  25. */
  26. /* Bit maps for ReadJoystick */
  27. #define JOY_UP    0x01
  28. #define JOY_DN    0x02
  29. #define JOY_LT    0x04
  30. #define JOY_RT    0x08
  31. #define JOY_AF    0x10
  32. #define JOY_BF    0x20
  33. #define JOY_CF    0x40
  34. #define JOY_DF    0x80
  35. #define JOY_EF    0x100
  36. #define JOY_FF    0x200
  37. /* Flags for mode (function InstallJoystick) */
  38. #define JOY_2BUTTONS   0
  39. #define JOY_4BUTTONS   1
  40. #define JOY_6BUTTONS   2
  41. /* Maps for values returned by InstallJoystick, flags for skipjoy parameter */
  42. #define JOY_NONE       0
  43. #define JOY_FIRST      1
  44. #define JOY_SECOND     2
  45. #define JOY_BOTH       3
  46. /* Public functions to read joystick(s) */
  47. extern unsigned char InstallJoystick(const unsigned char mode, const unsigned char skipjoy, const char * calibfile);
  48. extern void ReadJoystick(unsigned int *first, unsigned int *second);