75 void Start(
const float *pTickDuration,
int nTicksPerBar);
197 return mBeatCmd.Get();
213 const float *mTickDuration;
214 std::vector<std::unique_ptr<Controller>> mControllers;
Command that runs the beat pulse once a period.
Definition forcefeedbackmgrbeatcmd.h:14
One player's controller, with its beat pulse and its effects.
Definition forcefeedbackmgrcontroller.h:14
One vibration pattern of a controller, which runs both motors for a duration.
Definition forcefeedbackmgrmotoreffect.h:14
Driver of the controllers' vibration motors during a song.
Definition forcefeedbackmgr.h:18
void SetBeatEnabled(int nPad, bool bEnabled)
Set whether the beat pulse drives one controller.
void Pause()
Stop the motors of both ports while the game is paused.
void Resume()
Read each controller's vibration option again and restore the motors Pause() stopped.
void PlayCrippleEffect(int nController)
Play the crippler effect on a controller while vibration is enabled.
const std::vector< std::unique_ptr< Controller > > & GetControllers() const
Definition forcefeedbackmgr.h:201
void StopMetronome()
Withdraw the beat pulse from the song scheduler.
static ForceFeedbackMgr * shared()
Report the single instance, constructing it on first use.
void PlayBumpEffect(int nController)
Play the bumper effect on a controller while vibration is enabled.
Effect
The effects of a controller, indices into Controller::mEffects.
Definition forcefeedbackmgr.h:25
@ kEffectAutocatch
Definition forcefeedbackmgr.h:28
@ kEffectCripple
Definition forcefeedbackmgr.h:26
@ kEffectCount
Definition forcefeedbackmgr.h:29
@ kEffectBump
Definition forcefeedbackmgr.h:27
void Start(const float *pTickDuration, int nTicksPerBar)
Prepare one controller for each player and enable vibration.
ForceFeedbackMgr()
Construct the manager with no controller and the beat pulse's command.
~ForceFeedbackMgr()
Delete every controller.
BeatCmd * GetBeatCmd()
Definition forcefeedbackmgr.h:196
static constexpr int kMaxPlayers
The most players Start() prepares controllers for.
Definition forcefeedbackmgr.h:33
void PlayAutocatchEffect(int nController)
Play the autocatcher effect on a controller while vibration is enabled.
void SetVibration(int nController, int nSmallMotor, int nBigMotor)
Record a controller's motor levels and pass them to its port.
void PlayEffect(int nController, int nEffect)
Cancel every effect of a controller and start one.
void StopAll()
Withdraw the beat pulse, cancel every effect, and disable vibration.
void StartMetronome(int nPeriod, int nTick)
Schedule the beat pulse at the first multiple of a period from a tick that still lies ahead.
static constexpr int kPadCount
The number of controller ports.
Definition forcefeedbackmgr.h:36
int GetEnabled() const
Definition forcefeedbackmgr.h:206
Owner of one reference to an Attachment.
Definition ptr.h:16
ForceFeedbackMgr * TheForceFeedbackMgr
The vibration manager, ForceFeedbackMgr::shared() as the unit's static initialiser stored it.