summaryrefslogtreecommitdiff
path: root/src/f_pc/f_pc_leaf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/f_pc/f_pc_leaf.cpp')
-rw-r--r--src/f_pc/f_pc_leaf.cpp15
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 */