mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 01:07:43 +00:00
Implement rumble classes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define __URDE_CRUMBLEMANAGER_HPP__
|
||||
|
||||
#include "CRumbleGenerator.hpp"
|
||||
#include "zeus/CVector3f.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -9,15 +10,18 @@ class CStateManager;
|
||||
class CRumbleManager
|
||||
{
|
||||
CRumbleGenerator x0_rumbleGenerator;
|
||||
bool xf0_24_disabled : 1;
|
||||
public:
|
||||
CRumbleManager() { xf0_24_disabled = false; }
|
||||
bool IsDisabled() const { return xf0_24_disabled; }
|
||||
void SetDisabled(bool disabled);
|
||||
void Update(float);
|
||||
void StopRumble(s16) {}
|
||||
void Rumble(CStateManager&, ERumbleFxId, ERumblePriority priority) {}
|
||||
s16 Rumble(CStateManager&, ERumbleFxId, float, ERumblePriority priority) {return 0;}
|
||||
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);
|
||||
}
|
||||
s16 Rumble(CStateManager& mgr, const zeus::CVector3f& pos, ERumbleFxId fx, float dist, ERumblePriority priority);
|
||||
s16 Rumble(CStateManager& mgr, ERumbleFxId fx, float gain, ERumblePriority priority);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user