From d89fe278880b86440e8225071e0a17b802bf1a97 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 25 Sep 2025 15:59:25 -0400 Subject: [PATCH] Use composition instead of inheritance for most f_op classes --- include/JSystem/JKernel/JKRThread.h | 2 +- include/d/actor/d_a_tsubo.h | 6 +++--- include/f_op/f_op_actor.h | 3 ++- include/f_op/f_op_actor_mng.h | 2 +- include/f_op/f_op_kankyo.h | 7 ++++--- include/f_op/f_op_msg.h | 4 ++-- include/f_op/f_op_overlap_mng.h | 4 ++-- include/f_op/f_op_overlap_req.h | 4 ++-- include/f_op/f_op_scene_tag.h | 3 ++- include/f_op/f_op_view.h | 5 +++-- include/f_pc/f_pc_manager.h | 2 +- src/d/actor/d_a_bb.cpp | 4 ++-- src/d/actor/d_a_bmdhand.cpp | 10 +++++----- src/d/actor/d_a_bwd.cpp | 2 +- src/d/actor/d_a_obj_ladder.cpp | 2 +- src/d/actor/d_a_obj_leaves.cpp | 2 +- src/d/actor/d_a_obj_movebox.cpp | 8 ++++---- src/d/actor/d_a_stone2.cpp | 2 +- src/d/actor/d_a_tsubo.cpp | 4 ++-- src/d/d_camera.cpp | 2 +- src/f_op/f_op_actor.cpp | 2 +- src/f_op/f_op_camera.cpp | 2 +- src/f_op/f_op_kankyo.cpp | 2 +- src/f_op/f_op_msg.cpp | 2 +- src/f_op/f_op_overlap_mng.cpp | 4 ++-- src/f_op/f_op_overlap_req.cpp | 12 ++++++------ 26 files changed, 53 insertions(+), 49 deletions(-) diff --git a/include/JSystem/JKernel/JKRThread.h b/include/JSystem/JKernel/JKRThread.h index 545f550b6..2b7d80b55 100644 --- a/include/JSystem/JKernel/JKRThread.h +++ b/include/JSystem/JKernel/JKRThread.h @@ -11,7 +11,7 @@ struct JKRThreadName_ { }; class JUTConsole; -class JKRThread : JKRDisposer { +class JKRThread : public JKRDisposer { public: JKRThread(u32 stack_size, int message_count, int param_3); JKRThread(OSThread* thread, int message_count); diff --git a/include/d/actor/d_a_tsubo.h b/include/d/actor/d_a_tsubo.h index bd6fd0b7b..03e16631f 100644 --- a/include/d/actor/d_a_tsubo.h +++ b/include/d/actor/d_a_tsubo.h @@ -210,9 +210,9 @@ namespace daTsubo { void prm_make_skull() {} void prm_make_yw1() {} - void prm_off_moveBg() { fopAcM_SetParam(this, base.mParameters | 0xC000); } - void prm_off_stick() { fopAcM_SetParam(this, base.mParameters & ~0x80000000); } - void prm_set_cull_non() { fopAcM_SetParam(this, base.mParameters & ~0x70000000); } + void prm_off_moveBg() { fopAcM_SetParam(this, fopAcM_GetParam(this) | 0xC000); } + void prm_off_stick() { fopAcM_SetParam(this, fopAcM_GetParam(this) & ~0x80000000); } + void prm_set_cull_non() { fopAcM_SetParam(this, fopAcM_GetParam(this) & ~0x70000000); } void prm_set_itemNo(int) {} void set_drop_spd_y0(float) {} bool spec_chk_prm_boko() const { return prm_get_spec() != 0x3F; } diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h index 0603d3e44..e608da2bc 100644 --- a/include/f_op/f_op_actor.h +++ b/include/f_op/f_op_actor.h @@ -265,8 +265,9 @@ public: /* 0xC */ cXyz max; }; -class fopAc_ac_c : public leafdraw_class { +class fopAc_ac_c { public: + /* 0x000 */ leafdraw_class base; /* 0x0C0 */ int actor_type; /* 0x0C4 */ create_tag_class actor_tag; /* 0x0D8 */ create_tag_class draw_tag; diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 384ffe292..0286a2ef5 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -678,7 +678,7 @@ void fopDwTg_ToDrawQ(create_tag_class*, int); void fopDwTg_DrawQTo(create_tag_class*); inline void fopAcM_onDraw(fopAc_ac_c* actor) { - fopDwTg_ToDrawQ(&actor->draw_tag, fpcLf_GetPriority(actor)); + fopDwTg_ToDrawQ(&actor->draw_tag, fpcM_DrawPriority(actor)); } inline void fopAcM_offDraw(fopAc_ac_c* actor) { diff --git a/include/f_op/f_op_kankyo.h b/include/f_op/f_op_kankyo.h index 14ce44f2a..90a568e6b 100644 --- a/include/f_op/f_op_kankyo.h +++ b/include/f_op/f_op_kankyo.h @@ -8,8 +8,8 @@ struct kankyo_method_class { /* 0x00 */ leafdraw_method_class base; }; -class kankyo_class : public leafdraw_class { -public: +struct kankyo_class { + /* 0x00 */ leafdraw_class base; /* 0xC0 */ int mBsType; /* 0xC4 */ create_tag_class draw_tag; /* 0xD8 */ kankyo_method_class* sub_method; @@ -23,7 +23,8 @@ struct kankyo_process_profile_definition { /* 0x24 */ kankyo_method_class* sub_method; }; // Size: 0x28 -class sub_kankyo__class : public kankyo_class { +struct sub_kankyo__class { + /* 0x00 */ kankyo_class base; }; extern leafdraw_method_class g_fopKy_Method; diff --git a/include/f_op/f_op_msg.h b/include/f_op/f_op_msg.h index ebc846512..a0e14d03b 100644 --- a/include/f_op/f_op_msg.h +++ b/include/f_op/f_op_msg.h @@ -26,8 +26,8 @@ struct msg_method_class { /* 0x00 */ leafdraw_method_class base; }; -class msg_class : public leafdraw_class { -public: +struct msg_class { + /* 0x00 */ leafdraw_class base; /* 0xC0 */ int mMsgType; /* 0xC4 */ create_tag_class draw_tag; /* 0xD8 */ msg_method_class* sub_method; diff --git a/include/f_op/f_op_overlap_mng.h b/include/f_op/f_op_overlap_mng.h index 7e5f1f097..b4b00b19c 100644 --- a/include/f_op/f_op_overlap_mng.h +++ b/include/f_op/f_op_overlap_mng.h @@ -10,8 +10,8 @@ struct overlap_method_class { /* 0x00 */ leafdraw_method_class base; }; -class overlap_task_class : public leafdraw_class { -public: +struct overlap_task_class { + /* 0x00 */ leafdraw_class base; /* 0xC0 */ overlap_method_class* sub_method; /* 0xC4 */ request_base_class mRq; /* 0xC8 */ fpc_ProcID mScenePId; diff --git a/include/f_op/f_op_overlap_req.h b/include/f_op/f_op_overlap_req.h index 9be744862..bcbf5abd5 100644 --- a/include/f_op/f_op_overlap_req.h +++ b/include/f_op/f_op_overlap_req.h @@ -8,8 +8,8 @@ struct layer_class; class overlap_task_class; -class overlap_request_class : public request_base_class { -public: +struct overlap_request_class { + /* 0x00 */ request_base_class base; /* 0x01 */ u8 field_0x1; /* 0x02 */ s16 mDelay; /* 0x04 */ u16 field_0x4; diff --git a/include/f_op/f_op_scene_tag.h b/include/f_op/f_op_scene_tag.h index 51ef174f6..61d812d0b 100644 --- a/include/f_op/f_op_scene_tag.h +++ b/include/f_op/f_op_scene_tag.h @@ -5,7 +5,8 @@ #include "f_pc/f_pc_create_tag.h" #include "f_pc/f_pc_node.h" -class scene_tag_class : public create_tag_class { +struct scene_tag_class { + /* 0x00 */ create_tag_class base; }; void fopScnTg_QueueTo(scene_tag_class* pSceneTag); diff --git a/include/f_op/f_op_view.h b/include/f_op/f_op_view.h index f47da9394..0dcb5b738 100644 --- a/include/f_op/f_op_view.h +++ b/include/f_op/f_op_view.h @@ -40,7 +40,8 @@ struct view_port_class { /* 0x18 */ scissor_class mScissor; }; -struct view_class : public leafdraw_class { +struct view_class { + /* 0x000 */ leafdraw_class base; /* 0x0C0 */ leafdraw_method_class* sub_method; /* 0x0C4 */ u8 field_0xc4; /* 0x0C8 */ f32 mNear; @@ -58,4 +59,4 @@ struct view_class : public leafdraw_class { extern leafdraw_method_class g_fopVw_Method; -#endif \ No newline at end of file +#endif diff --git a/include/f_pc/f_pc_manager.h b/include/f_pc/f_pc_manager.h index f18c70813..5bbcdf60e 100644 --- a/include/f_pc/f_pc_manager.h +++ b/include/f_pc/f_pc_manager.h @@ -38,7 +38,7 @@ inline fpc_ProcID fpcM_Create(s16 procName, FastCreateReqFunc createFunc, void* } inline s16 fpcM_DrawPriority(void* pProc) { - return fpcLf_GetPriority((leafdraw_class*)pProc); + return (s16)fpcLf_GetPriority((leafdraw_class*)pProc); } inline s32 fpcM_ChangeLayerID(void* pProc, int layerID) { diff --git a/src/d/actor/d_a_bb.cpp b/src/d/actor/d_a_bb.cpp index 8ec7eb782..b2a5ad35d 100644 --- a/src/d/actor/d_a_bb.cpp +++ b/src/d/actor/d_a_bb.cpp @@ -1363,9 +1363,9 @@ void bb_atack_move(bb_class* i_this) { } #if VERSION == VERSION_DEMO - if (&player->base == fpcM_Search(pl_name_check, i_this) || l_bbHIO.unk_10 != 0) + if (&player->base.base == fpcM_Search(pl_name_check, i_this) || l_bbHIO.unk_10 != 0) #else - if (&player->base == fpcM_Search(pl_name_check, i_this)) + if (&player->base.base == fpcM_Search(pl_name_check, i_this)) #endif { bb_kamome_attack(i_this); diff --git a/src/d/actor/d_a_bmdhand.cpp b/src/d/actor/d_a_bmdhand.cpp index 6c991e8a9..fae1c71e9 100644 --- a/src/d/actor/d_a_bmdhand.cpp +++ b/src/d/actor/d_a_bmdhand.cpp @@ -355,7 +355,7 @@ void hand_calc(bmdhand_class* i_this) { switch (i_this->m2BC) { case 0: mDoMtx_YrotS(*calc_mtx, actor->current.angle.y); - if ((actor->base.mParameters & 1U) == 0) { + if ((fopAcM_GetParam(actor) & 1U) == 0) { local_b8.z = REG0_F(9) + 250.0f; } else { local_b8.z = REG0_F(10) + 350.0f; @@ -375,7 +375,7 @@ void hand_calc(bmdhand_class* i_this) { break; case 1: mDoMtx_YrotS(*calc_mtx, actor->current.angle.y); - if ((actor->base.mParameters & 1U) == 0) { + if ((fopAcM_GetParam(actor) & 1U) == 0) { local_b8.z = REG0_F(9) + 250.0f; } else { local_b8.z = REG0_F(10) + 350.0f; @@ -442,7 +442,7 @@ void start_hand_calc(bmdhand_class* i_this) { f32 fVar1 = (i_this->m2E4.y - i_this->m2D8.y) * ((REG13_F(4) + 0.1f) * (REG13_F(5) + 2.0f)); local_a8.x = fVar1 * cM_ssin(i_this->m2B8 * (REG13_S(5) + 0x5dc)); local_a8.y = fVar1 * cM_scos(i_this->m2B8 * (REG13_S(7) + 500)); - if ((actor->base.mParameters & 1U) == 0) { + if ((fopAcM_GetParam(actor) & 1U) == 0) { local_a8.z = REG0_F(9) + 250.0f; } else { local_a8.z = REG0_F(10) + 350.0f; @@ -469,10 +469,10 @@ void hand_move(bmdhand_class* i_this) { hand_s* pcVar9 = i_this->m324; if (boss != NULL) { actor->current.angle.y = (fopAcM_GetParam(actor) & 0x1f) * -0xccc + REG8_S(4) + -13000 + boss->actor.shape_angle.y; - MTXCopy(boss->mpMorf->getModel()->getAnmMtx(boss_joint_d[(actor->base.mParameters & 0x1fU)]), *calc_mtx); + MTXCopy(boss->mpMorf->getModel()->getAnmMtx(boss_joint_d[(fopAcM_GetParam(actor) & 0x1fU)]), *calc_mtx); local_40.x = REG14_F(6); local_40.y = REG14_F(7); - local_40.z = boss_joint_xad[(actor->base.mParameters & 3U)]; + local_40.z = boss_joint_xad[(fopAcM_GetParam(actor) & 3U)]; MtxPosition(&local_40, &actor->current.pos); if ((i_this->m2BA != 2) && (boss->m332 == 3)) { i_this->m2BA = 2; diff --git a/src/d/actor/d_a_bwd.cpp b/src/d/actor/d_a_bwd.cpp index 3d4865b0b..f1fadce93 100644 --- a/src/d/actor/d_a_bwd.cpp +++ b/src/d/actor/d_a_bwd.cpp @@ -2577,7 +2577,7 @@ static cPhs_State daBwd_Create(fopAc_ac_c* a_this) { if (res != cPhs_COMPLEATE_e) { return res; } - i_this->m02BC = (u8)actor->base.mParameters; + i_this->m02BC = fopAcM_GetParam(actor) & 0xFF; if (!fopAcM_entrySolidHeap(actor, useHeapInit, 0x96000)) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_obj_ladder.cpp b/src/d/actor/d_a_obj_ladder.cpp index bc0d5eeb4..e51958c92 100644 --- a/src/d/actor/d_a_obj_ladder.cpp +++ b/src/d/actor/d_a_obj_ladder.cpp @@ -86,7 +86,7 @@ BOOL daObjLadder::Act_c::Create() { mDoMtx_stack_c::pop(); mGndChk.SetPos(&pos); - mGndChk.SetActorPid(base.mBsPcId); + mGndChk.SetActorPid(base.base.mBsPcId); mGndY = dComIfG_Bgsp()->GroundCross(&mGndChk); unk346 = 0; diff --git a/src/d/actor/d_a_obj_leaves.cpp b/src/d/actor/d_a_obj_leaves.cpp index f48fba0e5..21d6ce841 100644 --- a/src/d/actor/d_a_obj_leaves.cpp +++ b/src/d/actor/d_a_obj_leaves.cpp @@ -476,7 +476,7 @@ cPhs_State daObjLeaves_c::_create() { fopAcM_SetupActor(this, daObjLeaves_c); - if (base.mInitState == 0) { + if (fopAcM_IsFirstCreating(this)) { m43C = chk_appear(); } diff --git a/src/d/actor/d_a_obj_movebox.cpp b/src/d/actor/d_a_obj_movebox.cpp index 9c2101229..eaf596747 100644 --- a/src/d/actor/d_a_obj_movebox.cpp +++ b/src/d/actor/d_a_obj_movebox.cpp @@ -127,7 +127,7 @@ namespace daObjMovebox { cXyz pos; mDoMtx_stack_c::multVec(&offset, &pos); M_gnd_work[i].SetPos(&pos); - M_gnd_work[i].SetActorPid(movebox->base.mBsPcId); + M_gnd_work[i].SetActorPid(movebox->base.base.mBsPcId); mGroundY[i] = dComIfG_Bgsp()->GroundCross(&M_gnd_work[i]); if (mGroundY[i] > maxGroundY) { fopAc_ac_c* groundActor = dComIfG_Bgsp()->GetActorPointer(M_gnd_work[i]); @@ -184,7 +184,7 @@ namespace daObjMovebox { startPos += movebox->current.pos; endPos = startPos + temp_20; M_wall_work[i].Set(&startPos, &endPos, const_cast(movebox)); - M_wall_work[i].SetActorPid(movebox->base.mBsPcId); + M_wall_work[i].SetActorPid(movebox->base.base.mBsPcId); if (dComIfG_Bgsp()->LineCross(&M_wall_work[i])) { mWallPos[i] = M_wall_work[i].GetCross(); f32 dist_sq = startPos.abs2(mWallPos[i]); @@ -273,7 +273,7 @@ namespace daObjMovebox { startPos += movebox->current.pos; endPos = startPos + direction; - touch_work.SetActorPid(movebox->base.mBsPcId); + touch_work.SetActorPid(movebox->base.base.mBsPcId); touch_work.Set(&startPos, &endPos, const_cast(movebox)); return dComIfG_Bgsp()->LineCross(&touch_work); } @@ -1732,7 +1732,7 @@ namespace daObjMovebox { cXyz centerPos(current.pos.x, current.pos.y + 100.0f, current.pos.z); dBgS_ObjGndChk gndChk; gndChk.SetPos(¢erPos); - gndChk.SetActorPid(base.mBsPcId); + gndChk.SetActorPid(base.base.mBsPcId); dComIfG_Bgsp()->GroundCross(&gndChk); s32 bgIndex = gndChk.GetBgIndex(); s32 mtrlSndId = 0; diff --git a/src/d/actor/d_a_stone2.cpp b/src/d/actor/d_a_stone2.cpp index 35cb73db2..16b56efa7 100644 --- a/src/d/actor/d_a_stone2.cpp +++ b/src/d/actor/d_a_stone2.cpp @@ -489,7 +489,7 @@ void Act_c::set_senv(int arg1, int arg2) const { /* 00001B7C-00001BB4 .text cam_lockoff__Q28daStone25Act_cCFv */ void Act_c::cam_lockoff() const { camera_class* camera = dComIfGp_getCamera(0); - camera->mCamera.ForceLockOff(base.mBsPcId); + camera->mCamera.ForceLockOff(base.base.mBsPcId); } /* 00001BB4-00001BE4 .text mode_wait_init__Q28daStone25Act_cFv */ diff --git a/src/d/actor/d_a_tsubo.cpp b/src/d/actor/d_a_tsubo.cpp index b1cf98562..8ff651c18 100644 --- a/src/d/actor/d_a_tsubo.cpp +++ b/src/d/actor/d_a_tsubo.cpp @@ -1938,7 +1938,7 @@ void Act_c::mode_carry_init() { se_pickup_carry_init(); } - cLib_offBit(base.mParameters, 0x80000000); + prm_off_stick(); m685 = 0; m686 = 0; m678 = 4; @@ -3514,7 +3514,7 @@ void Act_c::set_senv(int arg1, int arg2) const { /* 00007840-00007878 .text cam_lockoff__Q27daTsubo5Act_cCFv */ void Act_c::cam_lockoff() const { - dComIfGp_getCamera(0)->mCamera.ForceLockOff(base.mBsPcId); + dComIfGp_getCamera(0)->mCamera.ForceLockOff(base.base.mBsPcId); } /* 00007878-00007B08 .text _execute__Q27daTsubo5Act_cFv */ diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index d11442ce8..ca1e2a0eb 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -4772,7 +4772,7 @@ bool camera_draw(camera_process_class* i_this) { body->Draw(); - if (fpcLf_GetPriority(a_this) != 1) { + if (fpcM_DrawPriority(a_this) != 1) { get_camera_id(a_this); for (int i = 0; i < 1; i++) { if (!fopOvlpM_IsDoingReq()) { diff --git a/src/f_op/f_op_actor.cpp b/src/f_op/f_op_actor.cpp index 5d14d8d3f..239f5d231 100644 --- a/src/f_op/f_op_actor.cpp +++ b/src/f_op/f_op_actor.cpp @@ -299,7 +299,7 @@ cPhs_State fopAc_Create(void* pProc) { cPhs_State status = fpcMtd_Create((process_method_class*)actor->sub_method, actor); if (status == cPhs_COMPLEATE_e) { - s32 priority = fpcLf_GetPriority(actor); + s32 priority = fpcM_DrawPriority(actor); fopDwTg_ToDrawQ(&actor->draw_tag, priority); } diff --git a/src/f_op/f_op_camera.cpp b/src/f_op/f_op_camera.cpp index 945486f94..6f3b86470 100644 --- a/src/f_op/f_op_camera.cpp +++ b/src/f_op/f_op_camera.cpp @@ -66,7 +66,7 @@ cPhs_State fopCam_Create(void* pProc) { cPhs_State ret = fpcMtd_Create(&camera->mpMtd->base, camera); if (ret == cPhs_COMPLEATE_e) { - s32 priority = fpcLf_GetPriority(camera); + s32 priority = fpcM_DrawPriority(camera); fopDwTg_ToDrawQ(&camera->draw_tag, priority); } diff --git a/src/f_op/f_op_kankyo.cpp b/src/f_op/f_op_kankyo.cpp index 1ef9a7e0c..d755837f7 100644 --- a/src/f_op/f_op_kankyo.cpp +++ b/src/f_op/f_op_kankyo.cpp @@ -82,7 +82,7 @@ static cPhs_State fopKy_Create(void* i_ky) { cPhs_State ret = fpcMtd_Create((process_method_class*)i_this->sub_method, i_this); if (ret == cPhs_COMPLEATE_e) { - s32 priority = fpcLf_GetPriority(i_this); + s32 priority = fpcM_DrawPriority(i_this); fopDwTg_ToDrawQ(&i_this->draw_tag, priority); } diff --git a/src/f_op/f_op_msg.cpp b/src/f_op/f_op_msg.cpp index d01f458e1..4bfcb4763 100644 --- a/src/f_op/f_op_msg.cpp +++ b/src/f_op/f_op_msg.cpp @@ -72,7 +72,7 @@ cPhs_State fopMsg_Create(void* i_this) { cPhs_State status = fpcMtd_Create((process_method_class*)_this->sub_method, _this); if (status == cPhs_COMPLEATE_e) { - s32 priority = fpcLf_GetPriority(_this); + s32 priority = fpcM_DrawPriority(_this); fopDwTg_ToDrawQ(&_this->draw_tag, priority); } diff --git a/src/f_op/f_op_overlap_mng.cpp b/src/f_op/f_op_overlap_mng.cpp index b4a752287..6053a1cba 100644 --- a/src/f_op/f_op_overlap_mng.cpp +++ b/src/f_op/f_op_overlap_mng.cpp @@ -51,7 +51,7 @@ BOOL fopOvlpM_IsPeek() { BOOL fopOvlpM_IsDone() { if (l_fopOvlpM_overlap[0] != NULL) - return cReq_Is_Done(l_fopOvlpM_overlap[0]); + return cReq_Is_Done(&l_fopOvlpM_overlap[0]->base); else return FALSE; } @@ -76,7 +76,7 @@ static overlap_request_class l_fopOvlpM_Request; request_base_class* fopOvlpM_Request(s16 procName, u16 peekTime) { if (l_fopOvlpM_overlap[0] == NULL) { l_fopOvlpM_overlap[0] = fopOvlpReq_Request(&l_fopOvlpM_Request, procName, peekTime); - return l_fopOvlpM_overlap[0]; + return &l_fopOvlpM_overlap[0]->base; } return NULL; diff --git a/src/f_op/f_op_overlap_req.cpp b/src/f_op/f_op_overlap_req.cpp index 5f42befdc..727a8aafb 100644 --- a/src/f_op/f_op_overlap_req.cpp +++ b/src/f_op/f_op_overlap_req.cpp @@ -25,7 +25,7 @@ static cPhs_State fopOvlpReq_phase_Done(overlap_request_class* i_this) { } static cPhs_State fopOvlpReq_phase_IsDone(overlap_request_class* i_this) { - cReq_Done(i_this); + cReq_Done(&i_this->base); if (i_this->mDelay-- <= 0) return cPhs_NEXT_e; else @@ -45,7 +45,7 @@ static cPhs_State fopOvlpReq_phase_WaitOfFadeout(overlap_request_class* i_this) if (i_this->mPeektime) i_this->mPeektime--; - if (i_this->flag2 == 2 && !i_this->mPeektime) { + if (i_this->base.flag2 == 2 && !i_this->mPeektime) { cReq_Command(&i_this->mpTask->mRq, 2); return cPhs_NEXT_e; } @@ -56,7 +56,7 @@ static cPhs_State fopOvlpReq_phase_WaitOfFadeout(overlap_request_class* i_this) static cPhs_State fopOvlpReq_phase_IsComplete(overlap_request_class* i_this) { if (cReq_Is_Done(&i_this->mpTask->mRq)) { - cReq_Done(i_this); + cReq_Done(&i_this->base); return cPhs_NEXT_e; } @@ -99,7 +99,7 @@ overlap_request_class* fopOvlpReq_Request(overlap_request_class* i_this, s16 pro return i_this; } - cReq_Command(i_this, 1); + cReq_Command(&i_this->base, 1); i_this->mProcName = procName; cPhs_Set(&i_this->mPhs, phaseMethod); fopOvlpReq_SetPeektime(i_this, peekTime); @@ -148,9 +148,9 @@ void fopOvlpReq_SetPeektime(overlap_request_class* i_this, u16 peekTime) { } BOOL fopOvlpReq_OverlapClr(overlap_request_class* i_this) { - if (i_this->flag0 == 1 || !fopOvlpReq_Is_PeektimeLimit(i_this)) + if (i_this->base.flag0 == 1 || !fopOvlpReq_Is_PeektimeLimit(i_this)) return FALSE; - cReq_Create(i_this, 2); + cReq_Create(&i_this->base, 2); return TRUE; }