mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 18:24:55 +00:00
CParticleDatabase implementations
This commit is contained in:
@@ -105,12 +105,12 @@ void CGuiFrame::DisableLights() const
|
||||
|
||||
void CGuiFrame::RemoveLight(CGuiLight* light)
|
||||
{
|
||||
m_indexedLights[light->GetLoadedIdx()] = nullptr;
|
||||
m_indexedLights[light->GetLightId()] = nullptr;
|
||||
}
|
||||
|
||||
void CGuiFrame::AddLight(CGuiLight* light)
|
||||
{
|
||||
m_indexedLights[light->GetLoadedIdx()] = light;
|
||||
m_indexedLights[light->GetLightId()] = light;
|
||||
}
|
||||
|
||||
void CGuiFrame::RegisterLight(std::shared_ptr<CGuiLight>&& light)
|
||||
|
||||
@@ -14,7 +14,7 @@ CGuiLight::CGuiLight(const CGuiWidgetParms& parms, const CLight& light)
|
||||
xcc_angleC(light.x30_angleC),
|
||||
xd0_angleL(light.x34_angleL),
|
||||
xd4_angleQ(light.x38_angleQ),
|
||||
xd8_loadedIdx(light.x40_loadedIdx)
|
||||
xd8_lightId(light.x40_lightId)
|
||||
{}
|
||||
|
||||
CGuiLight::~CGuiLight()
|
||||
@@ -65,7 +65,7 @@ std::shared_ptr<CGuiWidget> CGuiLight::Create(CGuiFrame* frame, CInputStream& in
|
||||
float angC = in.readFloatBig();
|
||||
float angL = in.readFloatBig();
|
||||
float angQ = in.readFloatBig();
|
||||
u32 loadedIdx = in.readUint32Big();
|
||||
u32 lightId = in.readUint32Big();
|
||||
|
||||
std::shared_ptr<CGuiLight> ret = {};
|
||||
switch (tp)
|
||||
@@ -77,7 +77,7 @@ std::shared_ptr<CGuiWidget> CGuiLight::Create(CGuiFrame* frame, CInputStream& in
|
||||
parms.x10_color, cutoff);
|
||||
lt.SetAttenuation(distC, distL, distQ);
|
||||
lt.SetAngleAttenuation(angC, angL, angQ);
|
||||
lt.x40_loadedIdx = loadedIdx;
|
||||
lt.x40_lightId = lightId;
|
||||
ret = std::make_shared<CGuiLight>(parms, lt);
|
||||
break;
|
||||
}
|
||||
@@ -85,14 +85,14 @@ std::shared_ptr<CGuiWidget> CGuiLight::Create(CGuiFrame* frame, CInputStream& in
|
||||
{
|
||||
CLight lt = CLight::BuildPoint(zeus::CVector3f::skZero, parms.x10_color);
|
||||
lt.SetAttenuation(distC, distL, distQ);
|
||||
lt.x40_loadedIdx = loadedIdx;
|
||||
lt.x40_lightId = lightId;
|
||||
ret = std::make_shared<CGuiLight>(parms, lt);
|
||||
break;
|
||||
}
|
||||
case ELightType::Directional:
|
||||
{
|
||||
CLight lt = CLight::BuildDirectional(zeus::CVector3f::skZero, parms.x10_color);
|
||||
lt.x40_loadedIdx = loadedIdx;
|
||||
lt.x40_lightId = lightId;
|
||||
ret = std::make_shared<CGuiLight>(parms, lt);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class CGuiLight : public CGuiWidget
|
||||
float xcc_angleC;
|
||||
float xd0_angleL;
|
||||
float xd4_angleQ;
|
||||
u32 xd8_loadedIdx;
|
||||
u32 xd8_lightId;
|
||||
zeus::CColor xdc_ambColor = zeus::CColor::skBlack;
|
||||
public:
|
||||
~CGuiLight();
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
CLight BuildLight() const;
|
||||
void SetIsVisible(bool vis);
|
||||
u32 GetLoadedIdx() const {return xd8_loadedIdx;}
|
||||
u32 GetLightId() const {return xd8_lightId;}
|
||||
const zeus::CColor& GetAmbientLightColor() const {return xdc_ambColor;}
|
||||
void SetSpotCutoff(float v) {xbc_spotCutoff = v;}
|
||||
void SetDistC(float v) {xc0_distC = v;}
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
void SetAngleC(float v) {xcc_angleC = v;}
|
||||
void SetAngleL(float v) {xd0_angleL = v;}
|
||||
void SetAngleQ(float v) {xd4_angleQ = v;}
|
||||
void SetLoadedIdx(u32 idx) {xd8_loadedIdx = idx;}
|
||||
void SetLightId(u32 idx) {xd8_lightId = idx;}
|
||||
void SetAmbientLightColor(const zeus::CColor& color) {xdc_ambColor = color;}
|
||||
|
||||
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
|
||||
|
||||
Reference in New Issue
Block a user