2016-04-24 04:03:30 +00:00
|
|
|
#include "CCinematicCamera.hpp"
|
2017-08-29 13:17:52 +00:00
|
|
|
#include "CStateManager.hpp"
|
|
|
|
#include "Camera/CCameraManager.hpp"
|
2017-01-15 03:07:01 +00:00
|
|
|
#include "TCastTo.hpp"
|
2016-04-24 04:03:30 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
CCinematicCamera::CCinematicCamera(TUniqueId uid, const std::string& name, const CEntityInfo& info,
|
2017-08-29 13:17:52 +00:00
|
|
|
const zeus::CTransform& xf, bool active, float shotDuration, float fovy, float znear,
|
|
|
|
float zfar, float aspect, u32 w1)
|
|
|
|
: CGameCamera(uid, active, name, info, xf, fovy, znear, zfar, aspect, kInvalidUniqueId, w1 & 0x20, 0), x21c_w1(w1)
|
2016-04-24 04:03:30 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-01-15 03:07:01 +00:00
|
|
|
void CCinematicCamera::Accept(IVisitor& visitor)
|
|
|
|
{
|
|
|
|
visitor.Visit(this);
|
|
|
|
}
|
|
|
|
|
2016-12-29 21:38:59 +00:00
|
|
|
void CCinematicCamera::ProcessInput(const CFinalInput&, CStateManager& mgr) {}
|
2016-08-15 01:19:04 +00:00
|
|
|
|
2016-12-29 21:38:59 +00:00
|
|
|
void CCinematicCamera::Reset(const zeus::CTransform&, CStateManager& mgr) {}
|
2017-02-18 02:19:50 +00:00
|
|
|
|
|
|
|
void CCinematicCamera::WasDeactivated(CStateManager& mgr)
|
|
|
|
{
|
2017-08-29 13:17:52 +00:00
|
|
|
mgr.GetCameraManager()->RemoveCinemaCamera(GetUniqueId(), mgr);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CCinematicCamera::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr)
|
|
|
|
{
|
|
|
|
CGameCamera::AcceptScriptMsg(msg, uid, mgr);
|
|
|
|
if (msg == EScriptObjectMessage::Activate)
|
|
|
|
{
|
|
|
|
CalculateWaypoints(mgr);
|
|
|
|
if (x21c_w1 & 1)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (msg == EScriptObjectMessage::Deactivate)
|
|
|
|
{
|
|
|
|
WasDeactivated(mgr);
|
|
|
|
}
|
|
|
|
else if (msg == EScriptObjectMessage::InitializedInArea)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2017-02-18 02:19:50 +00:00
|
|
|
|
2017-08-29 13:17:52 +00:00
|
|
|
void CCinematicCamera::CalculateWaypoints(CStateManager& mgr)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void CCinematicCamera::SendArrivedMsg(TUniqueId reciever, CStateManager& mgr)
|
|
|
|
{
|
|
|
|
mgr.SendScriptMsgAlways(reciever, GetUniqueId(), EScriptObjectMessage::Arrived);
|
2017-02-18 02:19:50 +00:00
|
|
|
}
|
2016-04-24 04:03:30 +00:00
|
|
|
}
|