mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
New code style refactor
This commit is contained in:
@@ -2,38 +2,34 @@
|
||||
#include "TCastTo.hpp"
|
||||
#include "CStateManager.hpp"
|
||||
|
||||
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)
|
||||
{
|
||||
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::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr)
|
||||
{
|
||||
CEntity::AcceptScriptMsg(msg, objId, stateMgr);
|
||||
void CScriptCameraBlurKeyframe::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user