2016-02-21 06:34:42 +00:00
|
|
|
#ifndef CRUMBLEGENERATOR_HPP
|
|
|
|
#define CRUMBLEGENERATOR_HPP
|
|
|
|
|
|
|
|
#include "CRumbleVoice.hpp"
|
2017-02-18 02:19:50 +00:00
|
|
|
#include "CInputGenerator.hpp"
|
2017-01-13 00:16:26 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2016-02-21 06:34:42 +00:00
|
|
|
{
|
|
|
|
class CRumbleGenerator
|
|
|
|
{
|
2018-01-26 09:48:42 +00:00
|
|
|
CRumbleVoice x0_voices[4];
|
|
|
|
float xc0_periodTime[4];
|
|
|
|
float xd0_onTime[4];
|
|
|
|
EMotorState xe0_commandArray[4];
|
|
|
|
bool xf0_24_disabled : 1;
|
2016-02-21 06:34:42 +00:00
|
|
|
public:
|
|
|
|
CRumbleGenerator();
|
2018-01-26 09:48:42 +00:00
|
|
|
~CRumbleGenerator();
|
|
|
|
void Update(float dt);
|
2016-02-21 06:34:42 +00:00
|
|
|
void HardStopAll();
|
2018-01-26 09:48:42 +00:00
|
|
|
s16 Rumble(const SAdsrData& adsr, float, ERumblePriority prio, EIOPort port);
|
|
|
|
void Stop(s16 id, EIOPort port);
|
|
|
|
bool IsDisabled() const { return xf0_24_disabled; }
|
|
|
|
void SetDisabled(bool disabled) { xf0_24_disabled = disabled; }
|
2016-02-21 06:34:42 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CRUMBLEGENERATOR_HPP
|