2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-02-13 05:49:59 +00:00
|
|
|
|
|
|
|
#include <list>
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/Graphics/CLight.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
|
|
|
#include <zeus/CColor.hpp>
|
|
|
|
#include <zeus/CTransform.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-02-13 05:49:59 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2017-09-10 09:04:51 +00:00
|
|
|
class CWarp;
|
2018-05-14 21:44:09 +00:00
|
|
|
class CActorLights;
|
2017-09-10 09:04:51 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
struct CParticle {
|
|
|
|
int x0_endFrame = 0;
|
|
|
|
zeus::CVector3f x4_pos;
|
|
|
|
zeus::CVector3f x10_prevPos;
|
|
|
|
zeus::CVector3f x1c_vel;
|
|
|
|
int x28_startFrame = 0;
|
|
|
|
float x2c_lineLengthOrSize = 0.f;
|
|
|
|
float x30_lineWidthOrRota = 0.f;
|
2020-09-24 06:42:15 +00:00
|
|
|
zeus::CColor x34_color = {1.f, 0.f, 1.f, 1.f};
|
2017-09-10 09:04:51 +00:00
|
|
|
};
|
2016-02-13 05:49:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CParticleGen {
|
2017-09-10 09:04:51 +00:00
|
|
|
protected:
|
2018-12-08 05:30:43 +00:00
|
|
|
std::list<CWarp*> x4_modifierList;
|
|
|
|
|
2016-02-13 05:49:59 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual ~CParticleGen() = default;
|
2016-02-13 05:49:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual bool Update(double) = 0;
|
2022-03-20 20:24:02 +00:00
|
|
|
virtual void Render() = 0;
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual void SetOrientation(const zeus::CTransform&) = 0;
|
|
|
|
virtual void SetTranslation(const zeus::CVector3f&) = 0;
|
|
|
|
virtual void SetGlobalOrientation(const zeus::CTransform&) = 0;
|
|
|
|
virtual void SetGlobalTranslation(const zeus::CVector3f&) = 0;
|
|
|
|
virtual void SetGlobalScale(const zeus::CVector3f&) = 0;
|
|
|
|
virtual void SetLocalScale(const zeus::CVector3f&) = 0;
|
|
|
|
virtual void SetParticleEmission(bool) = 0;
|
|
|
|
virtual void SetModulationColor(const zeus::CColor&) = 0;
|
|
|
|
virtual void SetGeneratorRate(float rate) {}
|
|
|
|
virtual const zeus::CTransform& GetOrientation() const = 0;
|
|
|
|
virtual const zeus::CVector3f& GetTranslation() const = 0;
|
|
|
|
virtual const zeus::CTransform& GetGlobalOrientation() const = 0;
|
|
|
|
virtual const zeus::CVector3f& GetGlobalTranslation() const = 0;
|
|
|
|
virtual const zeus::CVector3f& GetGlobalScale() const = 0;
|
|
|
|
virtual const zeus::CColor& GetModulationColor() const = 0;
|
|
|
|
virtual float GetGeneratorRate() const { return 1.f; }
|
|
|
|
virtual bool IsSystemDeletable() const = 0;
|
2019-06-12 02:05:17 +00:00
|
|
|
virtual std::optional<zeus::CAABox> GetBounds() const = 0;
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual u32 GetParticleCount() const = 0;
|
|
|
|
virtual bool SystemHasLight() const = 0;
|
|
|
|
virtual CLight GetLight() const = 0;
|
|
|
|
virtual bool GetParticleEmission() const = 0;
|
|
|
|
virtual void DestroyParticles() = 0;
|
|
|
|
virtual void Reset() = 0;
|
|
|
|
virtual FourCC Get4CharId() const = 0;
|
2016-02-13 05:49:59 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual void AddModifier(CWarp* mod);
|
2016-02-13 05:49:59 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|