metaforce/Runtime/Input/CRumbleManager.hpp

25 lines
793 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-02-21 06:34:42 +00:00
#include "CRumbleGenerator.hpp"
2018-01-26 09:48:42 +00:00
#include "zeus/CVector3f.hpp"
2016-02-21 06:34:42 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
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
};
2018-12-08 05:30:43 +00:00
} // namespace urde