metaforce/Runtime/Input/CRumbleManager.hpp

27 lines
850 B
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-02-21 06:34:42 +00:00
#include "Runtime/GCNTypes.hpp"
#include "Runtime/Input/CRumbleGenerator.hpp"
#include <zeus/CVector3f.hpp>
2016-02-21 06:34:42 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2016-02-21 06:34:42 +00:00
class CStateManager;
2018-12-08 05:30:43 +00:00
class CRumbleManager {
CRumbleGenerator x0_rumbleGenerator;
2016-02-21 06:34:42 +00:00
public:
2018-12-08 05:30:43 +00:00
bool IsDisabled() const { return x0_rumbleGenerator.IsDisabled(); }
void SetDisabled(bool disabled) { x0_rumbleGenerator.SetDisabled(disabled); }
void Update(float dt) { x0_rumbleGenerator.Update(dt); }
void StopRumble(s16 id) {
if (id == -1)
return;
x0_rumbleGenerator.Stop(id, EIOPort::Zero);
}
void HardStopAll() { x0_rumbleGenerator.HardStopAll(); }
s16 Rumble(CStateManager& mgr, const zeus::CVector3f& pos, ERumbleFxId fx, float dist, ERumblePriority priority);
s16 Rumble(CStateManager& mgr, ERumbleFxId fx, float gain, ERumblePriority priority);
2016-02-21 06:34:42 +00:00
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce