metaforce/Runtime/CStaticInterference.hpp

27 lines
552 B
C++
Raw Normal View History

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