diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-03-18 12:45:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 15:45:44 -0400 |
| commit | d3e9175bfb5ca4fce4633e473d8d8a3556c3d3ef (patch) | |
| tree | 21a10894e590edebe9cd928a2fb48f4e8d061262 /src/f_pc/f_pc_leaf.cpp | |
| parent | 58ba86b6a3cfebe38b643b7ffecf72090a720db0 (diff) | |
d_a_e_pz equivalent (#2330)
* d_a_e_pz equivalent
* rename var
* match f_pc closer to debug
* hopefully fix decompctx
* sdk done
* remove unneeded file
Diffstat (limited to 'src/f_pc/f_pc_leaf.cpp')
| -rw-r--r-- | src/f_pc/f_pc_leaf.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/f_pc/f_pc_leaf.cpp b/src/f_pc/f_pc_leaf.cpp index 52cebcc4bc..b1906bf733 100644 --- a/src/f_pc/f_pc_leaf.cpp +++ b/src/f_pc/f_pc_leaf.cpp @@ -4,6 +4,7 @@ */ #include "f_pc/f_pc_leaf.h" +#include "f_pc/f_pc_debug_sv.h" /* 80021A00-80021A24 0024+00 s=0 e=4 z=2 None .text fpcLf_GetPriority__FPC14leafdraw_class */ s16 fpcLf_GetPriority(const leafdraw_class* i_leaf) { @@ -26,6 +27,14 @@ s32 fpcLf_Draw(leafdraw_class* i_leaf) { /* 80021A80-80021AA8 0028+00 s=1 e=0 z=0 None .text fpcLf_Execute__FP14leafdraw_class */ s32 fpcLf_Execute(leafdraw_class* i_leaf) { +#ifdef DEBUG + if (fpcBs_Is_JustOfType(g_fpcLf_type, i_leaf->base.subtype) == 0) { + if (g_fpcDbSv_service[12] != NULL) { + g_fpcDbSv_service[12](i_leaf); + } + return 0; + } +#endif return fpcMtd_Execute(&i_leaf->leaf_methods->base, i_leaf); } @@ -48,16 +57,16 @@ int g_fpcLf_type; /* 80021B14-80021B88 0074+00 s=1 e=0 z=0 None .text fpcLf_Create__FP14leafdraw_class */ s32 fpcLf_Create(leafdraw_class* i_leaf) { - leaf_process_profile_definition* pprofile; if (i_leaf->base.init_state == 0) { - pprofile = (leaf_process_profile_definition*)i_leaf->base.profile; + leaf_process_profile_definition* pprofile = (leaf_process_profile_definition*)i_leaf->base.profile; i_leaf->leaf_methods = pprofile->sub_method; i_leaf->base.subtype = fpcBs_MakeOfType(&g_fpcLf_type); fpcDwPi_Init(&i_leaf->draw_priority, pprofile->priority); i_leaf->unk_0xBC = 0; } - return fpcMtd_Create(&i_leaf->leaf_methods->base, i_leaf); + int ret = fpcMtd_Create(&i_leaf->leaf_methods->base, i_leaf); + return ret; } /* 803A39E8-803A3A00 0014+04 s=0 e=27 z=756 None .data g_fpcLf_Method */ |
