metaforce/Runtime/CStaticInterference.hpp

27 lines
562 B
C++
Raw Permalink Normal View History

2018-10-06 20:42:33 -07:00
#pragma once
2015-08-17 13:33:58 -07:00
2015-08-19 19:52:07 -07:00
#include <vector>
#include "Runtime/RetroTypes.hpp"
2015-08-19 19:52:07 -07:00
2021-04-10 01:42:06 -07:00
namespace metaforce {
2015-08-19 19:52:07 -07:00
class CStateManager;
2018-12-07 21:30:43 -08:00
struct CStaticInterferenceSource {
TUniqueId x0_id;
float x4_magnitude;
float x8_timeLeft;
2015-08-19 19:52:07 -07:00
};
2018-12-07 21:30:43 -08:00
class CStaticInterference {
std::vector<CStaticInterferenceSource> x0_sources;
2018-12-07 21:30:43 -08:00
2015-08-19 19:52:07 -07:00
public:
explicit CStaticInterference(size_t sourceCount);
2018-12-07 21:30:43 -08:00
void RemoveSource(TUniqueId id);
void Update(CStateManager&, float dt);
float GetTotalInterference() const;
void AddSource(TUniqueId id, float magnitude, float duration);
2015-08-17 13:33:58 -07:00
};
2021-04-10 01:42:06 -07:00
} // namespace metaforce