Counter Strike : Global Offensive Source Code
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.

101 lines
2.4 KiB

  1. // *******************************************************************************
  2. // *
  3. // * Module Name:
  4. // * NPSClient.h
  5. // *
  6. // * Abstract:
  7. // * Header for NaturalPoint Simple Game Client API.
  8. // *
  9. // * Environment:
  10. // * Microsoft Windows -- User mode
  11. // *
  12. // *******************************************************************************
  13. #ifndef _NPSCLIENT_H_DEFINED_
  14. #define _NPSCLIENT_H_DEFINED_
  15. #pragma pack( push, npsclient_h ) // Save current pack value
  16. #pragma pack(1)
  17. #ifdef __cplusplus
  18. extern "C"{
  19. #endif
  20. //////////////////
  21. /// Typedefs /////////////////////////////////////////////////////////////////////
  22. /////////////////
  23. #ifndef _NPCLIENT_H_DEFINED_
  24. // NPESULT values are returned from the Game Client API functions.
  25. //
  26. typedef enum tagNPResult
  27. {
  28. NP_OK = 0,
  29. NP_ERR_DEVICE_NOT_PRESENT,
  30. NP_ERR_UNSUPPORTED_OS,
  31. NP_ERR_INVALID_ARG,
  32. NP_ERR_DLL_NOT_FOUND,
  33. NP_ERR_NO_DATA,
  34. NP_ERR_INTERNAL_DATA,
  35. NP_ERR_ALREADY_REGISTERED, // a window handle or game ID is already registered
  36. NP_ERR_UNKNOWN_ID, // unknown game ID registered
  37. NP_ERR_READ_ONLY, // parameter is read only
  38. } NPRESULT;
  39. typedef struct tagTrackIRData
  40. {
  41. unsigned short wNPStatus;
  42. unsigned short wPFrameSignature;
  43. unsigned long dwNPIOData;
  44. float fNPRoll;
  45. float fNPPitch;
  46. float fNPYaw;
  47. float fNPX;
  48. float fNPY;
  49. float fNPZ;
  50. float fNPRawX;
  51. float fNPRawY;
  52. float fNPRawZ;
  53. float fNPDeltaX;
  54. float fNPDeltaY;
  55. float fNPDeltaZ;
  56. float fNPSmoothX;
  57. float fNPSmoothY;
  58. float fNPSmoothZ;
  59. } TRACKIRDATA, *LPTRACKIRDATA;
  60. #endif
  61. typedef NPRESULT (__stdcall *PF_NPS_INIT)( HWND );
  62. typedef NPRESULT (__stdcall *PF_NPS_SHUTDOWN)( void );
  63. typedef NPRESULT (__stdcall *PF_NPS_GETDATA)( LPTRACKIRDATA );
  64. //// Function Prototypes ///////////////////////////////////////////////
  65. //
  66. // Functions exported from game client API DLL ( note __stdcall calling convention
  67. // is used for ease of interface to clients of differing implementations including
  68. // C, C++, Pascal (Delphi) and VB. )
  69. //
  70. NPRESULT __stdcall NPS_Init( HWND hWnd );
  71. NPRESULT __stdcall NPS_Shutdown( void );
  72. NPRESULT __stdcall NPS_GetData( LPTRACKIRDATA pTID );
  73. /////////////////////////////////////////////////////////////////////////
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #pragma pack( pop, npsclient_h ) // Ensure previous pack value is restored
  78. #endif // #ifdef NPCLIENT_H_DEFINED_
  79. //
  80. // *** End of file: NPSClient.h ***
  81. //