diff --git a/include/f/f_pc/f_pc_base.h b/include/f/f_pc/f_pc_base.h index 8892d236f56..a5a5e81b627 100644 --- a/include/f/f_pc/f_pc_base.h +++ b/include/f/f_pc/f_pc_base.h @@ -35,8 +35,8 @@ struct base_process_class { extern "C" { -extern int fpcBs_Is_JustOfType(int a, int b); -extern int fpcBs_Execute(base_process_class *pProc); +int fpcBs_Is_JustOfType(int a, int b); +int fpcBs_Execute(base_process_class *pProc); }; diff --git a/include/f/f_pc/f_pc_layer.h b/include/f/f_pc/f_pc_layer.h index d2108a55737..a22d2d47989 100644 --- a/include/f/f_pc/f_pc_layer.h +++ b/include/f/f_pc/f_pc_layer.h @@ -15,8 +15,7 @@ struct layer_class { u32 mLayerID; node_lists_tree_class mNodeListTree; process_node_class *mpPcNode; - node_lists_tree_class mCancelListTree; - s32 mpUnk0; + node_list_class mCancelList; s32 mCreatingCount:16;// for some reason, the compiler only optimized these into a single word load/store instead of 2 halfword load/store, but only if they are written like this s32 mDeletingCount:16; }; diff --git a/src/f/f_pc/f_pc_layer.cpp b/src/f/f_pc/f_pc_layer.cpp index d3533861c3e..fcdae0b270d 100644 --- a/src/f/f_pc/f_pc_layer.cpp +++ b/src/f/f_pc/f_pc_layer.cpp @@ -23,8 +23,7 @@ void fpcLy_CancelQTo(process_method_tag_class *pMthd) { } void fpcLy_ToCancelQ(layer_class *pLayer, process_method_tag_class *pMthd) { - // this is obviously wrong - fpcMtdTg_ToMethodQ((node_list_class*)&pLayer->mCancelListTree, pMthd); + fpcMtdTg_ToMethodQ(&pLayer->mCancelList, pMthd); } bool fpcLy_CancelMethod(process_method_tag_class *pLayer) { @@ -109,7 +108,7 @@ void fpcLy_Regist(layer_class *pLayer) { } int fpcLy_Delete(layer_class *pLayer) { - if (pLayer->mNodeListTree.mpLists->mSize == 0 && pLayer->mpUnk0 == NULL) { + if (pLayer->mNodeListTree.mpLists->mSize == 0 && pLayer->mCancelList.mSize == 0) { cLs_SingleCut(&pLayer->mNode); *pLayer = lbl_803A39B0; return 1; @@ -119,8 +118,7 @@ int fpcLy_Delete(layer_class *pLayer) { } void fpcLy_Cancel(layer_class *pLayer) { - // data structures are messed up? - fpcMtdIt_Method((node_list_class*)&pLayer->mCancelListTree, (cNdIt_MethodFunc)fpcLy_CancelMethod); + fpcMtdIt_Method(&pLayer->mCancelList, (cNdIt_MethodFunc)fpcLy_CancelMethod); } void fpcLy_Create(layer_class *pLayer, process_node_class *pPcNode, node_list_class *pLists, int listNum) {