mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-16 04:57:01 +00:00
Implement CParticleGenInfoGeneric
This commit is contained in:
@@ -253,6 +253,14 @@ void CActor::SetSfxPitchBend(s32 val)
|
||||
CSfxManager::PitchBend(*x8c_sfxHandle.get(), val);
|
||||
}
|
||||
|
||||
void CActor::SetRotation(const zeus::CQuaternion &q)
|
||||
{
|
||||
x34_transform = q.toTransform(x34_transform.origin);
|
||||
xe4_27_ = true;
|
||||
xe4_28_ = true;
|
||||
xe4_29_ = true;
|
||||
}
|
||||
|
||||
void CActor::SetTranslation(const zeus::CVector3f& tr)
|
||||
{
|
||||
x34_transform.origin = tr;
|
||||
|
||||
@@ -140,6 +140,7 @@ public:
|
||||
bool HasModelData() const;
|
||||
const CSfxHandle* GetSfxHandle() const;
|
||||
void SetSfxPitchBend(s32);
|
||||
void SetRotation(const zeus::CQuaternion& q);
|
||||
void SetTranslation(const zeus::CVector3f& tr);
|
||||
void SetAddedToken(u32 tok);
|
||||
float GetPitch() const;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "CGameLight.hpp"
|
||||
#include "CActorParameters.hpp"
|
||||
#include "World/CGameLight.hpp"
|
||||
#include "World/CActorParameters.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
#include "TCastTo.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -9,20 +10,25 @@ CGameLight::CGameLight(TUniqueId uid, TAreaId aid, bool active, const std::strin
|
||||
TUniqueId parentId, const CLight& light, u32 w1, u32 w2, float f1)
|
||||
: CActor(uid, active, name, CEntityInfo(aid, CEntity::NullConnectionList), xf,
|
||||
CModelData::CModelDataNull(), CMaterialList(), CActorParameters::None(), kInvalidUniqueId),
|
||||
xe8_parentId(parentId), xec_light(light), x13c_(w1), x140_(w2), x144_(f1)
|
||||
xe8_parentId(parentId), xec_light(light), x13c_(w1), x140_(w2), x144_lifeTime(f1)
|
||||
{
|
||||
xec_light.GetRadius();
|
||||
xec_light.GetIntensity();
|
||||
SetLightPriorityAndId();
|
||||
}
|
||||
|
||||
void CGameLight::Accept(IVisitor &visitor)
|
||||
{
|
||||
visitor.Visit(this);
|
||||
}
|
||||
|
||||
void CGameLight::Think(float dt, CStateManager& mgr)
|
||||
{
|
||||
if (x144_ <= 0.f)
|
||||
if (x144_lifeTime <= 0.f)
|
||||
return;
|
||||
x144_ -= dt;
|
||||
x144_lifeTime -= dt;
|
||||
|
||||
if (x144_ <= 0.f)
|
||||
if (x144_lifeTime <= 0.f)
|
||||
mgr.RemoveActor(GetUniqueId());
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ class CGameLight : public CActor
|
||||
CLight xec_light;
|
||||
u32 x13c_;
|
||||
u32 x140_;
|
||||
float x144_;
|
||||
float x144_lifeTime;
|
||||
|
||||
public:
|
||||
CGameLight(TUniqueId, TAreaId, bool, const std::string&, const zeus::CTransform&, TUniqueId, const CLight&, u32,
|
||||
u32, float);
|
||||
|
||||
void Accept(IVisitor &visitor);
|
||||
void Think(float, CStateManager&);
|
||||
void SetLightPriorityAndId();
|
||||
void SetLight(const CLight&);
|
||||
|
||||
@@ -23,7 +23,7 @@ CLight CWorldLight::GetAsCGraphicsLight() const
|
||||
zeus::CColor color(x4_color.x, x4_color.y, x4_color.z);
|
||||
float tmp = x28_q;
|
||||
if (epsilon < tmp)
|
||||
tmp = 0.0000011920929f;
|
||||
tmp = 0.000001f;
|
||||
/*
|
||||
if (x0_type == ELightType::Spot)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user