fpc symbol names (#119)

* fpcCtIt_filter_JudgeInLayer

* dStage_roomControl_c::getZoneNo

* fix fpc symbol names

* format

* mUnk0 -> mLayerID

Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
lepelog
2021-03-28 20:07:21 +02:00
committed by GitHub
parent d63066e617
commit 3d66902e1a
34 changed files with 111 additions and 113 deletions
+4 -5
View File
@@ -5,6 +5,7 @@
#include "d/d_item/d_item/d_item.h"
#include "d/d_kankyo/d_kankyo.h"
#include "d/d_meter2/d_meter2_info/d_meter2_info.h"
#include "d/d_stage/d_stage.h"
#include "f/f_op/f_op_scene_mng.h"
#include "global.h"
#include "m_Do/m_Do_Reset/m_Do_Reset.h"
@@ -297,7 +298,7 @@ extern u8 lbl_803A71C4;
extern u8 lbl_80451D00;
extern u8 lbl_803A37C0;
extern u8 lbl_80451D04;
extern u8 lbl_803F6094;
extern dStage_roomStatus_c lbl_803F6094[0x40];
extern u8 lbl_80451D10;
extern u8 lbl_80451D08;
extern u8 lbl_803A71D0;
@@ -733,10 +734,8 @@ asm void dComIfGs_onZoneSwitch__Fii(void) {
}
// getZoneNo__20dStage_roomControl_cFi
// dStage_roomControl_c::getZoneNo(int)
asm int getZoneNo__20dStage_roomControl_cFi(int) {
nofralloc
#include "d/d_com/d_com_inf_game/asm/func_8002D9B0.s"
int dStage_roomControl_c::getZoneNo(int room) {
return lbl_803F6094[room].getZoneNo();
}
// dComIfGs_offZoneSwitch__Fii
+9 -9
View File
@@ -1391,7 +1391,7 @@ void dSv_info_c::onSwitch(int i_no, int i_roomNo) {
} else if (i_no < 0xc0) {
dungeon_bit.onSwitch(i_no - 0x80);
} else {
int zoneId = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneId = dStage_roomControl_c::getZoneNo(i_roomNo);
if (i_no < 0xE0) {
zones[zoneId].getZoneBit().onSwitch(i_no - 0xC0);
} else {
@@ -1410,7 +1410,7 @@ void dSv_info_c::offSwitch(int i_no, int i_roomNo) {
} else if (i_no < 0xc0) {
dungeon_bit.offSwitch(i_no - 0x80);
} else {
int zoneId = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneId = dStage_roomControl_c::getZoneNo(i_roomNo);
if (i_no < 0xE0) {
zones[zoneId].getZoneBit().offSwitch(i_no - 0xC0);
} else {
@@ -1430,7 +1430,7 @@ BOOL dSv_info_c::isSwitch(int i_no, int i_roomNo) const {
} else if (i_no < 0xc0) {
value = dungeon_bit.isSwitch(i_no - 0x80);
} else {
int zoneId = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneId = dStage_roomControl_c::getZoneNo(i_roomNo);
if ((zoneId < 0) || (zoneId >= 0x20)) {
value = FALSE;
} else {
@@ -1455,7 +1455,7 @@ BOOL dSv_info_c::revSwitch(int i_no, int i_roomNo) {
} else if (i_no < 0xC0) {
value = dungeon_bit.revSwitch(i_no - 0x80);
} else {
int zoneNo = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneNo = dStage_roomControl_c::getZoneNo(i_roomNo);
if (i_no < 0xE0) {
value = zones[zoneNo].getZoneBit().revSwitch(i_no - 0xC0);
} else {
@@ -1476,7 +1476,7 @@ void dSv_info_c::onItem(int i_no, int i_roomNo) {
} else if (i_no < 0xA0) {
memory.getTempFlags().onItem(i_no - 0x80);
} else {
int zoneNo = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneNo = dStage_roomControl_c::getZoneNo(i_roomNo);
if (i_no < 0xC0) {
zones[zoneNo].getZoneBit().onItem(i_no - 0xA0);
} else {
@@ -1496,7 +1496,7 @@ BOOL dSv_info_c::isItem(int i_no, int i_roomNo) const {
} else if (i_no < 0xA0) {
value = memory.getTempFlagsConst().isItem(i_no - 0x80);
} else {
int zoneNo = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneNo = dStage_roomControl_c::getZoneNo(i_roomNo);
if (i_no < 0xC0) {
value = zones[zoneNo].getZoneBitConst().isItem(i_no - 0xA0);
} else {
@@ -1512,7 +1512,7 @@ void dSv_info_c::onActor(int i_id, int i_roomNo) {
return;
}
int zoneNo = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneNo = dStage_roomControl_c::getZoneNo(i_roomNo);
zones[zoneNo].getZoneActor().on(i_id);
}
@@ -1521,7 +1521,7 @@ void dSv_info_c::offActor(int i_id, int i_roomNo) {
return;
}
int zoneNo = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int zoneNo = dStage_roomControl_c::getZoneNo(i_roomNo);
zones[zoneNo].getZoneActor().off(i_id);
}
@@ -1530,7 +1530,7 @@ BOOL dSv_info_c::isActor(int i_id, int i_roomNo) const {
return FALSE;
}
int ActorZoneNo = getZoneNo__20dStage_roomControl_cFi(i_roomNo);
int ActorZoneNo = dStage_roomControl_c::getZoneNo(i_roomNo);
return zones[ActorZoneNo].getZoneActorConst().is(i_id);
}
+12 -5
View File
@@ -1,4 +1,5 @@
#include "f/f_pc/f_pc_create_iter.h"
#include "f/f_pc/f_pc_create_req.h"
// g_fpcCtTg_Queue
extern node_list_class lbl_803A3990;
@@ -16,13 +17,19 @@ void* fpcCtIt_Judge(fpcCtIt_JudgeFunc pJudge, void* pUserData) {
iter.mpUserData = pUserData;
return cLsIt_Judge(&lbl_803A3990, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
}
asm void* fpcCtIt_filter_JudgeInLayer(create_tag*, fpcCtIt_jilprm_c*) {
nofralloc
#include "f/f_pc/asm/80020A40.s"
void* fpcCtIt_filter_JudgeInLayer(create_tag* pCreateTag, fpcCtIt_jilprm_c* pIterData) {
create_request* create_req = static_cast<create_request*>(pCreateTag->mBase.mpTagData);
if (create_req->mpLayer->mLayerID == pIterData->mLayerID) {
return pIterData->mFunc((node_class*)create_req->mpRes, pIterData->mpUserData);
} else {
return NULL;
}
}
void* fpcCtIt_JudgeInLayer(unsigned int pUnk0, fpcCtIt_JudgeFunc pFunc, void* pUserData) {
void* fpcCtIt_JudgeInLayer(unsigned int pLayerID, fpcCtIt_JudgeFunc pFunc, void* pUserData) {
fpcCtIt_jilprm_c data;
data.mUnk0 = pUnk0;
data.mLayerID = pLayerID;
data.mFunc = pFunc;
data.mpUserData = pUserData;
return fpcCtIt_Judge((fpcCtIt_JudgeFunc)fpcCtIt_filter_JudgeInLayer, &data);
+2 -1
View File
@@ -69,7 +69,8 @@ s32 fpcDt_ToDeleteQ(base_process_class* pProc) {
} else {
layer_class* layer = &procNode->mLayer;
fpcLy_Cancel(layer);
if (fpcLyIt_OnlyHereLY(layer, (cNdIt_MethodFunc)fpcDt_ToDeleteQ, NULL) == 0) {
if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) ==
0) {
return 0;
}
}
+1 -3
View File
@@ -6,8 +6,6 @@
// f_pc_leaf::g_fpcLf_type
extern s32 lbl_80450D30;
typedef s32 (*cNdIt_MethodFuncFunc)(cNdIt_MethodFunc);
s32 fpcDw_Execute(base_process_class* pProc) {
if (!fpcPause_IsEnable(pProc, 2)) {
layer_class* curLay;
@@ -28,7 +26,7 @@ s32 fpcDw_Execute(base_process_class* pProc) {
}
}
s32 fpcDw_Handler(cNdIt_MethodFuncFunc param_1, cNdIt_MethodFunc param_2) {
s32 fpcDw_Handler(fpcDw_HandlerFuncFunc param_1, fpcDw_HandlerFunc param_2) {
s32 ret;
cAPIGph_BeforeOfDraw();
ret = param_1(param_2);
+2 -2
View File
@@ -46,7 +46,7 @@ s32 fpcEx_ToLineQ(base_process_class* pProc) {
pProc->mInitState = 2;
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) {
process_node_class* pNode = (process_node_class*)pProc;
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcEx_ToLineQ, pNode);
fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, pNode);
}
return 1;
@@ -76,6 +76,6 @@ s32 fpcEx_ToExecuteQ(base_process_class* pProc) {
}
}
void fpcEx_Handler(cNdIt_MethodFunc pFunc) {
void fpcEx_Handler(fpcLnIt_QueueFunc pFunc) {
fpcLnIt_Queue(pFunc);
}
+5 -6
View File
@@ -80,7 +80,7 @@ layer_class* fpcLy_CurrentLayer(void) {
return lbl_80450D18;
}
layer_class* fpcLy_Search(u32 id) {
layer_class* fpcLy_Search(unsigned int id) {
layer_class* iVar1 = fpcLy_RootLayer();
while (iVar1 != NULL) {
if (iVar1->mLayerID == id) {
@@ -91,7 +91,7 @@ layer_class* fpcLy_Search(u32 id) {
return NULL;
}
layer_class* fpcLy_Layer(u32 id) {
layer_class* fpcLy_Layer(unsigned int id) {
if (id == 0 || fpcLy_RootLayer()->mLayerID == id) {
return fpcLy_RootLayer();
} else if (id == ~2 || fpcLy_CurrentLayer()->mLayerID == id) {
@@ -116,11 +116,10 @@ s32 fpcLy_Delete(layer_class* pLayer) {
}
void fpcLy_Cancel(layer_class* pLayer) {
fpcMtdIt_Method(&pLayer->mCancelList, (cNdIt_MethodFunc)fpcLy_CancelMethod);
fpcMtdIt_Method(&pLayer->mCancelList, (fpcMtdIt_MethodFunc)fpcLy_CancelMethod);
}
void fpcLy_Create(layer_class* pLayer, process_node_class* pPcNode, node_list_class* pLists,
s32 listNum) {
void fpcLy_Create(layer_class* pLayer, void* pPcNode, node_list_class* pLists, int listNum) {
void* pvVar1;
s32 iVar2;
@@ -135,7 +134,7 @@ void fpcLy_Create(layer_class* pLayer, process_node_class* pPcNode, node_list_cl
*pLayer = lbl_803A39B0;
cNd_Create((node_class*)pLayer, NULL);
pLayer->mLayerID = lbl_80450D24++;
pLayer->mpPcNode = pPcNode;
pLayer->mpPcNode = static_cast<process_node_class*>(pPcNode);
if (lbl_80450D1C == 0x1) {
lbl_80450D1C = 0x0;
cLs_Create(&lbl_803A39DC);
+2 -2
View File
@@ -2,14 +2,14 @@
#include "SComponent/c_tag_iter.h"
#include "SComponent/c_tree_iter.h"
s32 fpcLyIt_OnlyHere(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
s32 fpcLyIt_OnlyHere(layer_class* pLayer, fpcLyIt_OnlyHereFunc pFunc, void* pUserData) {
layer_iter lIter;
lIter.mpFunc = pFunc;
lIter.mpUserData = pUserData;
return cTrIt_Method(&pLayer->mNodeListTree, (cNdIt_MethodFunc)cTgIt_MethodCall, &lIter);
}
s32 fpcLyIt_OnlyHereLY(layer_class* pLayer, cNdIt_MethodFunc pFunc, void* pUserData) {
s32 fpcLyIt_OnlyHereLY(layer_class* pLayer, fpcLyIt_OnlyHereFunc pFunc, void* pUserData) {
s32 result;
layer_class* currentLayer = fpcLy_CurrentLayer();
fpcLy_SetCurrentLayer(pLayer);
+4 -3
View File
@@ -5,7 +5,8 @@
// f_pc_layer_tag::crear
extern layer_management_tag_class lbl_803A3A00;
s32 fpcLyTg_ToQueue(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16 listPrio) {
s32 fpcLyTg_ToQueue(layer_management_tag_class* pTag, unsigned int layerID, u16 listID,
u16 listPrio) {
if (pTag->mpLayer == NULL && layerID == -1) {
return 0;
} else {
@@ -40,7 +41,7 @@ s32 fpcLyTg_QueueTo(layer_management_tag_class* pTag) {
}
}
s32 fpcLyTg_Move(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16 listPrio) {
s32 fpcLyTg_Move(layer_management_tag_class* pTag, unsigned int layerID, u16 listID, u16 listPrio) {
layer_class* layer = fpcLy_Layer(layerID);
if (layer == NULL) {
return 0;
@@ -52,7 +53,7 @@ s32 fpcLyTg_Move(layer_management_tag_class* pTag, u32 layerID, u16 listID, u16
}
}
s32 fpcLyTg_Init(layer_management_tag_class* pTag, u32 param2, void* param3) {
s32 fpcLyTg_Init(layer_management_tag_class* pTag, unsigned int param2, void* param3) {
layer_class* layer;
*pTag = lbl_803A3A00;
cTg_Create(&pTag->mCreateTag, param3);
+4 -3
View File
@@ -1,4 +1,5 @@
#include "f/f_pc/f_pc_line_iter.h"
#include "SComponent/c_tag_iter.h"
#include "SComponent/c_tree_iter.h"
#include "f/f_pc/f_pc_base.h"
@@ -8,7 +9,7 @@
extern node_lists_tree_class lbl_804505D8;
static s32 fpcLnIt_MethodCall(create_tag_class* pTag, method_filter* pFilter) {
layer_class* pLayer = ((base_process_class*)pTag->mpTagData)->mLyTg.mpLayer;
layer_class* pLayer = static_cast<base_process_class*>(pTag->mpTagData)->mLyTg.mpLayer;
layer_class* pCurLayer = fpcLy_CurrentLayer();
s32 ret;
@@ -19,9 +20,9 @@ static s32 fpcLnIt_MethodCall(create_tag_class* pTag, method_filter* pFilter) {
return ret;
}
void fpcLnIt_Queue(cNdIt_MethodFunc pFunc) {
void fpcLnIt_Queue(fpcLnIt_QueueFunc pFunc) {
method_filter filter;
filter.mpMethodFunc = pFunc;
filter.mpMethodFunc = (cNdIt_MethodFunc)pFunc;
filter.mpUserData = NULL;
cTrIt_Method(&lbl_804505D8, (cNdIt_MethodFunc)fpcLnIt_MethodCall, &filter);
}
+2 -2
View File
@@ -4,7 +4,7 @@
// g_fpcLn_Queue
extern node_lists_tree_class lbl_804505D8;
s32 fpcLnTg_Move(line_tag* pLineTag, s32 newLineListID) {
s32 fpcLnTg_Move(line_tag* pLineTag, int newLineListID) {
if (pLineTag->mLineListID != newLineListID) {
fpcLnTg_QueueTo(pLineTag);
return fpcLnTg_ToQueue(pLineTag, newLineListID);
@@ -18,7 +18,7 @@ void fpcLnTg_QueueTo(line_tag* pLineTag) {
pLineTag->mLineListID = -1;
}
s32 fpcLnTg_ToQueue(line_tag* pLineTag, s32 lineListID) {
s32 fpcLnTg_ToQueue(line_tag* pLineTag, int lineListID) {
s32 ret = cTg_AdditionToTree(&lbl_804505D8, lineListID, &pLineTag->mBase);
if (ret) {
+5 -5
View File
@@ -45,7 +45,7 @@ void fpcM_Draw(void* pProc) {
}
s32 fpcM_DrawIterater(fpcM_DrawIteraterFunc pFunc) {
return fpcLyIt_OnlyHere(fpcLy_RootLayer(), (cNdIt_MethodFunc)pFunc, NULL);
return fpcLyIt_OnlyHere(fpcLy_RootLayer(), (fpcLyIt_OnlyHereFunc)pFunc, NULL);
}
void fpcM_Execute(void* pProc) {
@@ -56,7 +56,7 @@ s32 fpcM_Delete(void* pProc) {
return fpcDt_Delete((base_process_class*)pProc);
}
BOOL fpcM_IsCreating(u32 pID) {
BOOL fpcM_IsCreating(unsigned int pID) {
return fpcCt_IsCreatingByID(pID);
}
@@ -85,8 +85,8 @@ void fpcM_Management(fpcM_ManagementFunc pFunc1, fpcM_ManagementFunc pFunc2) {
if (pFunc1) {
pFunc1();
}
fpcEx_Handler((cNdIt_MethodFunc)fpcM_Execute);
fpcDw_Handler((cNdIt_MethodFuncFunc)fpcM_DrawIterater, (cNdIt_MethodFunc)fpcM_Draw);
fpcEx_Handler((fpcLnIt_QueueFunc)fpcM_Execute);
fpcDw_Handler((fpcDw_HandlerFuncFunc)fpcM_DrawIterater, (fpcDw_HandlerFunc)fpcM_Draw);
if (pFunc2) {
pFunc2();
}
@@ -123,7 +123,7 @@ void fpcM_PauseDisable(void* pProc, u8 param_2) {
fpcPause_Disable((process_node_class*)pProc, param_2 & 0xFF);
}
void* fpcM_JudgeInLayer(u32 pLayerID, fpcCtIt_JudgeFunc pFunc, void* pUserData) {
void* fpcM_JudgeInLayer(unsigned int pLayerID, fpcCtIt_JudgeFunc pFunc, void* pUserData) {
layer_class* layer = fpcLy_Layer(pLayerID);
if (layer != NULL) {
void* ret = fpcCtIt_JudgeInLayer(pLayerID, pFunc, pUserData);
+2 -2
View File
@@ -1,6 +1,6 @@
#include "f/f_pc/f_pc_method_iter.h"
#include "dolphin/types.h"
void fpcMtdIt_Method(node_list_class* pList, cNdIt_MethodFunc pMethod) {
cLsIt_Method(pList, pMethod, NULL);
void fpcMtdIt_Method(node_list_class* pList, fpcMtdIt_MethodFunc pMethod) {
cLsIt_Method(pList, (cNdIt_MethodFunc)pMethod, NULL);
}
+3 -2
View File
@@ -26,7 +26,8 @@ s32 fpcPause_Enable(void* pProcess, u8 flag) {
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) {
process_node_class* pNode = (process_node_class*)pProc;
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Enable, (void*)(flag & 0xFF));
fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
(void*)(flag & 0xFF));
}
return 1;
}
@@ -37,7 +38,7 @@ s32 fpcPause_Disable(void* pProcess, u8 flag) {
if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->mSubType)) {
process_node_class* pNode = (process_node_class*)pProc;
fpcLyIt_OnlyHere(&pNode->mLayer, (cNdIt_MethodFunc)fpcPause_Disable, (void*)flag);
fpcLyIt_OnlyHere(&pNode->mLayer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)flag);
}
return 1;
+4 -3
View File
@@ -60,14 +60,14 @@ s32 fpcPi_Delete(process_priority_class* pPi) {
return 1;
}
s32 fpcPi_IsNormal(u32 layer, u16 listID, u16 priority) {
s32 fpcPi_IsNormal(unsigned int layer, u16 listID, u16 priority) {
if ((layer < 0xFFFFFFFE) && (listID < 0xFFFE) && (priority < 0xFFFE))
return 1;
return 0;
}
s32 fpcPi_Change(process_priority_class* pPi, u32 layer, u16 listID, u16 priority) {
s32 fpcPi_Change(process_priority_class* pPi, unsigned int layer, u16 listID, u16 priority) {
base_process_class* pProc = (base_process_class*)pPi->mBase.mpTagData;
BOOL changed = 0;
@@ -129,7 +129,8 @@ s32 fpcPi_Handler(void) {
return 1;
}
s32 fpcPi_Init(process_priority_class* pPi, void* pUserData, u32 layer, u16 listID, u16 priority) {
s32 fpcPi_Init(process_priority_class* pPi, void* pUserData, unsigned int layer, u16 listID,
u16 priority) {
if (!fpcPi_IsNormal(layer, listID, priority))
return 0;