metaforce/Runtime/World/CScriptCameraBlurKeyframe.cpp

40 lines
1.2 KiB
C++
Raw Permalink Normal View History

#include "Runtime/World/CScriptCameraBlurKeyframe.hpp"
#include "Runtime/CStateManager.hpp"
#include "TCastTo.hpp" // Generated file, do not modify include path
2016-05-23 05:36:20 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2018-12-08 05:30:43 +00:00
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);
2018-12-08 05:30:43 +00:00
switch (msg) {
case EScriptObjectMessage::Increment:
if (GetActive()) {
2018-12-08 05:30:43 +00:00
stateMgr.GetCameraBlurPass(3).SetBlur(x34_type, x38_amount, x40_timeIn);
}
2018-12-08 05:30:43 +00:00
break;
case EScriptObjectMessage::Decrement:
if (GetActive()) {
2018-12-08 05:30:43 +00:00
stateMgr.GetCameraBlurPass(3).DisableBlur(x44_timeOut);
}
2018-12-08 05:30:43 +00:00
break;
default:
break;
}
}
2018-12-08 05:30:43 +00:00
void CScriptCameraBlurKeyframe::Accept(IVisitor& visitor) { visitor.Visit(this); }
2017-01-15 03:07:01 +00:00
2021-04-10 08:42:06 +00:00
} // namespace metaforce