From 2dc87a52740cb61106ba6488de912918d11803ad Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 2 Oct 2023 21:09:56 -0700 Subject: [PATCH] build fix --- include/f_op/f_op_scene.h | 2 +- src/f_op/f_op_scene.cpp | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/f_op/f_op_scene.h b/include/f_op/f_op_scene.h index 4d2c55096..ec3f4291a 100644 --- a/include/f_op/f_op_scene.h +++ b/include/f_op/f_op_scene.h @@ -21,7 +21,7 @@ typedef struct scene_process_profile_definition { class scene_class { public: /* 0x000 */ process_node_class mBase; - /* 0x1AC */ process_method_class* mpMtd; + /* 0x1AC */ scene_method_class* mpMtd; /* 0x1B0 */ scene_tag_class mScnTg; }; diff --git a/src/f_op/f_op_scene.cpp b/src/f_op/f_op_scene.cpp index 56b134ddb..8e4e304a2 100644 --- a/src/f_op/f_op_scene.cpp +++ b/src/f_op/f_op_scene.cpp @@ -12,16 +12,16 @@ static void fopScn_Draw(scene_class* i_this) { } static void fopScn_Execute(scene_class* i_this) { - fpcMtd_Execute(i_this->mpMtd, i_this); + fpcMtd_Execute((process_method_class*)i_this->mpMtd, i_this); } static s32 fopScn_IsDelete(void* i_this) { - return fpcMtd_IsDelete(static_cast(i_this)->mpMtd, i_this); + return fpcMtd_IsDelete((process_method_class*)((scene_class*)i_this)->mpMtd, i_this); } static s32 fopScn_Delete(void* i_this) { scene_class* scene = static_cast(i_this); - s32 ret = fpcMtd_Delete(scene->mpMtd, scene); + s32 ret = fpcMtd_Delete((process_method_class*)scene->mpMtd, scene); if (ret == 1) { fopScnTg_QueueTo(&scene->mScnTg); } @@ -32,8 +32,7 @@ static s32 fopScn_Delete(void* i_this) { static s32 fopScn_Create(void* i_this) { scene_class* scene = static_cast(i_this); if (fpcM_IsFirstCreating(i_this)) { - scene_process_profile_definition* profile = - (scene_process_profile_definition*)fpcM_GetProfile(i_this); + scene_process_profile_definition* profile = (scene_process_profile_definition*)fpcM_GetProfile(i_this); scene->mpMtd = profile->mpMtd; fopScnTg_Init(&scene->mScnTg, i_this); fopScnTg_ToQueue(&scene->mScnTg); @@ -44,11 +43,13 @@ static s32 fopScn_Create(void* i_this) { } } - return fpcMtd_Create(scene->mpMtd, i_this); + return fpcMtd_Create((process_method_class*)scene->mpMtd, i_this); } leafdraw_method_class g_fopScn_Method = { - (process_method_func)fopScn_Create, (process_method_func)fopScn_Delete, - (process_method_func)fopScn_Execute, (process_method_func)fopScn_IsDelete, + (process_method_func)fopScn_Create, + (process_method_func)fopScn_Delete, + (process_method_func)fopScn_Execute, + (process_method_func)fopScn_IsDelete, (process_method_func)fopScn_Draw, };