2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-11 07:10:28 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <string>
|
|
|
|
|
2022-02-19 13:04:45 +00:00
|
|
|
#include "Runtime/Streams/IOStreams.hpp"
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-04-11 07:10:28 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2016-04-11 07:10:28 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CParticleData {
|
2016-04-11 23:35:37 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
enum class EParentedMode { Initial, ContinuousEmitter, ContinuousSystem };
|
|
|
|
|
2016-04-11 23:35:37 +00:00
|
|
|
private:
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 x0_duration = 0;
|
|
|
|
SObjectTag x4_particle;
|
|
|
|
std::string xc_boneName = "root";
|
|
|
|
float x1c_scale = 1.f;
|
|
|
|
EParentedMode x20_parentMode = EParentedMode::Initial;
|
|
|
|
|
2016-04-11 07:10:28 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CParticleData() = default;
|
2020-09-16 08:33:36 +00:00
|
|
|
CParticleData(const SObjectTag& tag, std::string_view boneName, float scale, EParentedMode mode)
|
|
|
|
: x4_particle(tag), xc_boneName(boneName), x1c_scale(scale), x20_parentMode(mode) {}
|
2020-03-31 03:52:22 +00:00
|
|
|
explicit CParticleData(CInputStream& in);
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 GetDuration() const { return x0_duration; }
|
|
|
|
const SObjectTag& GetTag() const { return x4_particle; }
|
|
|
|
std::string_view GetSegmentName() const { return xc_boneName; }
|
|
|
|
float GetScale() const { return x1c_scale; }
|
|
|
|
EParentedMode GetParentedMode() const { return x20_parentMode; }
|
2017-06-03 06:03:07 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CAuxiliaryParticleData {
|
|
|
|
u32 x0_duration = 0;
|
|
|
|
SObjectTag x4_particle;
|
|
|
|
zeus::CVector3f xc_translation;
|
|
|
|
float x18_scale = 1.f;
|
|
|
|
|
2017-06-03 06:03:07 +00:00
|
|
|
public:
|
2020-01-06 04:24:54 +00:00
|
|
|
CAuxiliaryParticleData(u32 duration, const SObjectTag& particle, const zeus::CVector3f& translation, float scale)
|
|
|
|
: x0_duration(duration), x4_particle(particle), xc_translation(translation), x18_scale(scale) {}
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 GetDuration() const { return x0_duration; }
|
|
|
|
const SObjectTag& GetTag() const { return x4_particle; }
|
|
|
|
const zeus::CVector3f& GetTranslation() const { return xc_translation; }
|
|
|
|
float GetScale() const { return x18_scale; }
|
2016-04-11 07:10:28 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|