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.

65 lines
2.0 KiB

  1. //================ Copyright (c) Valve Corporation. All Rights Reserved. ===========================
  2. //
  3. //
  4. //
  5. //==================================================================================================
  6. #ifndef INCLUDED_MOVECONTROLLER_PS3_H
  7. #define INCLUDED_MOVECONTROLLER_PS3_H
  8. #include <vjobs_interface.h>
  9. #include <cell/gem.h> // PS3 move controller lib
  10. #include <mathlib/vector.h>
  11. // Max number of supported move controllers
  12. // Increasing this value increases the memory required by the GEM lib
  13. #define MAX_PS3_MOVE_CONTROLLERS 1
  14. class QAngle;
  15. struct MoveControllerState
  16. {
  17. CellGemInfo m_CellGemInfo;
  18. CellGemState m_aCellGemState[MAX_PS3_MOVE_CONTROLLERS];
  19. int32 m_aStatus[MAX_PS3_MOVE_CONTROLLERS];
  20. uint64 m_aStatusFlags[MAX_PS3_MOVE_CONTROLLERS];
  21. Vector m_pos[MAX_PS3_MOVE_CONTROLLERS];
  22. Quaternion m_quat[MAX_PS3_MOVE_CONTROLLERS];
  23. float m_posX[MAX_PS3_MOVE_CONTROLLERS];
  24. float m_posY[MAX_PS3_MOVE_CONTROLLERS];
  25. int32 m_camStatus;
  26. };
  27. //--------------------------------------------------------------------------------------------------
  28. // CMoveController
  29. // Manages PS3 Move Controller
  30. // Use of VJobInstance ensures init gets called after Vjobs SPURS init
  31. //--------------------------------------------------------------------------------------------------
  32. class CMoveController: public VJobInstance
  33. {
  34. public:
  35. void Init();
  36. void Shutdown();
  37. void ReadState(MoveControllerState* pState);
  38. void OnVjobsInit(); // gets called after m_pRoot was created and assigned
  39. void OnVjobsShutdown(); // gets called before m_pRoot is about to be destructed and NULL'ed
  40. // Disable/Enable for use debugging
  41. // Stops/starts update thread
  42. void Disable();
  43. void Enable();
  44. void InvalidateCalibration( void );
  45. void StepMotionControllerCalibration( void );
  46. void ResetMotionControllerScreenCalibration( void );
  47. void Rumble( unsigned char rumbleVal );
  48. bool m_bEnabled;
  49. // Memory required by GEM lib
  50. void* m_pGemMem;
  51. int32 m_iSizeGemMem;
  52. };
  53. extern CMoveController* g_pMoveController;
  54. #endif // INCLUDED_MOVECONTROLLER_PS3_H