metaforce/Runtime/Input/CRumbleManager.hpp

27 lines
853 B
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2016-02-20 22:34:42 -08:00
#include "Runtime/GCNTypes.hpp"
#include "Runtime/Input/CRumbleGenerator.hpp"
#include <zeus/CVector3f.hpp>
2016-02-20 22:34:42 -08:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2016-02-20 22:34:42 -08:00
class CStateManager;
2018-12-07 21:30:43 -08:00
class CRumbleManager {
CRumbleGenerator x0_rumbleGenerator;
2016-02-20 22:34:42 -08:00
public:
2018-12-07 21:30:43 -08: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;
2022-03-19 21:19:43 -07:00
x0_rumbleGenerator.Stop(id, EIOPort::Player1);
2018-12-07 21:30:43 -08:00
}
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-20 22:34:42 -08:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce