Files
dusklight/src/f/f_pc/f_pc_leaf.cpp
T
lepelog ce8319486b Fix symbol names (#118)
* checkpoint

* checkpoint

* rename f_pc

* checkpoint

* small symbol rename and fix some fpc symbols

* remove unneeded entries from ldscript

* simplify ok check, update docker container

Co-authored-by: Pheenoh <pheenoh@gmail.com>
2021-03-15 02:12:44 -04:00

48 lines
1.3 KiB
C++

#include "f/f_pc/f_pc_leaf.h"
#include "dolphin/types.h"
// f_pc_leaf::g_fpcLf_type
extern int lbl_80450D30;
s32 fpcLf_GetPriority(const leafdraw_class* pLeaf) {
return fpcDwPi_Get(&pLeaf->mDwPi);
}
s32 fpcLf_DrawMethod(leafdraw_method_class* pMthd, void* pUserData) {
return fpcMtd_Method(pMthd->mpDrawFunc, pUserData);
}
s32 fpcLf_Draw(leafdraw_class* pLeaf) {
s32 ret = 0;
if (pLeaf->mbUnk0 == 0)
ret = fpcLf_DrawMethod(pLeaf->mpDrawMtd, pLeaf);
return ret;
}
s32 fpcLf_Execute(leafdraw_class* pLeaf) {
return fpcMtd_Execute(&pLeaf->mpDrawMtd->mBase, pLeaf);
}
s32 fpcLf_IsDelete(leafdraw_class* pLeaf) {
return fpcMtd_IsDelete(&pLeaf->mpDrawMtd->mBase, pLeaf);
}
s32 fpcLf_Delete(leafdraw_class* pLeaf) {
s32 ret = fpcMtd_Delete(&pLeaf->mpDrawMtd->mBase, pLeaf);
if (ret == 1) {
pLeaf->mBase.mSubType = 0;
}
return ret;
}
s32 fpcLf_Create(leafdraw_class* pLeaf) {
leaf_process_profile_definition* profDef;
if (pLeaf->mBase.mInitState == 0) {
profDef = (leaf_process_profile_definition*)pLeaf->mBase.mpProf;
pLeaf->mpDrawMtd = profDef->mLfDrwMth;
pLeaf->mBase.mSubType = fpcBs_MakeOfType(&lbl_80450D30);
fpcDwPi_Init(&pLeaf->mDwPi, profDef->unk20);
pLeaf->mbUnk0 = 0;
}
return fpcMtd_Create(&pLeaf->mpDrawMtd->mBase, pLeaf);
}