Use composition instead of inheritance for most f_op classes (#2700)

This commit is contained in:
LagoLunatic
2025-09-25 15:57:15 -04:00
committed by GitHub
parent 27507a6030
commit dbf6abeb90
29 changed files with 62 additions and 55 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ static int fopAc_Create(void* i_this) {
int ret = fpcMtd_Create((process_method_class*)a_this->sub_method, a_this);
if (ret == cPhs_COMPLEATE_e) {
s32 priority = fpcLf_GetPriority(a_this);
s32 priority = fpcM_DrawPriority(a_this);
fopDwTg_ToDrawQ(&a_this->draw_tag, priority);
} else if (ret == cPhs_ERROR_e) {
fopAcM_OnCondition(a_this, 0x10);
+2 -1
View File
@@ -1911,7 +1911,8 @@ void fopAcM_setEffectMtx(const fopAc_ac_c* i_actor, const J3DModelData* modelDat
/* 8001D5A4-8001D5EC 017EE4 0048+00 1/1 0/0 0/0 .text fopAcM_getProcNameString__FPC10fopAc_ac_c */
static const char* fopAcM_getProcNameString(const fopAc_ac_c* i_actor) {
const char* name = dStage_getName2(i_actor->base.profname, i_actor->argument);
s16 prof_name = fopAcM_GetProfName(i_actor);
const char* name = dStage_getName2(prof_name, i_actor->argument);
return name != NULL ? name : "UNKOWN";
}
+1 -1
View File
@@ -102,7 +102,7 @@ static int fopCam_Create(void* i_this) {
int ret = fpcMtd_Create(&a_this->submethod->base, a_this);
if (ret == cPhs_COMPLEATE_e) {
s32 priority = fpcLf_GetPriority(a_this);
s32 priority = fpcM_DrawPriority(a_this);
fopDwTg_ToDrawQ(&a_this->create_tag, priority);
}
+2 -2
View File
@@ -12,12 +12,12 @@ static fpc_ProcID l_fopCamM_id[4];
/* 8001E308-8001E310 018C48 0008+00 0/0 12/12 2/2 .text fopCamM_GetParam__FP12camera_class */
u32 fopCamM_GetParam(camera_class* i_this) {
return i_this->base.parameters;
return fpcM_GetParam(i_this);
}
/* 8001E310-8001E374 018C50 0064+00 0/0 1/1 0/0 .text fopCamM_Create__FisPv */
fpc_ProcID fopCamM_Create(int i_cameraIdx, s16 i_procName, void* i_append) {
l_fopCamM_id[i_cameraIdx] = fpcSCtRq_Request(fpcLy_CurrentLayer(), i_procName, NULL, NULL, i_append);
l_fopCamM_id[i_cameraIdx] = fpcM_Create(i_procName, NULL, i_append);
return l_fopCamM_id[i_cameraIdx];
}
+1 -1
View File
@@ -81,7 +81,7 @@ static int fopKy_Create(void* i_this) {
int ret = fpcMtd_Create(&a_this->sub_method->base, a_this);
if (ret == cPhs_COMPLEATE_e) {
s32 priority = fpcLf_GetPriority(a_this);
s32 priority = fpcM_DrawPriority(a_this);
fopDwTg_ToDrawQ(&a_this->draw_tag, priority);
}
+1 -1
View File
@@ -75,7 +75,7 @@ int fopMsg_Create(void* i_this) {
int ret = fpcMtd_Create(&a_this->sub_method->base, a_this);
if (ret == cPhs_COMPLEATE_e) {
s32 priority = fpcLf_GetPriority(a_this);
s32 priority = fpcM_DrawPriority(a_this);
fopDwTg_ToDrawQ(&a_this->draw_tag, priority);
}
+1 -2
View File
@@ -29,8 +29,7 @@ msg_class* fopMsgM_SearchByID(fpc_ProcID i_id) {
/* 8001FA44-8001FA4C 01A384 0008+00 0/0 2/2 0/0 .text fopMsgM_GetAppend__FPv */
fopMsg_prm_class* fopMsgM_GetAppend(void* i_msg) {
msg_class* msg = (msg_class*)i_msg;
return (fopMsg_prm_class*)msg->base.append;
return (fopMsg_prm_class*)fpcM_GetAppend(i_msg);
}
/* 8001FA4C-8001FA6C 01A38C 0020+00 0/0 2/2 0/0 .text fopMsgM_Delete__FPv */