Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
3.7 KiB

  1. /****************************************************************************
  2. MODULE: FFD_SWFF.HPP
  3. Tab settings: 5 9
  4. Copyright 1995, 1996, 1999, Microsoft Corporation, All Rights Reserved.
  5. PURPOSE: Header to define FFD (Swforce) Force Feedback Driver API
  6. FUNCTIONS:
  7. Author(s): Name:
  8. ---------- ----------------
  9. MEA Manolito E. Adan
  10. Revision History:
  11. -----------------
  12. Version Date Author Comments
  13. 1.0 22-Jan-96 MEA original
  14. 1.1 21-Mar-97 MEA from SWForce
  15. 12-Mar-99 waltw Removed dead code (mostly FFD_xxx functions)
  16. These functions no longer exported in .def
  17. ****************************************************************************/
  18. #ifndef FFD_SWFF_SEEN
  19. #define FFD_SWFF_SEEN
  20. #include "DX_Map.hpp"
  21. #include "hau_midi.hpp"
  22. #define TWOPI (3.14159265358979323846 * 2)
  23. #define PI (3.14159265358979323846)
  24. #define PI2 (1.57079632679489661923)
  25. #define PI4 (0.78539816339744830966)
  26. #define RADIAN (57.29577951)
  27. #define xDegrees2Radians(rAngle) ((rAngle) * PI / 180.0)
  28. #define xRadians2Degrees(rAngle) ((rAngle) * 180.0 / PI)
  29. //
  30. // --- Force File defines
  31. //
  32. #define FCC_FORCE_EFFECT_RIFF mmioFOURCC('F','O','R','C')
  33. #define FCC_INFO_LIST mmioFOURCC('I','N','F','O')
  34. #define FCC_INFO_NAME_CHUNK mmioFOURCC('I','N','A','M')
  35. #define FCC_INFO_COMMENT_CHUNK mmioFOURCC('I','C','M','T')
  36. #define FCC_INFO_SOFTWARE_CHUNK mmioFOURCC('I','S','F','T')
  37. #define FCC_INFO_COPYRIGHT_CHUNK mmioFOURCC('I','C','O','P')
  38. #define FCC_TARGET_DEVICE_CHUNK mmioFOURCC('t','r','g','t')
  39. #define FCC_TRACK_LIST mmioFOURCC('t','r','a','k')
  40. #define FCC_EFFECT_LIST mmioFOURCC('e','f','c','t')
  41. #define FCC_ID_CHUNK mmioFOURCC('i','d',' ',' ')
  42. #define FCC_DATA_CHUNK mmioFOURCC('d','a','t','a')
  43. #define FCC_IMPLICIT_CHUNK mmioFOURCC('i','m','p','l')
  44. #define FCC_SPLINE_CHUNK mmioFOURCC('s','p','l','n')
  45. #define MAX_UD_PARAM_FORCE_DATA_COUNT 1000
  46. #define MAX_PL_PARAM_NUM_EFFECTS 50
  47. //---------------------------------------------------------------------------
  48. // Function prototype declarations
  49. //---------------------------------------------------------------------------
  50. #ifdef _cplusplus
  51. extern "C" {
  52. #endif
  53. HRESULT CreateEffectFromFile(
  54. IN LPCTSTR pszFileName,
  55. IN ULONG ulAction,
  56. IN OUT PDNHANDLE pDnloadID,
  57. IN DWORD dwFlags);
  58. HRESULT CreateEffectFromBuffer(
  59. IN PVOID pBuffer,
  60. IN DWORD dwFileSize,
  61. IN ULONG ulAction,
  62. IN OUT PDNHANDLE pDnloadID,
  63. IN DWORD dwFlags);
  64. HRESULT MMIOErrorToSFERRor(MMRESULT mmresult);
  65. HRESULT AngleToXY(
  66. IN LONG lDirectionAngle2D,
  67. IN LONG lForceValue,
  68. IN ULONG ulAxisMask,
  69. IN OUT PSHORT pX,
  70. IN OUT PSHORT pY);
  71. HRESULT WINAPI FFD_GetDiagCounters(
  72. IN OUT PDIAG_COUNTER pDiagCounter);
  73. HRESULT WINAPI FFD_SetDeviceState(ULONG);
  74. HRESULT WINAPI FFD_PutRawForce(
  75. IN PFORCE pForce);
  76. HRESULT WINAPI FFD_DownloadEffect(
  77. IN OUT PDNHANDLE pDnloadID,
  78. IN PEFFECT pEffect,
  79. IN PENVELOPE pEnvelope,
  80. IN PVOID pTypeParam,
  81. IN ULONG ulAction);
  82. HRESULT WINAPI FFD_DestroyEffect(
  83. IN DNHANDLE EffectID);
  84. HRESULT WINAPI FFD_PlaybackEffect(
  85. IN DNHANDLE hEffectID,
  86. IN ULONG ulMode);
  87. HRESULT WINAPI FFD_ProcessEffect(
  88. IN ULONG ulButtonPlayMask,
  89. IN OUT PDNHANDLE pDnloadID,
  90. IN int nNumEffects,
  91. IN ULONG ulProcessMode,
  92. IN PDNHANDLE pPListArray);
  93. HRESULT WINAPI FFD_VFXProcessEffect(
  94. IN ULONG ulButtonPlayMask,
  95. IN OUT PDNHANDLE pDnloadID,
  96. IN int nNumEffects,
  97. IN ULONG ulProcessMode,
  98. IN PDNHANDLE pPListArray);
  99. HRESULT FFD_GetEffectForceValue(
  100. IN DNHANDLE DnloadID,
  101. IN ULONG ulAxisMask,
  102. IN ULONG ulIndex,
  103. IN OUT PLONG pForceValue);
  104. #ifdef _cplusplus
  105. }
  106. #endif
  107. #endif // of ifndef FFD_SWFF_SEEN