metaforce/Runtime/World/CScriptCameraBlurKeyframe.cpp

40 lines
1.2 KiB
C++
Raw Normal View History

2016-05-23 05:36:20 +00:00
#include "CScriptCameraBlurKeyframe.hpp"
2017-01-15 03:07:01 +00:00
#include "TCastTo.hpp"
#include "CStateManager.hpp"
2016-05-23 05:36:20 +00:00
namespace urde
{
CScriptCameraBlurKeyframe::CScriptCameraBlurKeyframe(TUniqueId uid, const std::string& name,
const CEntityInfo& info, EBlurType type,
float amount, u32 unk, float timeIn,
float timeOut, bool active)
: CEntity(uid, info, active, name), x34_type(type), x38_amount(amount), x3c_(unk),
x40_timeIn(timeIn), x44_timeOut(timeOut)
2016-05-23 05:36:20 +00:00
{
}
2017-01-15 03:07:01 +00:00
void CScriptCameraBlurKeyframe::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr)
{
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
switch (msg)
{
case EScriptObjectMessage::Increment:
if (GetActive())
stateMgr.GetCameraBlurPass(3).SetBlur(x34_type, x38_amount, x40_timeIn);
break;
case EScriptObjectMessage::Decrement:
if (GetActive())
stateMgr.GetCameraBlurPass(3).DisableBlur(x44_timeOut);
break;
default: break;
}
}
2017-01-15 03:07:01 +00:00
void CScriptCameraBlurKeyframe::Accept(IVisitor& visitor)
{
visitor.Visit(this);
}
2016-05-23 05:36:20 +00:00
}