From 4bd49693aeb87b72f320e172b38a1831c9fe4de0 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 8 Oct 2023 19:47:10 -0400 Subject: [PATCH] f_op_actor OK --- configure.py | 2 +- include/JSystem/J3DGraphBase/J3DStruct.h | 8 +++++- include/f_op/f_op_actor.h | 2 ++ src/f_op/f_op_actor.cpp | 32 ++++++++++++++++++++++-- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/configure.py b/configure.py index 7ba94d1f3..54cf2f0c5 100644 --- a/configure.py +++ b/configure.py @@ -276,7 +276,7 @@ config.libs = [ Object(NonMatching, "f_ap/f_ap_game.cpp"), # f_op - Object(NonMatching, "f_op/f_op_actor.cpp"), + Object(Matching, "f_op/f_op_actor.cpp", extra_cflags=["-sym off"]), Object(Matching, "f_op/f_op_actor_iter.cpp"), Object(Matching, "f_op/f_op_actor_tag.cpp"), Object(NonMatching, "f_op/f_op_actor_mng.cpp"), diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/include/JSystem/J3DGraphBase/J3DStruct.h index 9232eccc2..285fa0687 100644 --- a/include/JSystem/J3DGraphBase/J3DStruct.h +++ b/include/JSystem/J3DGraphBase/J3DStruct.h @@ -8,7 +8,13 @@ class J3DLightInfo { public: - void operator=(J3DLightInfo const&); + void operator=(J3DLightInfo const& other) { + mLightPosition = other.mLightPosition; + mLightDirection = other.mLightDirection; + mColor = other.mColor; + mCosAtten = other.mCosAtten; + mDistAtten = other.mDistAtten; + } /* 0x00 */ Vec mLightPosition; /* 0x0C */ Vec mLightDirection; diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 452524e75..c5b5da6ff 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -170,6 +170,7 @@ public: #ifndef __INTELLISENSE__ fopAc_cullSizeSphere() {} fopAc_cullSizeSphere(cXyz, float); + ~fopAc_cullSizeSphere() {} #endif /* 0x0 */ Vec mCenter; @@ -182,6 +183,7 @@ public: fopAc_cullSizeBox() {} fopAc_cullSizeBox(const fopAc_cullSizeBox&); fopAc_cullSizeBox(cXyz, cXyz); + ~fopAc_cullSizeBox() {} #endif /* 0x0 */ Vec mMin; diff --git a/src/f_op/f_op_actor.cpp b/src/f_op/f_op_actor.cpp index 1b3f540f2..be93ce842 100644 --- a/src/f_op/f_op_actor.cpp +++ b/src/f_op/f_op_actor.cpp @@ -18,6 +18,9 @@ fopAc_ac_c::fopAc_ac_c() { } +fopAc_ac_c::~fopAc_ac_c() { +} + int g_fopAc_type; u32 fopAc_ac_c::stopStatus; @@ -34,7 +37,18 @@ s32 fopAc_Draw(void* pProc) { if (!dMenu_flag()) { s32 moveApproval = dComIfGp_event_moveApproval(actor); - if ((moveApproval == 2 || !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus)) && (!(fopAcM_checkStatus(actor, fopAcStts_CULL_e) && !fopAcM_cullingCheck(actor)) || !fopAcM_checkStatus(actor, fopAcStts_NODRAW_e))) { + if ( + ( + moveApproval == 2 + || ( + !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus) + && !( + fopAcM_checkStatus(actor, fopAcStts_CULL_e) + && fopAcM_cullingCheck(actor) + ) + ) + ) && !fopAcM_checkStatus(actor, fopAcStts_NODRAW_e) + ) { fopAcM_OffCondition(actor, fopAcCnd_NODRAW_e); ret = fpcLf_DrawMethod((leafdraw_method_class*)actor->mSubMtd, actor); } else { @@ -68,7 +82,21 @@ s32 fopAc_Execute(void* pProc) { s32 moveApproval = dComIfGp_event_moveApproval(actor); - if ((moveApproval == 2 || moveApproval != 0 || !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus)) && (!fopAcM_checkStatus(actor, fopAcStts_NOCULLEXEC_e) || !fopAcM_CheckCondition(actor, fopAcCnd_NODRAW_e))) { + if ( + ( + moveApproval == 2 + || ( + ( + moveApproval != 0 + && !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus) + ) + && ( + !fopAcM_checkStatus(actor, fopAcStts_NOCULLEXEC_e) + || !fopAcM_CheckCondition(actor, fopAcCnd_NODRAW_e) + ) + ) + ) + ) { fopAcM_OffCondition(actor, fopAcCnd_NOEXEC_e); actor->next = actor->current; ret = fpcMtd_Execute((process_method_class*)actor->mSubMtd, actor);