2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CSTATICINTERFERENCE
|
|
|
|
#define _CSTATICINTERFERENCE
|
2022-10-01 14:08:15 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "MetroidPrime/TGameTypes.hpp"
|
2022-10-09 05:13:17 +00:00
|
|
|
|
2022-10-01 14:08:15 +00:00
|
|
|
#include "rstl/vector.hpp"
|
|
|
|
|
|
|
|
struct CStaticInterferenceSource {
|
2022-11-10 10:55:04 +00:00
|
|
|
CStaticInterferenceSource(TUniqueId id, float magnitude, float timeLeft)
|
|
|
|
: x0_id(id), x4_magnitude(magnitude), x8_timeLeft(timeLeft) {}
|
|
|
|
|
|
|
|
TUniqueId GetId() const { return x0_id; }
|
|
|
|
float GetMagnitude() const { return x4_magnitude; }
|
|
|
|
|
2022-10-01 14:08:15 +00:00
|
|
|
TUniqueId x0_id;
|
|
|
|
float x4_magnitude;
|
|
|
|
float x8_timeLeft;
|
|
|
|
};
|
|
|
|
|
2022-10-04 13:29:05 +00:00
|
|
|
class CStateManager;
|
|
|
|
|
2022-10-01 14:08:15 +00:00
|
|
|
class CStaticInterference {
|
|
|
|
public:
|
2022-10-04 00:00:46 +00:00
|
|
|
CStaticInterference(int sourceCount);
|
|
|
|
|
|
|
|
void AddSource(TUniqueId id, float magnitude, float duration);
|
|
|
|
void RemoveSource(TUniqueId id);
|
|
|
|
void Update(CStateManager&, float dt);
|
|
|
|
float GetTotalInterference() const;
|
2022-10-01 14:08:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
rstl::vector< CStaticInterferenceSource > sources;
|
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CSTATICINTERFERENCE
|