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.

112 lines
3.0 KiB

  1. /****************************************************************************
  2. MODULE: FFD_SWFF.HPP
  3. Tab settings: 5 9
  4. Copyright 1995, 1996, 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. 21-Mar-99 waltw Removed unreferenced FFD_xxx functions,
  16. CreateEffectFromFile
  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 CreateEffectFromBuffer(
  54. IN PVOID pBuffer,
  55. IN DWORD dwFileSize,
  56. IN ULONG ulAction,
  57. IN OUT PDNHANDLE pDnloadID,
  58. IN DWORD dwFlags);
  59. HRESULT MMIOErrorToSFERRor(MMRESULT mmresult);
  60. HRESULT AngleToXY(
  61. IN LONG lDirectionAngle2D,
  62. IN LONG lForceValue,
  63. IN ULONG ulAxisMask,
  64. IN OUT PSHORT pX,
  65. IN OUT PSHORT pY);
  66. HRESULT WINAPI FFD_DownloadEffect(
  67. IN OUT PDNHANDLE pDnloadID,
  68. IN PEFFECT pEffect,
  69. IN PENVELOPE pEnvelope,
  70. IN PVOID pTypeParam,
  71. IN ULONG ulAction);
  72. HRESULT WINAPI FFD_DestroyEffect(
  73. IN DNHANDLE EffectID);
  74. HRESULT WINAPI FFD_VFXProcessEffect(
  75. IN ULONG ulButtonPlayMask,
  76. IN OUT PDNHANDLE pDnloadID,
  77. IN int nNumEffects,
  78. IN ULONG ulProcessMode,
  79. IN PDNHANDLE pPListArray);
  80. #ifdef _cplusplus
  81. }
  82. #endif
  83. #endif // of ifndef FFD_SWFF_SEEN