From 1af06107e094ecfa92fe172b19baa963f1df43c6 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Tue, 20 Feb 2024 00:07:18 -0500 Subject: [PATCH] More enum cleanup --- include/d/actor/d_a_player.h | 6 +++--- include/d/res/res_skanran.h | 17 +++++++++++++++++ src/d/actor/d_a_agb.cpp | 12 ++++++++++-- src/d/actor/d_a_bita.cpp | 24 ++++++++++++++++++++---- src/d/actor/d_a_obj_ferris.cpp | 9 +++++---- src/d/actor/d_a_wall.cpp | 28 ++++++++++++++++++++++++++-- src/d/d_event.cpp | 2 +- src/d/d_resorce.cpp | 7 ++++--- src/d/d_timer.cpp | 4 ++-- src/f_op/f_op_actor_mng.cpp | 30 +++++++++++++++--------------- src/f_op/f_op_camera.cpp | 2 +- src/f_op/f_op_kankyo_mng.cpp | 4 ++-- src/f_op/f_op_scene_req.cpp | 5 +++-- 13 files changed, 109 insertions(+), 41 deletions(-) create mode 100644 include/d/res/res_skanran.h diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 0d72a4164..cd4dfdae8 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -488,9 +488,9 @@ public: virtual BOOL checkComboCutTurn() const { return false; } virtual f32 getBaseAnimeFrameRate() = 0; virtual f32 getBaseAnimeFrame() = 0; - virtual u32 getItemID() const { return -1; } - virtual u32 getThrowBoomerangID() const { return -1; } - virtual u32 getGrabActorID() const;// { return -1; } + virtual u32 getItemID() const { return fpcM_ERROR_PROCESS_ID_e; } + virtual u32 getThrowBoomerangID() const { return fpcM_ERROR_PROCESS_ID_e; } + virtual u32 getGrabActorID() const;// { return fpcM_ERROR_PROCESS_ID_e; } virtual BOOL checkGrabBarrel() { return FALSE; } virtual u32 checkPlayerNoDraw() { return FALSE; } virtual BOOL checkRopeTag() { return FALSE; } diff --git a/include/d/res/res_skanran.h b/include/d/res/res_skanran.h new file mode 100644 index 000000000..d7483ddee --- /dev/null +++ b/include/d/res/res_skanran.h @@ -0,0 +1,17 @@ +#ifndef RES_SKANRAN_H +#define RES_SKANRAN_H + +enum SKANRAN_RES_FILE_ID { // IDs and indexes are synced + /* BDL */ + SKANRAN_BDL_SGONDOR=0x4, + SKANRAN_BDL_SHIKARI=0x5, + SKANRAN_BDL_SKANRAN=0x6, + SKANRAN_BDL_STOUDAI=0x7, + + /* DZB */ + SKANRAN_DZB_SGONDOR=0xA, + SKANRAN_DZB_SKANRAN=0xB, + SKANRAN_DZB_STOUDAI=0xC, +}; + +#endif /* RES_SKANRAN_H */ diff --git a/src/d/actor/d_a_agb.cpp b/src/d/actor/d_a_agb.cpp index 9bba3d78e..199d49621 100644 --- a/src/d/actor/d_a_agb.cpp +++ b/src/d/actor/d_a_agb.cpp @@ -29,6 +29,14 @@ static u8 dummy_3569[0xC]; static Vec dummy_2100 = {1.0f, 1.0f, 1.0f}; static Vec dummy_2080 = {1.0f, 1.0f, 1.0f}; +enum AGB_RES_FILE_ID { // IDs and indexes are synced + /* BDLM */ + AGB_BDL_AGBCURSOR=0x4, + + /* BRK */ + AGB_BRK_AGBCURSOR=0x7, +}; + static mDoDvdThd_toMainRam_c* l_gbaCommand; int daAgb_c::mEffect; @@ -1725,7 +1733,7 @@ static BOOL createHeap_CB(fopAc_ac_c* i_this) { /* 800D396C-800D3B58 .text createHeap__7daAgb_cFv */ int daAgb_c::createHeap() { - J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Agb", 4); + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Agb", AGB_BDL_AGBCURSOR); JUT_ASSERT(VERSION_SELECT(2960, 3277, 3286), modelData != 0); mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000002); @@ -1733,7 +1741,7 @@ int daAgb_c::createHeap() { return 0; } - J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Agb", 7); + J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("Agb", AGB_BRK_AGBCURSOR); if (!mBrk.init(modelData, pbrk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0, -1, false, 1)) { return 0; } diff --git a/src/d/actor/d_a_bita.cpp b/src/d/actor/d_a_bita.cpp index 1d34e7233..e87b49498 100644 --- a/src/d/actor/d_a_bita.cpp +++ b/src/d/actor/d_a_bita.cpp @@ -32,12 +32,28 @@ struct _dummy { 0.0f, 2.125f, 0.0f, 1.75f, 0.0f, }; +enum BITA_RES_FILE_ID { // IDs and indexes are synced + /* BDLM */ + BITA_BDL_EF_BTDITA0=0x5, + BITA_BDL_EF_BTDITA1=0x6, + BITA_BDL_MBIT1=0x7, + BITA_BDL_MBIT2=0x8, + + /* BRK */ + BITA_BRK_EF_BTDITA0=0xB, + BITA_BRK_EF_BTDITA1=0xC, + + /* DZB */ + BITA_DZB_MBIT1=0xF, + BITA_DZB_MBIT2=0x10, +}; + static btd_class* btd = NULL; -static u32 ita_bmd[] = { 0x07, 0x08 }; -static u32 ita_dzb[] = { 0x0F, 0x10 }; -static u32 ita_Ef_bmd[] = { 0x05, 0x06 }; -static u32 ita_Ef[] = { 0x0B, 0x0C }; +static u32 ita_bmd[] = { BITA_BDL_MBIT1, BITA_BDL_MBIT2 }; +static u32 ita_dzb[] = { BITA_DZB_MBIT1, BITA_DZB_MBIT2 }; +static u32 ita_Ef_bmd[] = { BITA_BDL_EF_BTDITA0, BITA_BDL_EF_BTDITA1 }; +static u32 ita_Ef[] = { BITA_BRK_EF_BTDITA0, BITA_BRK_EF_BTDITA1 }; /* 00000078-000000C4 .text b_a_sub__FPvPv */ static void* b_a_sub(void* search, void* user) { diff --git a/src/d/actor/d_a_obj_ferris.cpp b/src/d/actor/d_a_obj_ferris.cpp index 3f02f5d39..9d35efc5d 100644 --- a/src/d/actor/d_a_obj_ferris.cpp +++ b/src/d/actor/d_a_obj_ferris.cpp @@ -8,6 +8,7 @@ #include "d/d_com_inf_game.h" #include "d/d_kankyo_wether.h" #include "d/d_procname.h" +#include "d/res/res_skanran.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_mtx.h" @@ -89,14 +90,14 @@ BOOL daObjFerris::Act_c::solidHeapCB(fopAc_ac_c* i_this) { /* 00000110-0000048C .text create_heap__Q211daObjFerris5Act_cFv */ bool daObjFerris::Act_c::create_heap() { s32 i; - J3DModelData* mdl_data_gondola = static_cast(dComIfG_getObjectRes(M_arcname, 0x04)); + J3DModelData* mdl_data_gondola = static_cast(dComIfG_getObjectRes(M_arcname, SKANRAN_BDL_SGONDOR)); JUT_ASSERT(0x183, mdl_data_gondola != 0); if (mdl_data_gondola != NULL) { for (i = 0; i < 5; i++) mpModel[i] = mDoExt_J3DModel__create(mdl_data_gondola, 0, 0x11020203); } - J3DModelData* mdl_data_wheelbase = static_cast(dComIfG_getObjectRes(M_arcname, 0x06)); + J3DModelData* mdl_data_wheelbase = static_cast(dComIfG_getObjectRes(M_arcname, SKANRAN_BDL_SKANRAN)); JUT_ASSERT(0x18c, mdl_data_wheelbase != 0); if (mdl_data_wheelbase != NULL) { mpModel[5] = mDoExt_J3DModel__create(mdl_data_wheelbase, 0, 0x11020203); @@ -105,7 +106,7 @@ bool daObjFerris::Act_c::create_heap() { if (mdl_data_gondola != NULL && mdl_data_wheelbase != NULL) init_mtx(); - cBgD_t* bgw_data_gondola = static_cast(dComIfG_getObjectRes(M_arcname, 0x0A)); + cBgD_t* bgw_data_gondola = static_cast(dComIfG_getObjectRes(M_arcname, SKANRAN_DZB_SGONDOR)); JUT_ASSERT(0x1a0, bgw_data_gondola != 0); if (bgw_data_gondola != NULL) { for (i = 0; i < 5; i++) { @@ -115,7 +116,7 @@ bool daObjFerris::Act_c::create_heap() { } } - cBgD_t* bgw_data_wheelbase = static_cast(dComIfG_getObjectRes(M_arcname, 0x0B)); + cBgD_t* bgw_data_wheelbase = static_cast(dComIfG_getObjectRes(M_arcname, SKANRAN_DZB_SKANRAN)); JUT_ASSERT(0x1b0, bgw_data_wheelbase != 0); if (bgw_data_wheelbase != NULL) { mpBgW[5] = new dBgW(); diff --git a/src/d/actor/d_a_wall.cpp b/src/d/actor/d_a_wall.cpp index 32981155c..16f3635a2 100644 --- a/src/d/actor/d_a_wall.cpp +++ b/src/d/actor/d_a_wall.cpp @@ -17,14 +17,38 @@ static Vec dummy_2080 = {1.0f, 1.0f, 1.0f}; static u8 dummy_1811[] = {0x02, 0x00, 0x02, 0x01}; static f64 dummy4[2] = {3.0, 0.5}; +enum HBW1_RES_FILE_ID { // IDs and indexes are synced + /* BDL */ + HBW1_BDL_HBW1=0x4, + + /* DZB */ + HBW1_DZB_HBW1=0x7, +}; + +enum HTW1_RES_FILE_ID { // IDs and indexes are synced + /* BDL */ + HTW1_BDL_HTW1=0x4, + + /* DZB */ + HTW1_DZB_HTW1=0x7, +}; + +enum HBW2_RES_FILE_ID { // IDs and indexes are synced + /* BDL */ + HBW2_BDL_HBW2=0x4, + + /* DZB */ + HBW2_DZB_HBW2=0x7, +}; + const s16 daWall_c::m_heapsize[3] = { 0x1160, 0x1DD0, 0x2000, }; -const s16 daWall_c::m_bmdname[3] = {0x04, 0x04, 0x04}; -const s16 daWall_c::m_dzbname[3] = {0x07, 0x07, 0x07}; +const s16 daWall_c::m_bmdname[3] = {HBW1_BDL_HBW1, HTW1_BDL_HTW1, HBW2_BDL_HBW2}; +const s16 daWall_c::m_dzbname[3] = {HBW1_DZB_HBW1, HTW1_DZB_HTW1, HBW2_DZB_HBW2}; const Vec daWall_c::m_tri_vtx[3][4] = { {{150.0f, -120.0f, 0.0f}, diff --git a/src/d/d_event.cpp b/src/d/d_event.cpp index 08e8debaa..31af9c751 100644 --- a/src/d/d_event.cpp +++ b/src/d/d_event.cpp @@ -702,7 +702,7 @@ dStage_Event_dt_c* dEvt_control_c::nextStageEventDt(void* idxp) { /* 800715B8-800715DC .text getPId__14dEvt_control_cFPv */ u32 dEvt_control_c::getPId(void* ac) { if (ac == NULL) - return -1; + return fpcM_ERROR_PROCESS_ID_e; return fopAcM_GetID(ac); } diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index 3d30f31e7..7b2d4889e 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -317,9 +317,10 @@ int dRes_info_c::loadResource() { if (pRes == NULL) return -1; } else if (resType == 'BCKS' || resType == 'BCK ') { + JUTDataFileHeader* fileHeader = (JUTDataFileHeader*)pRes; void *pBasData; - if (*((u32*)((char*)pRes + 0x1C)) != 0xFFFFFFFF) - pBasData = (void*)(*((u32*)((char*)pRes + 0x1C)) + ((u32)pRes)); + if (fileHeader->mSeAnmOffset != -1) + pBasData = (char*)fileHeader->mSeAnmOffset + (u32)pRes; else pBasData = NULL; @@ -405,7 +406,7 @@ int dRes_info_c::setRes() { mDataHeap = mDoExt_createSolidHeapFromGameToCurrent(0, 0); if (mDataHeap == NULL) { OSReport_Error("<%s.arc> mDMCommandsetRes: can\'t alloc memory\n", this); - return 0xFFFFFFFF; + return -1; } loadResource(); diff --git a/src/d/d_timer.cpp b/src/d/d_timer.cpp index 9a9f06206..728d9a5ef 100644 --- a/src/d/d_timer.cpp +++ b/src/d/d_timer.cpp @@ -695,14 +695,14 @@ s32 dTimer_Create(msg_class* i_this) { s32 dTimer_createTimer(int param_1, u16 param_2, u8 param_3, u8 param_4, f32 param_5, f32 param_6, f32 param_7, f32 param_8) { if (dComIfG_getTimerMode() == -1) return fop_Timer_create(PROC_TIMER, param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8, NULL); - return -1; + return fpcM_ERROR_PROCESS_ID_e; } /* 8023DA88-8023DAEC .text dTimer_createStockTimer__Fv */ s32 dTimer_createStockTimer() { if (dComIfG_getTimerMode() != -1) return fop_Timer_create(PROC_TIMER, 7, 0, 3, 0, 221.0f, 439.0f, 32.0f, 419.0f, NULL); - return -1; + return fpcM_ERROR_PROCESS_ID_e; } /* 8023DAEC-8023DB48 .text __dt__21dDlst_TimerScrnDraw_cFv */ diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 60a705ec0..b988672d3 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -155,7 +155,7 @@ s32 fopAcM_delete(unsigned int actorID) { s32 fopAcM_create(s16 procName, u32 parameter, cXyz* pPos, int roomNo, csXyz* pAngle, cXyz* pScale, s8 subtype, createFunc createFunc) { fopAcM_prm_class* params = createAppend(parameter, pPos, roomNo, pAngle, pScale, subtype, fpcM_ERROR_PROCESS_ID_e); if (params == NULL) - return -1; + return fpcM_ERROR_PROCESS_ID_e; return fpcM_Create(procName, createFunc, params); } @@ -164,7 +164,7 @@ s32 fopAcM_create(s16 procName, u32 parameter, cXyz* pPos, int roomNo, csXyz* pA s32 fopAcM_create(char* pProcNameString, u32 parameter, cXyz* pPos, int roomNo, csXyz* pAngle, cXyz* pScale, createFunc createFunc) { dStage_objectNameInf * nameInf = dStage_searchName(pProcNameString); if (nameInf == NULL) - return -1; + return fpcM_ERROR_PROCESS_ID_e; return fopAcM_create(nameInf->mProcName, parameter, pPos, roomNo, pAngle, pScale, nameInf->mSubtype, createFunc); } @@ -191,7 +191,7 @@ void* fopAcM_fastCreate(char* pProcNameString, u32 parameter, cXyz* pPos, int ro s32 fopAcM_createChild(s16 procName, unsigned int parentPcId, u32 parameter, cXyz* pPos, int roomNo, csXyz* pAngle, cXyz* pScale, s8 subtype, createFunc createFunc) { fopAcM_prm_class* params = createAppend(parameter, pPos, roomNo, pAngle, pScale, subtype, parentPcId); if (params == NULL) - return -1; + return fpcM_ERROR_PROCESS_ID_e; return fpcM_Create(procName, createFunc, params); } @@ -200,7 +200,7 @@ s32 fopAcM_createChild(s16 procName, unsigned int parentPcId, u32 parameter, cXy s32 fopAcM_createChild(char* pProcNameString, unsigned int parentPcId, u32 parameter, cXyz* pPos, int roomNo, csXyz* pAngle, cXyz* pScale, createFunc createFunc) { dStage_objectNameInf * nameInf = dStage_searchName(pProcNameString); if (nameInf == NULL) - return -1; + return fpcM_ERROR_PROCESS_ID_e; return fopAcM_createChild(nameInf->mProcName, parentPcId, parameter, pPos, roomNo, pAngle, pScale, nameInf->mSubtype, createFunc); } @@ -233,7 +233,7 @@ s32 fopAcM_createChildFromOffset(s16 procName, unsigned int parentPcId, u32 para fopAcM_prm_class* params = createAppend(parameter, &pos, roomNo, &angle, pScale, subtype, parentPcId); if (params == NULL) - return -1; + return fpcM_ERROR_PROCESS_ID_e; return fpcM_Create(procName, createFunc, params); } @@ -773,7 +773,7 @@ s32 fopAcM_createItemForPresentDemo(cXyz* pos, int i_itemNo, u8 argFlag, int roo dComIfGp_event_setGtItm(i_itemNo); if (i_itemNo == NO_ITEM) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } return fopAcM_createDemoItem(pos, i_itemNo, roomNo, rot, param_5, scale, argFlag); @@ -786,7 +786,7 @@ s32 fopAcM_createItemForTrBoxDemo(cXyz* pos, int i_itemNo, int roomNo, int param dComIfGp_event_setGtItm(i_itemNo); if (i_itemNo == NO_ITEM) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } return fopAcM_createDemoItem(pos, i_itemNo, roomNo, rot, param_5, scale, 0x00); @@ -837,7 +837,7 @@ s32 fopAcM_createItemFromTable(cXyz* p_pos, int i_itemNo, int i_itemBitNo, int r case 0x13: case 0x14: if (itemTableList == NULL) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } u8* pItemTable = itemTableList->mItemTables[tableIdx]; u32 itemNo; @@ -874,7 +874,7 @@ s32 fopAcM_createItemFromTable(cXyz* p_pos, int i_itemNo, int i_itemBitNo, int r } if (i_itemNo == 0x3F || i_itemNo == 0xFF) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } else { u32 itemNo = getItemNoByLife(i_itemNo); daItem_c* item = (daItem_c*)fopAcM_fastCreateItem2(p_pos, itemNo, i_itemBitNo, roomNo, type, p_angle, action, p_scale); @@ -894,7 +894,7 @@ s32 fopAcM_createRaceItemFromTable(cXyz* pos, int i_itemNo, int i_itemBitNo, int } if (i_itemNo == 0x3F || i_itemNo == 0xFF) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } i_itemNo = getItemNoByLife(i_itemNo); @@ -907,7 +907,7 @@ s32 fopAcM_createShopItem(cXyz* pos, int i_itemNo, csXyz* rot, int roomNo, cXyz* createFunc createFunc) { JUT_ASSERT(2716, 0 <= i_itemNo && i_itemNo < 256); if (i_itemNo == NO_ITEM) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } return fopAcM_create(PROC_ShopItem, i_itemNo, pos, roomNo, rot, scale, -1, createFunc); @@ -917,7 +917,7 @@ s32 fopAcM_createShopItem(cXyz* pos, int i_itemNo, csXyz* rot, int roomNo, cXyz* s32 fopAcM_createRaceItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot, int roomNo, cXyz* scale, int param_7) { JUT_ASSERT(2763, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo <= 79) || i_itemBitNo == 127); if (i_itemNo == NO_ITEM) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } i_itemNo = check_itemno(i_itemNo); @@ -929,7 +929,7 @@ s32 fopAcM_createRaceItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot, s32 fopAcM_createDemoItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot, int roomNo, cXyz* scale, u8 argFlag) { JUT_ASSERT(2813, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo <= 79) || i_itemBitNo == 127); if (i_itemNo == NO_ITEM) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } u32 params = i_itemNo & 0xFF | (i_itemBitNo & 0x7F) << 0x08 | (argFlag & 0xFF) << 0x10; @@ -955,7 +955,7 @@ s32 fopAcM_createItem(cXyz* pos, int i_itemNo, int i_itemBitNo, int roomNo, int JUT_ASSERT(2915, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo <= 79) || i_itemBitNo == 127); if (i_itemNo == NO_ITEM) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } csXyz prmRot = csXyz::Zero; @@ -1210,7 +1210,7 @@ s32 fopAcM_createIball(cXyz* p_pos, int itemTableIdx, int i_roomNo, csXyz* p_ang strcmp(dComIfGp_getStartStageName(), "Cave11") == 0) { // Savage Labyrinth - return -1; + return fpcM_ERROR_PROCESS_ID_e; } if (dropChance > randPercent) { diff --git a/src/f_op/f_op_camera.cpp b/src/f_op/f_op_camera.cpp index c63409e0c..a5675a26f 100644 --- a/src/f_op/f_op_camera.cpp +++ b/src/f_op/f_op_camera.cpp @@ -9,7 +9,7 @@ // the DOL, even though this is an ugly hack and they're now in the wrong translation unit instead. #include "d/actor/d_a_player.h" void daPy_py_c::onFrollCrashFlg(u32) {} -u32 daPy_py_c::getGrabActorID() const { return -1; } +u32 daPy_py_c::getGrabActorID() const { return fpcM_ERROR_PROCESS_ID_e; } #include "f_op/f_op_camera.h" #include "f_op/f_op_draw_tag.h" diff --git a/src/f_op/f_op_kankyo_mng.cpp b/src/f_op/f_op_kankyo_mng.cpp index 9e143bb0a..6e907dcbe 100644 --- a/src/f_op/f_op_kankyo_mng.cpp +++ b/src/f_op/f_op_kankyo_mng.cpp @@ -57,7 +57,7 @@ int fopKyM_create(s16 i_procName, int i_param, cXyz* i_pos, cXyz* i_scale, fopKy fopKyM_prm_class* params = createAppend(i_param, i_pos, i_scale); if (params == NULL) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } return fopKyM_Create(i_procName, i_createFunc, params); @@ -80,7 +80,7 @@ int fopKyM_createWpillar(cXyz const* i_pos, f32 scaleXZ, f32 scaleY, int i_param fopKyM_prm_class* params = fopKyM_CreateAppend(); if (params == NULL) { - return -1; + return fpcM_ERROR_PROCESS_ID_e; } params->mPos = *i_pos; diff --git a/src/f_op/f_op_scene_req.cpp b/src/f_op/f_op_scene_req.cpp index 49993bb40..2c3b170e7 100644 --- a/src/f_op/f_op_scene_req.cpp +++ b/src/f_op/f_op_scene_req.cpp @@ -8,6 +8,7 @@ #include "f_op/f_op_scene.h" #include "f_op/f_op_scene_pause.h" #include "f_pc/f_pc_executor.h" +#include "f_pc/f_pc_manager.h" static cPhs__Step fopScnRq_phase_ClearOverlap(scene_request_class* i_sceneReq) { if (fopOvlpM_ClearOfReq() == 1) { @@ -119,14 +120,14 @@ s32 fopScnRq_Request(int param_1, scene_class* i_scene, s16 param_3, void* param &submethod); if (!pScnReq) { - ret = -1; + ret = fpcM_ERROR_PROCESS_ID_e; } else { if (param_5 != 0x7fff) { phase_handler_table = fadeFase; tmp = (int)fopScnRq_FadeRequest(param_5, param_6); if (!tmp) { fpcNdRq_Delete(&pScnReq->mCrtReq); - return -1; + return fpcM_ERROR_PROCESS_ID_e; } } pScnReq->mFadeRequest = tmp;