metaforce/Runtime/World/CScriptCameraBlurKeyframe.cpp

40 lines
1.2 KiB
C++
Raw Normal View History

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