metaforce/Runtime/World/CGameLight.hpp

35 lines
927 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
#include <string_view>
#include "Runtime/GCNTypes.hpp"
#include "Runtime/World/CActor.hpp"
#include "Runtime/Graphics/CLight.hpp"
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-12-08 05:30:43 +00:00
class CGameLight : public CActor {
TUniqueId xe8_parentId;
CLight xec_light;
u32 x13c_lightId;
u32 x140_priority;
float x144_lifeTime;
std::optional<CStaticRes> m_debugRes;
std::unique_ptr<CModelData> m_debugModel;
2021-06-07 19:29:18 +00:00
public:
2021-05-26 14:00:57 +00:00
DEFINE_ENTITY
CGameLight(TUniqueId uid, TAreaId aid, bool active, std::string_view name, const zeus::CTransform& xf,
TUniqueId parentId, const CLight& light, u32 sourceId, u32 priority, float lifeTime);
void Accept(IVisitor& visitor) override;
void Think(float dt, CStateManager& mgr) override;
2018-12-08 05:30:43 +00:00
void SetLightPriorityAndId();
void SetLight(const CLight& light);
2018-12-08 05:30:43 +00:00
CLight GetLight() const;
TUniqueId GetParentId() const { return xe8_parentId; }
void DebugDraw();
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce