2016-05-23 05:36:20 +00:00
|
|
|
#include "CScriptCameraBlurKeyframe.hpp"
|
2019-09-21 13:07:13 +00:00
|
|
|
#include "TCastTo.hpp" // Generated file, do not modify include path
|
2017-06-01 21:13:19 +00:00
|
|
|
#include "CStateManager.hpp"
|
2016-05-23 05:36:20 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
|
|
|
CScriptCameraBlurKeyframe::CScriptCameraBlurKeyframe(TUniqueId uid, std::string_view 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) {}
|
2017-01-15 03:07:01 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptCameraBlurKeyframe::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) {
|
|
|
|
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
2017-06-01 21:13:19 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
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-06-01 21:13:19 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
void CScriptCameraBlurKeyframe::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
2017-01-15 03:07:01 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|