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 {
|
|
|
|
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
|