summaryrefslogtreecommitdiff
path: root/src/f_pc
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2025-03-18 12:45:44 -0700
committerGitHub <noreply@github.com>2025-03-18 15:45:44 -0400
commitd3e9175bfb5ca4fce4633e473d8d8a3556c3d3ef (patch)
tree21a10894e590edebe9cd928a2fb48f4e8d061262 /src/f_pc
parent58ba86b6a3cfebe38b643b7ffecf72090a720db0 (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')
-rw-r--r--src/f_pc/f_pc_base.cpp35
-rw-r--r--src/f_pc/f_pc_create_req.cpp44
-rw-r--r--src/f_pc/f_pc_creator.cpp4
-rw-r--r--src/f_pc/f_pc_debug_sv.cpp858
-rw-r--r--src/f_pc/f_pc_delete_tag.cpp19
-rw-r--r--src/f_pc/f_pc_deletor.cpp37
-rw-r--r--src/f_pc/f_pc_executor.cpp33
-rw-r--r--src/f_pc/f_pc_layer.cpp37
-rw-r--r--src/f_pc/f_pc_layer_iter.cpp33
-rw-r--r--src/f_pc/f_pc_leaf.cpp15
-rw-r--r--src/f_pc/f_pc_line_tag.cpp4
-rw-r--r--src/f_pc/f_pc_load.cpp4
-rw-r--r--src/f_pc/f_pc_manager.cpp15
-rw-r--r--src/f_pc/f_pc_node.cpp20
-rw-r--r--src/f_pc/f_pc_node_req.cpp48
-rw-r--r--src/f_pc/f_pc_pause.cpp25
-rw-r--r--src/f_pc/f_pc_priority.cpp39
-rw-r--r--src/f_pc/f_pc_profile.cpp3
-rw-r--r--src/f_pc/f_pc_searcher.cpp6
-rw-r--r--src/f_pc/f_pc_stdcreate_req.cpp41
20 files changed, 1182 insertions, 138 deletions
diff --git a/src/f_pc/f_pc_base.cpp b/src/f_pc/f_pc_base.cpp
index 68fba36923..c94a072977 100644
--- a/src/f_pc/f_pc_base.cpp
+++ b/src/f_pc/f_pc_base.cpp
@@ -11,10 +11,19 @@
#include "f_pc/f_pc_method.h"
#include "f_pc/f_pc_pause.h"
#include "f_pc/f_pc_profile.h"
+#include "f_pc/f_pc_debug_sv.h"
+
+#if VERSION == VERSION_SHIELD_DEBUG
+#include "Z2AudioLib/Z2AudioMgr.h"
+#endif
/* 8002064C-8002065C 0010+00 s=0 e=14 z=0 None .text fpcBs_Is_JustOfType__Fii */
BOOL fpcBs_Is_JustOfType(int i_typeA, int i_typeB) {
- return i_typeB == i_typeA ? TRUE : FALSE;
+ if (i_typeB == i_typeA) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80450D00-80450D04 0004+00 s=1 e=0 z=0 None .sbss g_fpcBs_type */
@@ -37,13 +46,27 @@ int fpcBs_MakeOfId() {
/* 800206C4-80020720 005C+00 s=0 e=1 z=0 None .text fpcBs_Execute__FP18base_process_class */
int fpcBs_Execute(base_process_class* i_proc) {
- int result;
- layer_class* save_layer = fpcLy_CurrentLayer();
+ int result = 1;
+
+#ifdef DEBUG
+ if (!fpcBs_Is_JustOfType(g_fpcBs_type, i_proc->type)) {
+ if (g_fpcDbSv_service[10] != NULL) {
+ g_fpcDbSv_service[10](i_proc);
+ }
+
+ return 0;
+ }
+#endif
- fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
- result = fpcMtd_Execute(i_proc->methods, i_proc);
+ if (result == 1) {
+ layer_class* save_layer = fpcLy_CurrentLayer();
- fpcLy_SetCurrentLayer(save_layer);
+ fpcLy_SetCurrentLayer(i_proc->layer_tag.layer);
+ result = fpcMtd_Execute(i_proc->methods, i_proc);
+
+ fpcLy_SetCurrentLayer(save_layer);
+ }
+
return result;
}
diff --git a/src/f_pc/f_pc_create_req.cpp b/src/f_pc/f_pc_create_req.cpp
index f434511f3e..d2b5e8f45f 100644
--- a/src/f_pc/f_pc_create_req.cpp
+++ b/src/f_pc/f_pc_create_req.cpp
@@ -10,17 +10,26 @@
#include "f_pc/f_pc_deletor.h"
#include "f_pc/f_pc_executor.h"
#include "f_pc/f_pc_layer.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 80020ACC-80020AE8 001C+00 s=1 e=0 z=0 None .text fpcCtRq_isCreatingByID__FP10create_tagPUi
*/
-bool fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id) {
+BOOL fpcCtRq_isCreatingByID(create_tag* i_createTag, fpc_ProcID* i_id) {
create_request* req = (create_request*)i_createTag->base.mpTagData;
- return req->id == *i_id;
+ if (req->id == *i_id) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80020AE8-80020B20 0038+00 s=0 e=2 z=0 None .text fpcCtRq_IsCreatingByID__FUi */
BOOL fpcCtRq_IsCreatingByID(fpc_ProcID i_id) {
- return fpcCtIt_Judge((fpcLyIt_JudgeFunc)fpcCtRq_isCreatingByID, &i_id) != NULL ? TRUE : FALSE;
+ if (fpcCtIt_Judge((fpcLyIt_JudgeFunc)fpcCtRq_isCreatingByID, &i_id) != NULL) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80020B20-80020B5C 003C+00 s=1 e=0 z=0 None .text fpcCtRq_CreateQTo__FP14create_request */
@@ -54,12 +63,10 @@ BOOL fpcCtRq_Delete(create_request* i_request) {
/* 80020C14-80020CAC 0098+00 s=2 e=2 z=0 None .text fpcCtRq_Cancel__FP14create_request */
BOOL fpcCtRq_Cancel(create_request* i_request) {
- base_process_class* pproc;
if (i_request != NULL && !i_request->is_cancel) {
i_request->is_cancel = TRUE;
- pproc = i_request->process;
- if (pproc != NULL && !fpcDt_Delete(pproc))
+ if (i_request->process != NULL && !fpcDt_Delete(i_request->process))
return FALSE;
if (i_request->methods != NULL && !fpcMtd_Method(i_request->methods->cancel_method, i_request))
@@ -84,8 +91,9 @@ BOOL fpcCtRq_Do(create_request* i_request) {
int phase = cPhs_COMPLEATE_e;
if (i_request->methods != NULL) {
- cPhs__Handler pHandler = i_request->methods->phase_handler;
- if (pHandler != NULL) {
+ if (i_request->methods->phase_handler != NULL) {
+ cPhs__Handler pHandler = i_request->methods->phase_handler;
+
i_request->is_doing = TRUE;
phase = pHandler(i_request);
i_request->is_doing = FALSE;
@@ -94,14 +102,18 @@ BOOL fpcCtRq_Do(create_request* i_request) {
switch (phase) {
case cPhs_COMPLEATE_e: {
- int success = fpcEx_ToExecuteQ(i_request->process);
- if (success == 0)
+ if (fpcEx_ToExecuteQ(i_request->process) == 0)
return fpcCtRq_Cancel(i_request);
else
return fpcCtRq_Delete(i_request);
}
case cPhs_UNK3_e:
case cPhs_ERROR_e:
+#ifdef DEBUG
+ if (g_fpcDbSv_service[2] != NULL) {
+ g_fpcDbSv_service[2](i_request->process);
+ }
+#endif
return fpcCtRq_Cancel(i_request);
}
@@ -109,8 +121,13 @@ BOOL fpcCtRq_Do(create_request* i_request) {
}
/* 80020D84-80020DB0 002C+00 s=0 e=1 z=0 None .text fpcCtRq_Handler__Fv */
-void fpcCtRq_Handler() {
- fpcCtIt_Method((fpcCtIt_MethodFunc)fpcCtRq_Do, NULL);
+int fpcCtRq_Handler() {
+#ifdef DEBUG
+ if (g_fpcDbSv_service[3] != NULL) {
+ g_fpcDbSv_service[3](&g_fpcCtTg_Queue.mSize);
+ }
+#endif
+ return fpcCtIt_Method((fpcCtIt_MethodFunc)fpcCtRq_Do, NULL);
}
/* 80020DB0-80020E38 0088+00 s=0 e=2 z=0 None .text
@@ -119,7 +136,8 @@ create_request* fpcCtRq_Create(layer_class* i_layer, u32 i_size, create_request_
create_request* req = (create_request*)cMl::memalignB(-4, i_size);
if (req != NULL) {
- fpcCtTg_Init(&req->base, req);
+ create_tag* tag = &req->base;
+ fpcCtTg_Init(tag, req);
fpcMtdTg_Init(&req->method_tag, (process_method_tag_func)fpcCtRq_Cancel, req);
req->layer = i_layer;
req->methods = i_methods;
diff --git a/src/f_pc/f_pc_creator.cpp b/src/f_pc/f_pc_creator.cpp
index c8508d3bd8..1aadd9aff1 100644
--- a/src/f_pc/f_pc_creator.cpp
+++ b/src/f_pc/f_pc_creator.cpp
@@ -23,6 +23,6 @@ BOOL fpcCt_Abort(base_process_class* i_proc) {
}
/* 80020F10-80020F30 0020+00 s=0 e=1 z=0 None .text fpcCt_Handler__Fv */
-void fpcCt_Handler() {
- fpcCtRq_Handler();
+int fpcCt_Handler() {
+ return fpcCtRq_Handler();
}
diff --git a/src/f_pc/f_pc_debug_sv.cpp b/src/f_pc/f_pc_debug_sv.cpp
new file mode 100644
index 0000000000..94250ad66e
--- /dev/null
+++ b/src/f_pc/f_pc_debug_sv.cpp
@@ -0,0 +1,858 @@
+#ifdef DEBUG
+
+#include "f_pc/f_pc_base.h"
+#include "f_pc/f_pc_debug_sv.h"
+
+int fpcBs_pc_c__print(base_process_class* i_process) {
+ return 0;
+}
+
+void fpcBs_pc_c__fpcDbSv_callbackXX(void* i_process, char* arg1) {
+ arg1;
+ fpcBs_pc_c__print((base_process_class*)i_process);
+}
+
+void fpcBs_pc_c__fpcDbSv_callback00(void* i_process) {
+ // "Waiting for creation"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "生成待ち");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback02(void* i_process) {
+ // "Creation error"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "生成エラー");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback10(void* i_process) {
+ // "Deletion Retry"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "削除のリトライ");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback11(void* i_process) {
+ // "Deletion Denied"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "削除の拒否");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback20(void* i_process) {
+ // "Waiting for old Scene deletion"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "旧シーン削除待");
+}
+
+void fpcBs_pc_c__fpcDbSv_callback21(void* i_process) {
+ // "Waiting for Scene creation"
+ fpcBs_pc_c__fpcDbSv_callbackXX((base_process_class*)i_process, "シーン生成待ち");
+}
+
+const fpcDbSv_callback g_fpcDbSv_service[50] = {
+ fpcBs_pc_c__fpcDbSv_callback00,
+ NULL,
+ fpcBs_pc_c__fpcDbSv_callback02,
+ NULL,
+ fpcBs_pc_c__fpcDbSv_callback10,
+ fpcBs_pc_c__fpcDbSv_callback11,
+ NULL,
+ fpcBs_pc_c__fpcDbSv_callback20,
+ fpcBs_pc_c__fpcDbSv_callback21,
+};
+
+char* fpcDbSv_getNameString(s16 i_name) {
+ static char* namelist[] = {
+ "OVERLAP0",
+ "OVERLAP1",
+ "OVERLAP3",
+ "OVERLAP6",
+ "OVERLAP7",
+ "OVERLAP8",
+ "OVERLAP9",
+ "OVERLAP10",
+ "OVERLAP11",
+ "LOGO_SCENE",
+ "MENU_SCENE",
+ "PLAY_SCENE",
+ "OPENING_SCENE",
+ "NAME_SCENE",
+ "NAMEEX_SCENE",
+ "WARNING_SCENE",
+ "WARNING2_SCENE",
+ "OVERLAP2",
+ "ROOM_SCENE",
+ "KANKYO",
+ "ALLDIE",
+ "ENVSE",
+ "Obj_Swpush",
+ "Obj_Swpush2",
+ "Obj_Swpush5",
+ "Tag_Gstart",
+ "NO_CHG_ROOM",
+ "Obj_Lv6ElevtA",
+ "OBJ_SO",
+ "Obj_Movebox",
+ "Obj_SwTurn",
+ "Obj_Lv6SwTurn",
+ "OBJ_SEKIZOA",
+ "OBJ_GRA",
+ "TAG_GRA",
+ "TAG_YAMI",
+ "Obj_Ladder",
+ "OBJ_BEF",
+ "OBJ_FMOBJ",
+ "OBJ_LBOX",
+ "OBJ_WEB0",
+ "OBJ_WEB1",
+ "OBJ_CB",
+ "OBJ_MAKI",
+ "OBJ_BRG",
+ "OBJ_GB",
+ "OBJ_GM",
+ "OBJ_TOBY",
+ "OBJ_TP",
+ "TREESH",
+ "Obj_ZDoor",
+ "Obj_Pillar",
+ "Obj_Cdoor",
+ "GRDWATER",
+ "Obj_RotBridge",
+ "Obj_MagLift",
+ "Obj_MagLiftRot",
+ "Obj_Lv1Cdl00",
+ "Obj_Lv1Cdl01",
+ "Obj_TvCdlst",
+ "Obj_HsTarget",
+ "Obj_HeavySw",
+ "Obj_GoGate",
+ "Obj_TaFence",
+ "Obj_Saidan",
+ "Obj_SpinLift",
+ "Obj_BmWindow",
+ "Obj_RfHole",
+ "Obj_WaterPillar",
+ "Obj_SyRock",
+ "Obj_BsGate",
+ "Obj_AmiShutter",
+ "Obj_WtGate",
+ "Obj_Lv2Candle",
+ "Obj_TogeTrap",
+ "Obj_RotTrap",
+ "Obj_SwallShutter",
+ "Obj_IceWall",
+ "Obj_Lv5SwIce",
+ "Obj_Lv5FBoard",
+ "Obj_Turara",
+ "Obj_TwGate",
+ "Obj_Digholl",
+ "Obj_Digpl",
+ "Obj_TestCube",
+ "Obj_Kshutter",
+ "NPC_COACH",
+ "NPC_THEB",
+ "COACH_FIRE",
+ "COACH2D",
+ "BALLOON2D",
+ "SKIP2D",
+ "Obj_MvStair",
+ "Obj_Cowdoor",
+ "Obj_Swpropeller",
+ "Obj_BoomShutter",
+ "NPC_KS",
+ "Obj_Hfuta",
+ "Obj_BkDoor",
+ "Obj_Cboard",
+ "Obj_MGate",
+ "Obj_Ikada",
+ "Obj_Ice_l",
+ "Obj_Ice_s",
+ "Obj_E_CREATE",
+ "Obj_Bhbridge",
+ "Obj_Kaisou",
+ "Obj_HHASHI",
+ "Obj_BHASHI",
+ "OCTHASHI",
+ "Obj_THASHI",
+ "Obj_CRVGATE",
+ "Obj_CRVFENCE",
+ "Obj_CRVHAHEN",
+ "Obj_CRVSTEEL",
+ "Obj_CRVLH_UP",
+ "Obj_CRVLH_DW",
+ "Obj_RIVERROCK",
+ "Obj_DUST",
+ "Obj_ITA",
+ "Obj_Window",
+ "Obj_MetalBox",
+ "Obj_BBox",
+ "OBJ_MSIMA",
+ "OBJ_MYOGAN",
+ "B_ZANTS",
+ "Obj_ChainBlock",
+ "Obj_ChainWall",
+ "Obj_KkrGate",
+ "Obj_RiderGate",
+ "Obj_Onsen",
+ "Obj_Chest",
+ "Obj_Bemos",
+ "Obj_RopeBridge",
+ "Obj_WellCover",
+ "Obj_GraveStone",
+ "Obj_ZraRock",
+ "Obj_GraRock",
+ "Obj_GrzRock",
+ "GRA_WALL",
+ "OBJ_ONSEN_FIRE",
+ "Obj_Lv6bemos",
+ "Obj_Lv6bemos2",
+ "Obj_BarDesk",
+ "Obj_DigSnow",
+ "Obj_Ytaihou",
+ "Obj_Elevator",
+ "Obj_Lv6TogeRoll",
+ "Obj_Lv6TogeTrap",
+ "Obj_Lv6Tenbin",
+ "Obj_Lv6SwGate",
+ "Obj_Lv6Lblock",
+ "Obj_Lv6ChgGate",
+ "Obj_Lv6FuriTrap",
+ "Obj_Lv6SzGate",
+ "Obj_Lv4EdShutter",
+ "Obj_Lv4Gate",
+ "Obj_Lv4PoGate",
+ "Obj_Lv4SlideWall",
+ "Obj_Lv4HsTarget",
+ "Obj_Lv7PropY",
+ "Obj_Lv7BsGate",
+ "Obj_Lv8OptiLift",
+ "Obj_Lv8KekkaiTrap",
+ "Obj_Lv8Lift",
+ "Obj_Lv8UdFloor",
+ "Obj_Lv9SwShutter",
+ "Obj_TobyHouse",
+ "Obj_poCandle",
+ "Obj_Lv4DigSand",
+ "Obj_FallObj",
+ "Obj_SmgDoor",
+ "Obj_SwLight",
+ "Obj_Avalanche",
+ "Obj_MirrorScrew",
+ "Obj_MirrorSand",
+ "Obj_MirrorTable",
+ "Obj_MirrorChain",
+ "Obj_Mirror6Pole",
+ "Obj_SwSpinner",
+ "Obj_TDoor",
+ "Obj_Lv7Bridge",
+ "Obj_zrTurara",
+ "Obj_TakaraDai",
+ "Obj_Table",
+ "Obj_CatDoor",
+ "Obj_Gake",
+ "CSTAF",
+ "Obj_Lv4RailWall",
+ "Obj_Lv4Sand",
+ "Obj_PushDoor",
+ "PushDoor",
+ "Obj_GanonWall2",
+ "Obj_Lv4Bridge",
+ "Obj_Lv4Floor",
+ "Tag_Spinner",
+ "Obj_SwHang",
+ "Obj_RotStair",
+ "Obj_MagneArm",
+ "Obj_KWheel00",
+ "Obj_KWheel01",
+ "Obj_Ychndlr",
+ "Obj_PRElvtr",
+ "Obj_MHasu",
+ "Obj_YIblltray",
+ "Obj_Lv6EGate",
+ "Obj_PDtile",
+ "Obj_PDwall",
+ "Obj_Lv4PRwall",
+ "Obj_KLift00",
+ "B_OH",
+ "Obj_Lv4Chan",
+ "Obj_Lv3R10Saka",
+ "Obj_Lv3Water",
+ "Obj_Lv3Water2",
+ "OBJ_LV3WATERB",
+ "Obj_HBombkoya",
+ "Obj_SZbridge",
+ "Obj_KakarikoBrg",
+ "Obj_OrdinBrg",
+ "Obj_BurnBox",
+ "Obj_KJgjs",
+ "OBJ_IHASI",
+ "Obj_IceBlock",
+ "Obj_VolcanicBall",
+ "Obj_VolcanicBomb",
+ "Obj_VolcGnd",
+ "Obj_KKanban",
+ "E_PH",
+ "NPC_ZRA",
+ "Obj_Chandelier",
+ "Obj_Stopper2",
+ "DOOR20",
+ "Tag_Hinit",
+ "Tag_Hjump",
+ "Tag_AJnot",
+ "Tag_Hstop",
+ "CANOE",
+ "HORSE",
+ "E_WB",
+ "OBJ_ITO",
+ "OBJ_SW",
+ "SPINNER",
+ "B_OB",
+ "KAGO",
+ "E_YC",
+ "B_DS",
+ "B_DR",
+ "B_ZANTZ",
+ "B_ZANT",
+ "B_ZANTM",
+ "TBOX",
+ "TBOX2",
+ "ALINK",
+ "BOOMERANG",
+ "MIDNA",
+ "NPC_TK",
+ "NPC_WORM",
+ "PPolamp",
+ "BkyRock",
+ "HITOBJ",
+ "EP",
+ "COW",
+ "PERU",
+ "NI",
+ "NPC_TKJ2",
+ "SQ",
+ "NPC_SQ",
+ "DO",
+ "NPC_NE",
+ "NPC_TR",
+ "NPC_LF",
+ "OBJ_FOOD",
+ "OBJ_KI",
+ "OBJ_KITA",
+ "OBJ_KEY",
+ "OBJ_KEYHOLE",
+ "Obj_Lv5Key",
+ "OBJ_LP",
+ "OBJ_TATIGI",
+ "OBJ_ROCK",
+ "OBJ_WFLAG",
+ "OBJ_KAGE",
+ "OBJ_KANBAN2",
+ "OBJ_BALLOON",
+ "OBJ_SUISYA",
+ "OBJ_OILTUBO",
+ "OBJ_ROTEN",
+ "OBJ_SSDRINK",
+ "OBJ_SSITEM",
+ "TAG_SSDRINK",
+ "TAG_BTLITM",
+ "TAG_LV5SOUP",
+ "TAG_MNLIGHT",
+ "TAG_SHOPCAM",
+ "TAG_SHOPITM",
+ "OBJ_NDOOR",
+ "OBJ_UDOOR",
+ "OBJ_USAKU",
+ "Obj_SM_DOOR",
+ "OBJ_BED",
+ "OBJ_BOUMATO",
+ "OBJ_ITAMATO",
+ "OBJ_NOUGU",
+ "OBJ_STICK",
+ "OBJ_MIE",
+ "OBJ_SEKIDOOR",
+ "OBJ_SEKIZO",
+ "OBJ_SMTILE",
+ "NPC_FISH",
+ "MG_FISH",
+ "FSHOP",
+ "NPC_DU",
+ "DISAPPEAR",
+ "Obj_Mato",
+ "Obj_Flag",
+ "Obj_Flag2",
+ "Obj_Flag3",
+ "Obj_GOMIKABE",
+ "Obj_Yousei",
+ "Obj_Kabuto",
+ "Obj_Cho",
+ "Obj_Kuw",
+ "Obj_Nan",
+ "Obj_Dan",
+ "Obj_Kam",
+ "Obj_Ten",
+ "Obj_Ari",
+ "Obj_Kag",
+ "Obj_Batta",
+ "Obj_Tombo",
+ "Obj_Kat",
+ "Obj_H_Saku",
+ "Obj_Yobikusa",
+ "Obj_KazeNeko",
+ "Obj_KznkArm",
+ "Obj_NamePlate",
+ "Obj_OnCloth",
+ "Obj_LndRope",
+ "Obj_ItaRope",
+ "Obj_Sakuita",
+ "Obj_Laundry",
+ "WarpBug",
+ "Izumi_Gate",
+ "Obj_Fchain",
+ "Obj_Wchain",
+ "Tag_Attp",
+ "Obj_Tornado",
+ "Obj_Tornado2",
+ "Obj_FirePillar",
+ "Obj_FirePillar2",
+ "Obj_InoBone",
+ "Obj_Stopper",
+ "Obj_MHole",
+ "Tag_Magne",
+ "Obj_BossWarp",
+ "Obj_WoodPendulum",
+ "Obj_WdStick",
+ "Obj_StairBlock",
+ "Obj_Geyser",
+ "Tag_KtOnFire",
+ "Obj_FireWood",
+ "Obj_FireWood2",
+ "Obj_GpTaru",
+ "Obj_OnsenTaru",
+ "Obj_KiPot",
+ "TBOX_SW",
+ "Obj_SwChain",
+ "Obj_WoodenSword",
+ "Obj_StoneMark",
+ "Obj_Lv3Candle",
+ "Tag_Lv4Candle",
+ "Tag_Lv4CandleDm",
+ "Obj_DamCps",
+ "Obj_Smoke",
+ "Obj_WaterFall",
+ "Obj_ZoraCloth",
+ "Obj_poFire",
+ "Tag_poFire",
+ "Obj_glowSphere",
+ "Tag_LightBall",
+ "SwLBall",
+ "SwBall",
+ "Obj_WaterEff",
+ "Tag_RiverBack",
+ "Tag_KagoFall",
+ "Tag_Lv2PrChk",
+ "Obj_Lv4Gear",
+ "Obj_MasterSword",
+ "Obj_WoodStatue",
+ "Obj_Fan",
+ "Obj_IceLeaf",
+ "Obj_zrTuraraRc",
+ "Tag_RetRoom",
+ "Obj_WindStone",
+ "Tag_WaraHowl",
+ "Obj_SCannon",
+ "Obj_SmWStone",
+ "Obj_SCannonCrs",
+ "Tag_SnowEff",
+ "Tag_CstaSw",
+ "Tag_Lv6CstaSw",
+ "Obj_awaPlar",
+ "Obj_poTbox",
+ "Obj_TimeFire",
+ "Obj_TMoon",
+ "Obj_GanonWall",
+ "Obj_Prop",
+ "CSTATUE",
+ "Obj_SwBallA",
+ "Obj_SwBallB",
+ "Obj_SnowSoup",
+ "Obj_Nagaisu",
+ "Obj_RCircle",
+ "Obj_Picture",
+ "Tag_SetBall",
+ "Tag_SmkEmt",
+ "SwTime",
+ "Obj_HFtr",
+ "Obj_HBarrel",
+ "Obj_Crystal",
+ "Obj_SCannonTen",
+ "Obj_SwBallC",
+ "SCENE_EXIT2",
+ "Obj_Hata",
+ "Obj_ToaruMaki",
+ "Tag_AttackItem",
+ "Tag_RmbitSw",
+ "Obj_Sword",
+ "Tag_Spring",
+ "Tag_Statue",
+ "E_AI",
+ "E_GS",
+ "E_GOB",
+ "E_DD",
+ "E_DN",
+ "E_S1",
+ "E_MF",
+ "E_SG",
+ "E_BS",
+ "E_SF",
+ "E_SH",
+ "E_DF",
+ "E_GM",
+ "E_MD",
+ "E_SM",
+ "E_SM2",
+ "E_ST",
+ "E_ST_LINE",
+ "E_SB",
+ "E_TH",
+ "E_CR",
+ "E_CR_EGG",
+ "E_DB",
+ "E_DB_LEAF",
+ "E_GA",
+ "E_GB",
+ "E_HB",
+ "E_HB_LEAF",
+ "E_HZELDA",
+ "E_YD",
+ "E_YH",
+ "E_YD_LEAF",
+ "E_HM",
+ "E_TK",
+ "E_TK2",
+ "E_TK_BALL",
+ "E_RB",
+ "E_RD",
+ "E_RDB",
+ "E_RDY",
+ "E_FM",
+ "E_FS",
+ "E_PM",
+ "E_PO",
+ "E_MB",
+ "E_MK",
+ "E_MM",
+ "E_FZ",
+ "E_ZS",
+ "E_KK",
+ "E_HP",
+ "E_ZH",
+ "E_ZM",
+ "E_PZ",
+ "E_FB",
+ "E_FK",
+ "E_MS",
+ "E_NEST",
+ "E_NZ",
+ "E_BA",
+ "E_BU",
+ "E_BUG",
+ "E_BEE",
+ "E_IS",
+ "E_KG",
+ "E_KR",
+ "E_SW",
+ "E_GE",
+ "Tag_WatchGe",
+ "E_YM",
+ "E_YM_TAG",
+ "E_YMB",
+ "Tag_FWall",
+ "Tag_WaterFall",
+ "E_YK",
+ "E_YR",
+ "E_YG",
+ "E_HZ",
+ "E_WS",
+ "E_OC",
+ "E_OT",
+ "E_DT",
+ "E_BG",
+ "E_OctBg",
+ "DR",
+ "L7lowDr",
+ "L7ODR",
+ "E_TT",
+ "E_DK",
+ "E_VT",
+ "E_WW",
+ "E_GI",
+ "B_BH",
+ "B_BQ",
+ "B_GM",
+ "B_GND",
+ "B_GO",
+ "B_OH2",
+ "B_YO",
+ "B_YOI",
+ "B_TN",
+ "B_GG",
+ "B_DRE",
+ "B_MGN",
+ "E_WAP",
+ "ITEM",
+ "Obj_SmallKey",
+ "Obj_Kantera",
+ "Obj_LifeContainer",
+ "Obj_Shield",
+ "Demo_Item",
+ "ShopItem",
+ "Obj_Drop",
+ "OBJ_RW",
+ "NBOMB",
+ "TAG_CSW",
+ "TAG_QS",
+ "HOZELDA",
+ "SWC00",
+ "KNOB20",
+ "DBDOOR",
+ "BOSS_DOOR",
+ "L1BOSS_DOOR",
+ "L1MBOSS_DOOR",
+ "L5BOSS_DOOR",
+ "DSHUTTER",
+ "SPIRAL_DOOR",
+ "Tag_ChgRestart",
+ "Tag_Restart",
+ "ANDSW",
+ "ANDSW2",
+ "MYNA",
+ "NPC_GND",
+ "NPC_GRA",
+ "NPC_GRC",
+ "NPC_GRD",
+ "NPC_GRM",
+ "NPC_GRMC",
+ "NPC_GRO",
+ "NPC_GRR",
+ "NPC_GRS",
+ "NPC_GRZ",
+ "NPC_YAMID",
+ "NPC_YAMIT",
+ "NPC_YAMIS",
+ "NPC_BLUENS",
+ "NPC_KAKASHI",
+ "NPC_KDK",
+ "NPC_ARU",
+ "NPC_BANS",
+ "NPC_BESU",
+ "NPC_BOU",
+ "NPC_BOU_S",
+ "NPC_CLERKA",
+ "NPC_CLERKB",
+ "NPC_CLERKT",
+ "NPC_WRESTLER",
+ "Tag_Arena",
+ "Tag_Instruction",
+ "NPC_DOC",
+ "NPC_GWOLF",
+ "NPC_LEN",
+ "NPC_LUD",
+ "NPC_FAIRY_SEIREI",
+ "NPC_FAIRY",
+ "NPC_HANJO",
+ "NPC_HENNA",
+ "NPC_HENNA0",
+ "NPC_HOZ",
+ "NPC_JAGAR",
+ "NPC_KKRI",
+ "NPC_KN",
+ "KN_BULLET",
+ "NPC_KNJ",
+ "NPC_KOLIN",
+ "NPC_KOLINB",
+ "NPC_KYURY",
+ "NPC_MARO",
+ "NPC_MIDP",
+ "NPC_MOI",
+ "NPC_RACA",
+ "NPC_SARU",
+ "NPC_SEIB",
+ "NPC_SEIC",
+ "NPC_SEID",
+ "NPC_SEIRA",
+ "NPC_SERA2",
+ "NPC_SEIREI",
+ "NPC_SHAMAN",
+ "NPC_SMARO",
+ "NPC_SOLA",
+ "NPC_TARO",
+ "NPC_PACHI_BESU",
+ "NPC_PACHI_TARO",
+ "NPC_PACHI_MARO",
+ "TAG_PATI",
+ "NPC_THE",
+ "NPC_TKJ",
+ "NPC_TKS",
+ "NPC_TKC",
+ "OBJ_TKS",
+ "NPC_TOBY",
+ "NPC_URI",
+ "NPC_YELIA",
+ "NPC_YKM",
+ "NPC_YKW",
+ "NPC_ZANB",
+ "NPC_ZANT",
+ "NPC_ZELDA",
+ "NPC_ZELR",
+ "NPC_ZELRO",
+ "OBJ_ZRAFREEZE",
+ "NPC_ZRC",
+ "NPC_ZRZ",
+ "ZRA_MARK",
+ "MYNA2",
+ "TAG_MYNA2",
+ "NPC_CD3",
+ "Tag_Schedule",
+ "Tag_Escape",
+ "NPC_CHAT",
+ "NPC_SOLDIERa",
+ "NPC_SOLDIERb",
+ "PASSER_MNG",
+ "NPC_PASSER",
+ "NPC_PASSER2",
+ "NPC_POST",
+ "NPC_POUYA",
+ "FORMATION_MNG",
+ "NPC_FGUARD",
+ "GUARD_MNG",
+ "TAG_GUARD",
+ "NPC_GUARD",
+ "NPC_ASH",
+ "NPC_ASHB",
+ "NPC_SHAD",
+ "NPC_RAFREL",
+ "NPC_MOIR",
+ "NPC_IMPAL",
+ "NPC_SHOE",
+ "NPC_DOORBOY",
+ "NPC_PRAYER",
+ "NPC_KASIHANA",
+ "NPC_KASIKYU",
+ "NPC_KASIMICH",
+ "NPC_DRSOL",
+ "NPC_CHIN",
+ "NPC_INS",
+ "NPC_SHOP0",
+ "NPC_MK",
+ "NPC_P2",
+ "KYTAG00",
+ "KYTAG01",
+ "KYTAG02",
+ "KYTAG03",
+ "KYTAG04",
+ "KYTAG05",
+ "KYTAG06",
+ "KYTAG07",
+ "KYTAG08",
+ "KYTAG09",
+ "KYTAG10",
+ "KYTAG11",
+ "KYTAG12",
+ "KYTAG13",
+ "KYTAG14",
+ "KYTAG15",
+ "KYTAG16",
+ "KYTAG17",
+ "Ykgr",
+ "TALK",
+ "Obj_Crope",
+ "Obj_Bombf",
+ "Obj_BkLeaf",
+ "Tag_Mhint",
+ "Tag_Mmsg",
+ "Tag_Mwait",
+ "Tag_Mstop",
+ "Tag_Stream",
+ "Tag_Sppath",
+ "Tag_Wljump",
+ "Tag_TWGate",
+ "Tag_Lv6Gate",
+ "Tag_Lv7Gate",
+ "Tag_Lv8Gate",
+ "Tag_TheBHint",
+ "Tag_Assist",
+ "DEMO00",
+ "TAG_CAMERA",
+ "TAG_CHKPOINT",
+ "TAG_EVENT",
+ "TAG_EVT",
+ "TAG_TELOP",
+ "TAG_HOWL",
+ "TAG_MSG",
+ "TAG_LANTERN",
+ "Tag_Mist",
+ "DMIDNA",
+ "KY_THUNDER",
+ "VRBOX",
+ "VRBOX2",
+ "BG",
+ "SET_BG_OBJ",
+ "BG_OBJ",
+ "MIRROR",
+ "MOVIE_PLAYER",
+ "TITLE",
+ "FR",
+ "ECONT",
+ "MG_ROD",
+ "E_ARROW",
+ "BULLET",
+ "SWHIT0",
+ "E_TH_BALL",
+ "TAG_EVTAREA",
+ "TAG_EVTMSG",
+ "TAG_KMSG",
+ "TAG_PUSH",
+ "E_MK_BO",
+ "E_MM_MT",
+ "OBJ_KBOX",
+ "OBJ_FW",
+ "B_GOS",
+ "OBJ_YSTONE",
+ "MANT",
+ "CROD",
+ "OBJ_PLEAF",
+ "OBJ_KBACKET",
+ "OBJ_YBAG",
+ "OBJ_PUMPKIN",
+ "OBJ_AUTOMATA",
+ "OBJ_GADGET",
+ "OBJ_KAGO",
+ "Obj_Carry",
+ "Obj_Stone",
+ "OBJ_HB",
+ "NPC_INKO",
+ "BD",
+ "Obj_Eff",
+ "WPILLAR",
+ "WMARK",
+ "E_BI",
+ "E_BI_LEAF",
+ "START_AND_GOAL",
+ "NPC_DF",
+ "ARROW",
+ "PATH_LINE",
+ "TAG_ALLMATO",
+ "Obj_Timer",
+ "SCENE_EXIT",
+ "CAMERA",
+ "CAMERA2",
+ "SUSPEND",
+ "GRASS",
+ "KYEFF",
+ "KYEFF2",
+ "MSG_OBJECT",
+ "MENUWINDOW",
+ "TIMER",
+ "METER2",
+ "GAMEOVER",
+ "DUMMY",
+ NULL,
+ };
+
+ return namelist[i_name];
+}
+
+#endif
diff --git a/src/f_pc/f_pc_delete_tag.cpp b/src/f_pc/f_pc_delete_tag.cpp
index 6e4b91f584..6fc016bac5 100644
--- a/src/f_pc/f_pc_delete_tag.cpp
+++ b/src/f_pc/f_pc_delete_tag.cpp
@@ -5,13 +5,18 @@
#include "SSystem/SComponent/c_list.h"
#include "f_pc/f_pc_delete_tag.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 803A39A0-803A39B0 000C+04 s=2 e=1 z=0 None .data g_fpcDtTg_Queue */
node_list_class g_fpcDtTg_Queue = {NULL, NULL, 0};
/* 80020F30-80020F48 0018+00 s=0 e=1 z=0 None .text fpcDtTg_IsEmpty__Fv */
BOOL fpcDtTg_IsEmpty() {
- return g_fpcDtTg_Queue.mSize == 0 ? TRUE : FALSE;
+ if (g_fpcDtTg_Queue.mSize == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 80020F48-80020F7C 0034+00 s=1 e=1 z=0 None .text fpcDtTg_ToDeleteQ__FP16delete_tag_class */
@@ -28,12 +33,18 @@ void fpcDtTg_DeleteQTo(delete_tag_class* i_deleteTag) {
/* 80020F9C-8002101C 0080+00 s=0 e=1 z=0 None .text fpcDtTg_Do__FP16delete_tag_classPFPv_i */
s32 fpcDtTg_Do(delete_tag_class* i_deleteTag, delete_tag_func i_func) {
if (i_deleteTag->timer <= 0) {
- s32 ret;
fpcDtTg_DeleteQTo(i_deleteTag);
- ret = i_func(i_deleteTag->base.mpTagData);
- if (ret == 0) {
+ if (i_func(i_deleteTag->base.mpTagData) == 0) {
fpcDtTg_ToDeleteQ(i_deleteTag);
+#ifdef DEBUG
+ if (i_deleteTag->unk_0x1c-- <= 0) {
+ i_deleteTag->unk_0x1c = 0;
+ if (g_fpcDbSv_service[4] != NULL) {
+ g_fpcDbSv_service[4](i_deleteTag->base.mpTagData);
+ }
+ }
+#endif
return 0;
} else {
return 1;
diff --git a/src/f_pc/f_pc_deletor.cpp b/src/f_pc/f_pc_deletor.cpp
index 1f66d6abb0..e365371927 100644
--- a/src/f_pc/f_pc_deletor.cpp
+++ b/src/f_pc/f_pc_deletor.cpp
@@ -9,6 +9,7 @@
#include "f_pc/f_pc_executor.h"
#include "f_pc/f_pc_load.h"
#include "f_pc/f_pc_node.h"
+#include "f_pc/f_pc_debug_sv.h"
#include "JSystem/JUtility/JUTAssert.h"
/* 80021040-80021060 0020+00 s=0 e=1 z=0 None .text fpcDt_IsComplete__Fv */
@@ -19,6 +20,7 @@ BOOL fpcDt_IsComplete() {
/* 80021060-800210D4 0074+00 s=1 e=0 z=0 None .text fpcDt_deleteMethod__FP18base_process_class
*/
s32 fpcDt_deleteMethod(base_process_class* i_proc) {
+ fpc_ProcID id = i_proc->id;
layer_class* layer = i_proc->delete_tag.layer;
s16 profname = i_proc->profname;
@@ -36,6 +38,11 @@ s32 fpcDt_deleteMethod(base_process_class* i_proc) {
/* 800210D4-8002110C 0038+00 s=0 e=1 z=0 None .text fpcDt_Handler__Fv */
void fpcDt_Handler() {
+#ifdef DEBUG
+ if (g_fpcDbSv_service[6] != NULL) {
+ g_fpcDbSv_service[6](&g_fpcDtTg_Queue.mSize);
+ }
+#endif
cLsIt_Method(&g_fpcDtTg_Queue, (cNdIt_MethodFunc)fpcDtTg_Do, fpcDt_deleteMethod);
}
@@ -51,7 +58,7 @@ s32 fpcDt_ToQueue(base_process_class* i_proc) {
fpcLy_DeletingMesg(i_proc->layer_tag.layer);
return 1;
}
-
+
return 0;
}
@@ -66,18 +73,16 @@ s32 fpcDt_ToDeleteQ(base_process_class* i_proc) {
}
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->subtype)) {
- process_node_class* node = (process_node_class*)i_proc;
- if (fpcNd_IsDeleteTiming(node) == 0) {
+ if (fpcNd_IsDeleteTiming((process_node_class*)i_proc) == 0) {
return 0;
}
- layer_class* layer = &node->layer;
+ layer_class* layer = &((process_node_class*)i_proc)->layer;
if (fpcLy_Cancel(layer) == 0) {
- JUT_ASSERT(0);
+ JUT_ASSERT(196, 0);
}
-
if (fpcLyIt_OnlyHereLY(layer, (fpcLyIt_OnlyHereFunc)fpcDt_ToDeleteQ, NULL) == 0)
{
return 0;
@@ -105,14 +110,32 @@ s32 fpcDt_ToDeleteQ(base_process_class* i_proc) {
/* 800212A4-80021308 0064+00 s=0 e=3 z=0 None .text fpcDt_Delete__FPv */
s32 fpcDt_Delete(void* i_proc) {
base_process_class* proc = (base_process_class*)i_proc;
+
if (proc != NULL) {
+#ifdef DEBUG
+ if (!fpcBs_Is_JustOfType(g_fpcBs_type, proc->type)) {
+ if (g_fpcDbSv_service[12] != NULL) {
+ g_fpcDbSv_service[12](proc);
+ }
+
+ return 0;
+ }
+#endif
if (fpcCt_IsDoing(proc) == TRUE)
return 0;
if (proc->init_state == 3)
return 0;
- return fpcDt_ToDeleteQ(proc);
+ int ret = fpcDt_ToDeleteQ(proc);
+#ifdef DEBUG
+ if (ret == 0) {
+ if (g_fpcDbSv_service[5] != NULL) {
+ g_fpcDbSv_service[5](proc);
+ }
+ }
+#endif
+ return ret;
}
return 1;
diff --git a/src/f_pc/f_pc_executor.cpp b/src/f_pc/f_pc_executor.cpp
index c0e0c53239..bf23306ac1 100644
--- a/src/f_pc/f_pc_executor.cpp
+++ b/src/f_pc/f_pc_executor.cpp
@@ -7,6 +7,7 @@
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_pause.h"
#include "f_pc/f_pc_searcher.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 80021338-80021358 0020+00 s=1 e=9 z=291 None .text fpcEx_Search__FPFPvPv_PvPv */
base_process_class* fpcEx_Search(fpcLyIt_JudgeFunc i_judgeFunc, void* i_data) {
@@ -23,7 +24,11 @@ base_process_class* fpcEx_SearchByID(fpc_ProcID i_id) {
/* 8002139C-800213C4 0028+00 s=0 e=7 z=42 None .text fpcEx_IsExist__FUi */
BOOL fpcEx_IsExist(fpc_ProcID i_id) {
- return fpcEx_SearchByID(i_id) != NULL ? TRUE : FALSE;
+ if (fpcEx_SearchByID(i_id) != NULL) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 800213C4-80021418 0054+00 s=0 e=1 z=0 None .text fpcEx_Execute__FP18base_process_class */
@@ -36,20 +41,24 @@ s32 fpcEx_Execute(base_process_class* i_proc) {
/* 80021418-800214C4 00AC+00 s=1 e=0 z=0 None .text fpcEx_ToLineQ__FP18base_process_class */
s32 fpcEx_ToLineQ(base_process_class* i_proc) {
- layer_class* layer = i_proc->layer_tag.layer;
- base_process_class* process = &layer->process_node->base;
+ base_process_class* process = &i_proc->layer_tag.layer->process_node->base;
- if (layer->layer_id == fpcLy_ROOT_e || cTg_IsUse(&process->line_tag_.base) == TRUE) {
- s32 ret = fpcLnTg_ToQueue(&i_proc->line_tag_, i_proc->priority.current_info.list_id);
- if (ret == 0) {
+ if (i_proc->layer_tag.layer->layer_id == fpcLy_ROOT_e || cTg_IsUse(&process->line_tag_.base) == TRUE) {
+ int var_r28 = i_proc->priority.current_info.list_id;
+ if (fpcLnTg_ToQueue(&i_proc->line_tag_, var_r28) == 0) {
fpcLyTg_QueueTo(&i_proc->layer_tag);
return 0;
}
+#ifdef DEBUG
+ if (g_fpcDbSv_service[1] != NULL) {
+ g_fpcDbSv_service[1](i_proc);
+ }
+#endif
+
i_proc->init_state = 2;
if (fpcBs_Is_JustOfType(g_fpcNd_type, i_proc->subtype)) {
- process_node_class* node = (process_node_class*)i_proc;
- fpcLyIt_OnlyHere(&node->layer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, node);
+ fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcEx_ToLineQ, i_proc);
}
return 1;
@@ -61,8 +70,7 @@ s32 fpcEx_ToLineQ(base_process_class* i_proc) {
/* 800214C4-80021510 004C+00 s=0 e=1 z=0 None .text fpcEx_ExecuteQTo__FP18base_process_class
*/
s32 fpcEx_ExecuteQTo(base_process_class* i_proc) {
- s32 ret = fpcLyTg_QueueTo(&i_proc->layer_tag);
- if (ret == 1) {
+ if (fpcLyTg_QueueTo(&i_proc->layer_tag) == 1) {
i_proc->init_state = 3;
return 1;
}
@@ -73,9 +81,8 @@ s32 fpcEx_ExecuteQTo(base_process_class* i_proc) {
/* 80021510-80021568 0058+00 s=0 e=1 z=0 None .text fpcEx_ToExecuteQ__FP18base_process_class
*/
s32 fpcEx_ToExecuteQ(base_process_class* i_proc) {
- s32 ret = fpcLyTg_ToQueue(&i_proc->layer_tag, i_proc->priority.current_info.layer_id,
- i_proc->priority.current_info.list_id, i_proc->priority.current_info.list_priority);
- if (ret == 1) {
+ process_priority_class* priority = &i_proc->priority;
+ if (fpcLyTg_ToQueue(&i_proc->layer_tag, priority->current_info.layer_id, priority->current_info.list_id, priority->current_info.list_priority) == 1) {
fpcEx_ToLineQ(i_proc);
return 1;
}
diff --git a/src/f_pc/f_pc_layer.cpp b/src/f_pc/f_pc_layer.cpp
index 92b24cd021..b25c1d56bf 100644
--- a/src/f_pc/f_pc_layer.cpp
+++ b/src/f_pc/f_pc_layer.cpp
@@ -21,31 +21,47 @@ s32 fpcLy_ToCancelQ(layer_class* i_layer, process_method_tag_class* i_methods) {
/* 800215CC-800215F8 002C+00 s=1 e=0 z=0 None .text
* fpcLy_CancelMethod__FP24process_method_tag_class */
-bool fpcLy_CancelMethod(process_method_tag_class* i_layer) {
- return fpcMtdTg_Do(i_layer) == 1;
+BOOL fpcLy_CancelMethod(process_method_tag_class* i_layer) {
+ if (fpcMtdTg_Do(i_layer) == 1) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
/* 800215F8-8002161C 0024+00 s=0 e=1 z=0 None .text
* fpcLy_IntoQueue__FP11layer_classiP16create_tag_classi */
s32 fpcLy_IntoQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag, int i_no) {
- return cTg_InsertToTree(&i_layer->node_tree, i_treeListNo, i_createTag, i_no);
+ int ret = cTg_InsertToTree(&i_layer->node_tree, i_treeListNo, i_createTag, i_no);
+ return ret;
}
/* 8002161C-80021640 0024+00 s=0 e=1 z=0 None .text
* fpcLy_ToQueue__FP11layer_classiP16create_tag_class */
s32 fpcLy_ToQueue(layer_class* i_layer, int i_treeListNo, create_tag_class* i_createTag) {
- return cTg_AdditionToTree(&i_layer->node_tree, i_treeListNo, i_createTag);
+ int ret = cTg_AdditionToTree(&i_layer->node_tree, i_treeListNo, i_createTag);
+ return ret;
}
/* 80021640-80021664 0024+00 s=0 e=1 z=0 None .text
* fpcLy_QueueTo__FP11layer_classP16create_tag_class */
s32 fpcLy_QueueTo(layer_class* i_layer, create_tag_class* i_createTag) {
- return cTg_SingleCutFromTree(i_createTag);
+ i_layer;
+
+ int ret = cTg_SingleCutFromTree(i_createTag);
+ return ret;
}
/* 80021664-80021678 0014+00 s=0 e=1 z=0 None .text fpcLy_IsDeletingMesg__FP11layer_class */
BOOL fpcLy_IsDeletingMesg(layer_class* i_layer) {
- return i_layer->counts.delete_count > 0;
+ BOOL ret;
+ if (i_layer->counts.delete_count > 0) {
+ ret = TRUE;
+ } else {
+ ret = FALSE;
+ }
+
+ return ret;
}
/* 80021678-80021688 0010+00 s=0 e=1 z=0 None .text fpcLy_DeletingMesg__FP11layer_class */
@@ -62,7 +78,14 @@ void fpcLy_DeletedMesg(layer_class* i_layer) {
/* 800216A0-800216B4 0014+00 s=0 e=2 z=0 None .text fpcLy_IsCreatingMesg__FP11layer_class */
BOOL fpcLy_IsCreatingMesg(layer_class* i_layer) {
- return i_layer->counts.create_count > 0;
+ BOOL ret;
+ if (i_layer->counts.create_count > 0) {
+ ret = TRUE;
+ } else {
+ ret = FALSE;
+ }
+
+ return ret;
}
/* 800216B4-800216C4 0010+00 s=0 e=2 z=0 None .text fpcLy_CreatingMesg__FP11layer_class */
diff --git a/src/f_pc/f_pc_layer_iter.cpp b/src/f_pc/f_pc_layer_iter.cpp
index 9ffd197f0e..7e92cc3081 100644
--- a/src/f_pc/f_pc_layer_iter.cpp
+++ b/src/f_pc/f_pc_layer_iter.cpp
@@ -30,6 +30,23 @@ s32 fpcLyIt_OnlyHereLY(layer_class* i_layer, fpcLyIt_OnlyHereFunc i_func, void*
return result;
}
+s32 fpcLyIt_All(fpcLyIt_OnlyHereFunc i_func, void* i_data) {
+ int ret = 1;
+
+ layer_iter iter;
+ layer_class* layer;
+ iter.func = i_func;
+ iter.data = i_data;
+
+ for (layer = fpcLy_RootLayer(); layer != NULL; layer = (layer_class*)layer->node.mpNextNode) {
+ if (cTrIt_Method(&layer->node_tree, (cNdIt_MethodFunc)cTgIt_MethodCall, &iter) == 0) {
+ ret = 0;
+ }
+ }
+
+ return ret;
+}
+
/* 80021C28-80021C60 0038+00 s=0 e=3 z=0 None .text fpcLyIt_Judge__FP11layer_classPFPvPv_PvPv
*/
void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data) {
@@ -41,19 +58,19 @@ void* fpcLyIt_Judge(layer_class* i_layer, fpcLyIt_JudgeFunc i_func, void* i_data
/* 80021C60-80021CD4 0074+00 s=0 e=1 z=4 None .text fpcLyIt_AllJudge__FPFPvPv_PvPv */
void* fpcLyIt_AllJudge(fpcLyIt_JudgeFunc i_func, void* i_data) {
+ void* ret;
+
layer_iter iter;
- layer_class* current;
+ layer_class* layer;
iter.func = i_func;
iter.data = i_data;
- current = fpcLy_RootLayer();
- while (current != NULL) {
- void* result =
- cTrIt_Judge(&current->node_tree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
- if (result != NULL) {
- return result;
+ for (layer = fpcLy_RootLayer(); layer != NULL; layer = (layer_class*)layer->node.mpNextNode) {
+ ret = cTrIt_Judge(&layer->node_tree, (cNdIt_JudgeFunc)cTgIt_JudgeFilter, &iter);
+ if (ret != NULL) {
+ return ret;
}
- current = (layer_class*)current->node.mpNextNode;
}
+
return NULL;
}
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 */
diff --git a/src/f_pc/f_pc_line_tag.cpp b/src/f_pc/f_pc_line_tag.cpp
index 8f8e59f26d..0745775989 100644
--- a/src/f_pc/f_pc_line_tag.cpp
+++ b/src/f_pc/f_pc_line_tag.cpp
@@ -25,9 +25,7 @@ void fpcLnTg_QueueTo(line_tag* i_lineTag) {
/* 80023634-8002368C 0058+00 s=1 e=1 z=1 None .text fpcLnTg_ToQueue__FP8line_tagi */
s32 fpcLnTg_ToQueue(line_tag* i_lineTag, int lineListID) {
- s32 ret = cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->base);
-
- if (ret) {
+ if (cTg_AdditionToTree(&g_fpcLn_Queue, lineListID, &i_lineTag->base)) {
i_lineTag->list_id = lineListID;
return 1;
} else {
diff --git a/src/f_pc/f_pc_load.cpp b/src/f_pc/f_pc_load.cpp
index a45944f2bf..5f845b00cd 100644
--- a/src/f_pc/f_pc_load.cpp
+++ b/src/f_pc/f_pc_load.cpp
@@ -26,9 +26,7 @@ void fpcLd_Free(s16 i_procName) {
/* 80022050-800220A0 0050+00 s=1 e=1 z=0 None .text fpcLd_Load__Fs */
s32 fpcLd_Load(s16 i_procName) {
- s32 phase = cDyl_LinkASync((s16)i_procName);
-
- switch (phase) {
+ switch (cDyl_LinkASync((s16)i_procName)) {
case cPhs_COMPLEATE_e:
return cPhs_COMPLEATE_e;
case cPhs_INIT_e:
diff --git a/src/f_pc/f_pc_manager.cpp b/src/f_pc/f_pc_manager.cpp
index 6b17d0f9b1..376bc52b08 100644
--- a/src/f_pc/f_pc_manager.cpp
+++ b/src/f_pc/f_pc_manager.cpp
@@ -65,8 +65,13 @@ void fpcM_Management(fpcM_ManagementFunc i_preExecuteFn, fpcM_ManagementFunc i_p
dPa_control_c::offStatus(1);
}
- fpcPi_Handler();
- fpcCt_Handler();
+ if (!fpcPi_Handler()) {
+ JUT_ASSERT(353, 0);
+ }
+
+ if (!fpcCt_Handler()) {
+ JUT_ASSERT(357, 0);
+ }
if (i_preExecuteFn != NULL) {
i_preExecuteFn();
@@ -126,10 +131,10 @@ void* fpcM_JudgeInLayer(fpc_ProcID i_layerID, fpcCtIt_JudgeFunc i_judgeFunc, voi
if (layer != NULL) {
void* ret = fpcCtIt_JudgeInLayer(i_layerID, i_judgeFunc, i_data);
if (ret == NULL) {
- ret = fpcLyIt_Judge(layer, i_judgeFunc, i_data);
+ return fpcLyIt_Judge(layer, i_judgeFunc, i_data);
}
return ret;
- } else {
- return NULL;
}
+
+ return NULL;
}
diff --git a/src/f_pc/f_pc_node.cpp b/src/f_pc/f_pc_node.cpp
index 0a0156eb06..72828c7968 100644
--- a/src/f_pc/f_pc_node.cpp
+++ b/src/f_pc/f_pc_node.cpp
@@ -5,6 +5,7 @@
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_layer_iter.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 800224F0-80022514 0024+00 s=1 e=1 z=0 None .text fpcNd_DrawMethod__FP21nodedraw_method_classPv
*/
@@ -15,9 +16,11 @@ s32 fpcNd_DrawMethod(nodedraw_method_class* i_method_class, void* i_data) {
/* 80022514-80022580 006C+00 s=1 e=0 z=0 None .text fpcNd_Draw__FP18process_node_class */
s32 fpcNd_Draw(process_node_class* i_procNode) {
s32 ret = 0;
+ process_node_class* var_r28 = i_procNode;
+
if (i_procNode->unk_0x1A8 == 0) {
layer_class* save_layer = fpcLy_CurrentLayer();
- fpcLy_SetCurrentLayer(&i_procNode->layer);
+ fpcLy_SetCurrentLayer(&var_r28->layer);
ret = fpcNd_DrawMethod(i_procNode->nodedraw_method, i_procNode);
fpcLy_SetCurrentLayer(save_layer);
}
@@ -27,8 +30,18 @@ s32 fpcNd_Draw(process_node_class* i_procNode) {
/* 80022580-800225DC 005C+00 s=1 e=0 z=0 None .text fpcNd_Execute__FP18process_node_class */
s32 fpcNd_Execute(process_node_class* i_procNode) {
- s32 ret;
+ s32 ret = 0;
layer_class* save_layer = fpcLy_CurrentLayer();
+
+#ifdef DEBUG
+ if (fpcBs_Is_JustOfType(g_fpcNd_type, i_procNode->base.subtype) == 0) {
+ if (g_fpcDbSv_service[11] != NULL) {
+ g_fpcDbSv_service[11](i_procNode);
+ }
+ return 0;
+ }
+#endif
+
fpcLy_SetCurrentLayer(&i_procNode->layer);
ret = fpcMtd_Execute(&i_procNode->nodedraw_method->base, i_procNode);
fpcLy_SetCurrentLayer(save_layer);
@@ -111,4 +124,5 @@ s32 fpcNd_Create(process_node_class* i_procNode) {
nodedraw_method_class g_fpcNd_Method = {
(process_method_func)fpcNd_Create, (process_method_func)fpcNd_Delete,
(process_method_func)fpcNd_Execute, (process_method_func)fpcNd_IsDelete,
- (process_method_func)fpcNd_Draw};
+ (process_method_func)fpcNd_Draw,
+};
diff --git a/src/f_pc/f_pc_node_req.cpp b/src/f_pc/f_pc_node_req.cpp
index 7ca99d7d84..b608828d59 100644
--- a/src/f_pc/f_pc_node_req.cpp
+++ b/src/f_pc/f_pc_node_req.cpp
@@ -11,6 +11,7 @@
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_stdcreate_req.h"
#include "f_pc/f_pc_manager.h"
+#include "f_pc/f_pc_debug_sv.h"
/* 800227C4-80022804 0040+00 s=1 e=0 z=0 None .text fpcNdRq_RequestQTo__FP19node_create_request
*/
@@ -35,6 +36,15 @@ void fpcNdRq_ToRequestQ(node_create_request* i_request) {
* fpcNdRq_phase_IsCreated__FP19node_create_request */
s32 fpcNdRq_phase_IsCreated(node_create_request* i_request) {
if (fpcCtRq_IsCreatingByID(i_request->creating_id) == TRUE) {
+#ifdef DEBUG
+ if (i_request->unk_0x64-- <= 0) {
+ i_request->unk_0x64 = 0;
+ if (g_fpcDbSv_service[8] != NULL) {
+ g_fpcDbSv_service[8](&i_request->creating_id);
+ }
+ }
+#endif
+
return cPhs_INIT_e;
} else if (fpcEx_IsExist(i_request->creating_id) == TRUE) {
return cPhs_NEXT_e;
@@ -67,6 +77,14 @@ s32 fpcNdRq_phase_IsDeleteTiming(node_create_request* i_request) {
* fpcNdRq_phase_IsDeleted__FP19node_create_request */
s32 fpcNdRq_phase_IsDeleted(node_create_request* i_request) {
if (fpcDt_IsComplete() == FALSE) {
+#ifdef DEBUG
+ if (i_request->unk_0x68-- <= 0) {
+ i_request->unk_0x68 = 0;
+ if (g_fpcDbSv_service[7] != NULL) {
+ g_fpcDbSv_service[7](i_request->node_proc.node);
+ }
+ }
+#endif
return cPhs_INIT_e;
}
@@ -143,6 +161,13 @@ s32 fpcNdRq_Cancel(node_create_request* i_request) {
/* 80022AFC-80022BE4 00E8+00 s=0 e=1 z=0 None .text fpcNdRq_Handler__Fv */
s32 fpcNdRq_Handler() {
node_class* node = l_fpcNdRq_Queue.mpHead;
+
+#ifdef DEBUG
+ if (g_fpcDbSv_service[9] != NULL) {
+ g_fpcDbSv_service[9](&l_fpcNdRq_Queue.mSize);
+ }
+#endif
+
while (node != NULL) {
node_create_request* req = ((request_node_class*)node)->node_create_req;
switch (req->create_req_methods->execute_method(req)) {
@@ -171,12 +196,10 @@ s32 fpcNdRq_Handler() {
* fpcNdRq_IsPossibleTarget__FP18process_node_class */
s32 fpcNdRq_IsPossibleTarget(process_node_class* i_procNode) {
fpc_ProcID id = i_procNode->base.id;
- request_node_class* req_node;
- node_create_request* create_req;
+ request_node_class* req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
- req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
while (req_node != NULL) {
- create_req = req_node->node_create_req;
+ node_create_request* create_req = req_node->node_create_req;
if ((create_req->parameters == 2 || create_req->parameters == 4 ||
create_req->parameters == 1) &&
create_req->node_proc.id == id)
@@ -221,7 +244,12 @@ node_create_request* fpcNdRq_Create(u32 i_requestSize) {
cTg_Create(&req->create_tag, req);
fpcMtdTg_Init(&req->method_tag, (process_method_tag_func)fpcNdRq_Cancel, req);
req->request_id = request_id++;
+#ifdef DEBUG
+ req->unk_0x64 = 60;
+ req->unk_0x68 = 60;
+#endif
}
+
return req;
}
@@ -246,9 +274,9 @@ node_create_request* fpcNdRq_ChangeNode(u32 i_requestSize, process_node_class* i
req->data = i_data;
}
return req;
- } else {
- return NULL;
}
+
+ return NULL;
}
/* 80022EB0-80022F3C 008C+00 s=1 e=0 z=0 None .text fpcNdRq_DeleteNode__FUlP18process_node_class
@@ -270,9 +298,9 @@ node_create_request* fpcNdRq_DeleteNode(u32 i_requestSize, process_node_class* i
req->layer = i_procNode->base.layer_tag.layer;
}
return req;
- } else {
- return NULL;
}
+
+ return NULL;
}
/* 80022F3C-80022FE8 00AC+00 s=1 e=0 z=0 None .text fpcNdRq_CreateNode__FUlsPv */
@@ -285,6 +313,7 @@ node_create_request* fpcNdRq_CreateNode(u32 i_requestSize, s16 i_procName, void*
layer_class* layer = fpcLy_CurrentLayer();
if (layer->layer_id != fpcLy_ROOT_e && fpcNdRq_IsPossibleTarget(layer->process_node) == 0) {
+ int sp28;
return NULL;
}
@@ -335,11 +364,10 @@ node_create_request* fpcNdRq_Request(u32 i_requestSize, int i_reqType,
/* 80023098-80023110 0078+00 s=1 e=0 z=0 None .text fpcNdRq_ReChangeNode__FUisPv */
s32 fpcNdRq_ReChangeNode(fpc_ProcID i_requestID, s16 i_procName, void* i_data) {
request_node_class* req_node;
- node_create_request* found;
req_node = (request_node_class*)l_fpcNdRq_Queue.mpHead;
while (req_node != NULL) {
- found = req_node->node_create_req;
+ node_create_request* found = req_node->node_create_req;
if (found->parameters == 2 && found->request_id == i_requestID) {
if (found->creating_id == -2) {
found->name = i_procName;
diff --git a/src/f_pc/f_pc_pause.cpp b/src/f_pc/f_pc_pause.cpp
index f39a3097d8..cef059600f 100644
--- a/src/f_pc/f_pc_pause.cpp
+++ b/src/f_pc/f_pc_pause.cpp
@@ -9,8 +9,7 @@
/* 80023844-80023868 0024+00 s=0 e=3 z=0 None .text fpcPause_IsEnable__FPvUc */
s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) {
- base_process_class* pProc = (base_process_class*)i_proc;
- if ((pProc->pause_flag & i_flag) == i_flag) {
+ if ((((base_process_class*)i_proc)->pause_flag & i_flag) == i_flag) {
return 1;
} else {
return 0;
@@ -19,25 +18,22 @@ s32 fpcPause_IsEnable(void* i_proc, u8 i_flag) {
/* 80023868-800238D4 006C+00 s=0 e=1 z=0 None .text fpcPause_Enable__FPvUc */
s32 fpcPause_Enable(void* i_proc, u8 i_flag) {
- base_process_class* pProc = (base_process_class*)i_proc;
- pProc->pause_flag |= i_flag;
+ ((base_process_class*)i_proc)->pause_flag |= i_flag;
- if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->subtype)) {
- process_node_class* pNode = (process_node_class*)pProc;
- fpcLyIt_OnlyHere(&pNode->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
- (void*)(i_flag & 0xFF));
+ if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
+ fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
+ (void*)i_flag);
}
return 1;
}
/* 800238D4-80023948 0074+00 s=0 e=1 z=0 None .text fpcPause_Disable__FPvUc */
s32 fpcPause_Disable(void* i_proc, u8 i_flag) {
- base_process_class* pProc = (base_process_class*)i_proc;
- pProc->pause_flag &= (0xFF - i_flag) & 0xFF;
+ u8 var_r31 = 0xFF - i_flag;
+ ((base_process_class*)i_proc)->pause_flag &= var_r31;
- if (fpcBs_Is_JustOfType(g_fpcNd_type, pProc->subtype)) {
- process_node_class* pNode = (process_node_class*)pProc;
- fpcLyIt_OnlyHere(&pNode->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
+ if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
+ fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
}
return 1;
@@ -45,6 +41,5 @@ s32 fpcPause_Disable(void* i_proc, u8 i_flag) {
/* 80023948-80023954 000C+00 s=0 e=1 z=0 None .text fpcPause_Init__FPv */
void fpcPause_Init(void* i_proc) {
- base_process_class* pProc = (base_process_class*)i_proc;
- pProc->pause_flag = 0;
+ ((base_process_class*)i_proc)->pause_flag = 0;
}
diff --git a/src/f_pc/f_pc_priority.cpp b/src/f_pc/f_pc_priority.cpp
index f6ba909558..48a246d25c 100644
--- a/src/f_pc/f_pc_priority.cpp
+++ b/src/f_pc/f_pc_priority.cpp
@@ -49,8 +49,7 @@ process_priority_class* fpcPi_GetFromQueue() {
process_priority_class* i_procPriority = (process_priority_class*)cTg_GetFirst(&l_fpcPi_Queue);
if (i_procPriority != NULL) {
- base_process_class* process = (base_process_class*)i_procPriority->base.mpTagData;
- process_priority_class* ppriority = &process->priority;
+ process_priority_class* ppriority = &((base_process_class*)i_procPriority->base.mpTagData)->priority;
fpcLy_CancelQTo(&ppriority->method_tag);
return ppriority;
}
@@ -61,16 +60,14 @@ process_priority_class* fpcPi_GetFromQueue() {
/* 80023268-800232B4 004C+00 s=1 e=1 z=0 None .text fpcPi_Delete__FP22process_priority_class
*/
s32 fpcPi_Delete(process_priority_class* i_procPriority) {
- static process_priority_queue_info crear = {
+ static priority_id crear = {
fpcLy_NONE_e,
0xFFFF,
fpcPi_NONE_e,
};
fpcPi_QueueTo(i_procPriority);
- i_procPriority->queue_info.layer_id = crear.layer_id;
- i_procPriority->queue_info.list_id = crear.list_id;
- i_procPriority->queue_info.list_priority = crear.list_priority;
+ i_procPriority->queue_info = crear;
return 1;
}
@@ -94,9 +91,7 @@ s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layerID, u
if (!fpcPi_IsNormal(i_layerID, i_listID, i_priority))
return 0;
- i_procPriority->queue_info.layer_id = i_procPriority->current_info.layer_id;
- i_procPriority->queue_info.list_id = i_procPriority->current_info.list_id;
- i_procPriority->queue_info.list_priority = i_procPriority->current_info.list_priority;
+ i_procPriority->queue_info = i_procPriority->current_info;
if (i_layerID != fpcLy_CURRENT_e && i_procPriority->current_info.layer_id != i_layerID) {
i_procPriority->queue_info.layer_id = i_layerID;
@@ -114,16 +109,16 @@ s32 fpcPi_Change(process_priority_class* i_procPriority, fpc_ProcID i_layerID, u
}
if (process->init_state == 0 || process->init_state == 1) {
- i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
- i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
- i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
+ i_procPriority->current_info = i_procPriority->queue_info;
return 1;
}
- if (changed == TRUE)
- return fpcPi_ToQueue(i_procPriority);
- else
- return 0;
+ if (changed == TRUE) {
+ int ret = fpcPi_ToQueue(i_procPriority);
+ return ret;
+ }
+
+ return 0;
}
/* 80023428-800234BC 0094+00 s=0 e=1 z=0 None .text fpcPi_Handler__Fv */
@@ -135,11 +130,10 @@ s32 fpcPi_Handler() {
line_tag* pLineTag = &process->line_tag_;
if (fpcLyTg_Move(pLayerTag, i_procPriority->queue_info.layer_id, i_procPriority->queue_info.list_id,
- i_procPriority->queue_info.list_priority) == 1) {
+ i_procPriority->queue_info.list_priority) == 1)
+ {
fpcLnTg_Move(pLineTag, i_procPriority->current_info.list_id);
- i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
- i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
- i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
+ i_procPriority->current_info = i_procPriority->queue_info;
} else {
return 0;
}
@@ -159,9 +153,8 @@ s32 fpcPi_Init(process_priority_class* i_procPriority, void* i_data, fpc_ProcID
i_procPriority->queue_info.list_id = i_listID;
i_procPriority->queue_info.list_priority = i_priority;
- i_procPriority->current_info.layer_id = i_procPriority->queue_info.layer_id;
- i_procPriority->current_info.list_id = i_procPriority->queue_info.list_id;
- i_procPriority->current_info.list_priority = i_procPriority->queue_info.list_priority;
+ i_procPriority->current_info = i_procPriority->queue_info;
+
cTg_Create(&i_procPriority->base, i_data);
fpcMtdTg_Init(&i_procPriority->method_tag, (process_method_tag_func)fpcPi_Delete, i_procPriority);
return 1;
diff --git a/src/f_pc/f_pc_profile.cpp b/src/f_pc/f_pc_profile.cpp
index fb3445b02e..33cc127328 100644
--- a/src/f_pc/f_pc_profile.cpp
+++ b/src/f_pc/f_pc_profile.cpp
@@ -10,5 +10,6 @@ process_profile_definition** g_fpcPf_ProfileList_p;
/* 80023564-80023578 0014+00 s=0 e=1 z=0 None .text fpcPf_Get__Fs */
process_profile_definition* fpcPf_Get(s16 i_profname) {
- return g_fpcPf_ProfileList_p[i_profname];
+ int index = i_profname;
+ return g_fpcPf_ProfileList_p[index];
}
diff --git a/src/f_pc/f_pc_searcher.cpp b/src/f_pc/f_pc_searcher.cpp
index 8f6331dba7..094dc6e187 100644
--- a/src/f_pc/f_pc_searcher.cpp
+++ b/src/f_pc/f_pc_searcher.cpp
@@ -7,8 +7,7 @@
/* 80023578-80023590 0018+00 s=0 e=3 z=77 None .text fpcSch_JudgeForPName__FPvPv */
void* fpcSch_JudgeForPName(void* i_proc, void* i_data) {
- s16 name = *(s16*)i_data;
- if (((base_process_class*)i_proc)->name == name)
+ if (((base_process_class*)i_proc)->name == *(s16*)i_data)
return i_proc;
return NULL;
@@ -16,8 +15,7 @@ void* fpcSch_JudgeForPName(void* i_proc, void* i_data) {
/* 80023590-800235A8 0018+00 s=0 e=44 z=270 None .text fpcSch_JudgeByID__FPvPv */
void* fpcSch_JudgeByID(void* i_proc, void* i_data) {
- fpc_ProcID process_id = *(fpc_ProcID*)i_data;
- if (((base_process_class*)i_proc)->id == process_id)
+ if (((base_process_class*)i_proc)->id == *(fpc_ProcID*)i_data)
return i_proc;
return NULL;
diff --git a/src/f_pc/f_pc_stdcreate_req.cpp b/src/f_pc/f_pc_stdcreate_req.cpp
index 5c985ace73..80191840e6 100644
--- a/src/f_pc/f_pc_stdcreate_req.cpp
+++ b/src/f_pc/f_pc_stdcreate_req.cpp
@@ -7,16 +7,21 @@
#include "f_pc/f_pc_load.h"
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_manager.h"
+#include "f_pc/f_pc_debug_sv.h"
+#include <dolphin.h>
/* 80023B70-80023BC4 0054+00 s=1 e=0 z=5 None .text
* fpcSCtRq_phase_Load__FP29standard_create_request_class */
s32 fpcSCtRq_phase_Load(standard_create_request_class* i_request) {
- switch (fpcLd_Load(i_request->process_name)) {
+ int ret = fpcLd_Load(i_request->process_name);
+
+ switch (ret) {
case cPhs_INIT_e:
return cPhs_INIT_e;
case cPhs_COMPLEATE_e:
return cPhs_NEXT_e;
case cPhs_ERROR_e:
+ OS_REPORT("fpcSCtRq_phase_Load %d\n", i_request->process_name);
default:
return cPhs_ERROR_e;
}
@@ -28,7 +33,9 @@ s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_request) {
fpcLy_SetCurrentLayer(i_request->base.layer);
i_request->base.process =
fpcBs_Create(i_request->process_name, i_request->base.id, i_request->process_append);
+
if (i_request->base.process == NULL) {
+ OS_REPORT("fpcSCtRq_phase_CreateProcess %d\n", i_request->process_name);
fpcLd_Free(i_request->process_name);
return cPhs_ERROR_e;
} else {
@@ -41,7 +48,18 @@ s32 fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_request) {
* fpcSCtRq_phase_SubCreateProcess__FP29standard_create_request_class */
s32 fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_request) {
fpcLy_SetCurrentLayer(i_request->base.layer);
- return fpcBs_SubCreate(i_request->base.process);
+ int ret = fpcBs_SubCreate(i_request->base.process);
+
+#ifdef DEBUG
+ if (ret == 0 && i_request->unk_0x60-- <= 0) {
+ i_request->unk_0x60 = 0;
+ if (g_fpcDbSv_service[0] != NULL) {
+ g_fpcDbSv_service[0](i_request->base.process);
+ }
+ }
+#endif
+
+ return ret;
}
/* 80023C64-80023CBC 0058+00 s=1 e=0 z=14 None .text
@@ -59,13 +77,16 @@ s32 fpcSCtRq_phase_IsComplete(standard_create_request_class* i_request) {
/* 80023CBC-80023D0C 0050+00 s=1 e=0 z=5 None .text
* fpcSCtRq_phase_PostMethod__FP29standard_create_request_class */
s32 fpcSCtRq_phase_PostMethod(standard_create_request_class* i_request) {
- if (i_request->create_post_method != NULL &&
- i_request->create_post_method(i_request->base.process, i_request->unk_0x5C) == 0)
- {
- return cPhs_INIT_e;
- } else {
- return cPhs_NEXT_e;
+ stdCreateFunc create_func = i_request->create_post_method;
+
+ if (create_func != NULL) {
+ int ret = create_func(i_request->base.process, i_request->unk_0x5C);
+ if (ret == 0) {
+ return cPhs_INIT_e;
+ }
}
+
+ return cPhs_NEXT_e;
}
/* 80023D0C-80023D14 0008+00 s=1 e=0 z=0 None .text
@@ -138,5 +159,9 @@ fpc_ProcID fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc
request->create_post_method = i_createFunc;
request->unk_0x5C = param_4;
request->process_append = i_append;
+#ifdef DEBUG
+ request->unk_0x60 = 60;
+#endif
+
return request->base.id;
}