2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 20:31:21 +00:00
metaforce/Runtime/World/CScriptCameraBlurKeyframe.cpp
Lioncash 221cc5c6b8 RuntimeCommonB: Normalize cpp file includes
Like the prior changes normalizing the inclusions within headers, this
tackles the cpp files of the RuntimeCommonB target, making these source
files consistent with their headers.
2019-12-22 18:12:04 -05:00

38 lines
1.2 KiB
C++

#include "Runtime/World/CScriptCameraBlurKeyframe.hpp"
#include "Runtime/CStateManager.hpp"
#include "TCastTo.hpp" // Generated file, do not modify include path
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) {}
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;
}
}
void CScriptCameraBlurKeyframe::Accept(IVisitor& visitor) { visitor.Visit(this); }
} // namespace urde