2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-02-21 06:34:42 +00:00
|
|
|
|
2020-03-18 03:23:13 +00:00
|
|
|
#include <array>
|
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
#include "Runtime/Input/CInputGenerator.hpp"
|
|
|
|
#include "Runtime/Input/CRumbleVoice.hpp"
|
2017-01-13 00:16:26 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2018-12-08 05:30:43 +00:00
|
|
|
class CRumbleGenerator {
|
2020-03-18 03:23:13 +00:00
|
|
|
std::array<CRumbleVoice, 4> x0_voices;
|
|
|
|
std::array<float, 4> xc0_periodTime;
|
|
|
|
std::array<float, 4> xd0_onTime;
|
|
|
|
std::array<EMotorState, 4> xe0_commandArray;
|
2020-04-20 04:57:50 +00:00
|
|
|
bool xf0_24_disabled : 1 = false;
|
2018-12-08 05:30:43 +00:00
|
|
|
|
2016-02-21 06:34:42 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CRumbleGenerator();
|
|
|
|
~CRumbleGenerator();
|
|
|
|
void Update(float dt);
|
|
|
|
void HardStopAll();
|
|
|
|
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
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|