metaforce/Runtime/World/CRippleManager.hpp

30 lines
830 B
C++
Raw Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
#include <vector>
#include "Runtime/RetroTypes.hpp"
#include "Runtime/World/CRipple.hpp"
2021-04-10 01:42:06 -07:00
namespace metaforce {
2018-12-07 21:30:43 -08:00
class CRippleManager {
float x0_maxTimeFalloff = 0.f;
std::vector<CRipple> x4_ripples;
float x14_alpha;
public:
2018-12-07 21:30:43 -08:00
CRippleManager(int maxRipples, float alpha);
void Init(int maxRipples);
std::vector<CRipple>& GetRipples() { return x4_ripples; }
2018-12-07 21:30:43 -08:00
const std::vector<CRipple>& GetRipples() const { return x4_ripples; }
void Update(float dt);
float GetLastRippleDeltaTime(TUniqueId rippler) const;
void AddRipple(const CRipple& ripple);
void SetMaxTimeFalloff(float time) { x0_maxTimeFalloff = time; }
float GetMaxTimeFalloff() const { return x0_maxTimeFalloff; }
void SetAlpha(float a) { x14_alpha = a; }
float GetAlpha() const { return x14_alpha; }
};
2021-04-10 01:42:06 -07:00
}; // namespace metaforce