diff options
| author | Huitzi <73550465+marwernerh@users.noreply.github.com> | 2026-03-09 21:33:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-09 18:33:31 -0700 |
| commit | 0b0fdd1f60193d1e3e610326cc2cf2a7b558d366 (patch) | |
| tree | a39b648ba460b5f80dad748690fa43f6f780e5a6 /src/d/d_s_play.cpp | |
| parent | 30e839c28be83fb07bfbe008d3eb9eb9127e3801 (diff) | |
Actor status consolidation & process profile definition editing (#3117)
* Consolidate fopAcM_STATUS into fopAc_Status_e
* Add _e suffix to fopAcStts enums
* Prepare for profile enumeration
* Correct typo in scene_process_profile_definition
* Manually handle g_profile_Obj_DamCps (inline preprocessing)
* Correct g_profile_TAG_LV5SOUP procname to enum
* Create d_priority.h
* Update process profile definitions
* Moved inline comments to the left
* Add missing fopAcStts enums
* Add d_priority.h include in f_pc_leaf.h
* Manually update d_a_obj_damCps profile
* Replace fopAcStts enums replacing and anticipatory profile size correction
* Changed profile size from literal to sizeof() in anticipation of PR #3116
* Provided putative names to staff-related status enums
* Replaced appropriate literals with fopAcStts enums
* Fix borked merge
* Rename item number enums and move to d_item_data.h
* Rename process profile name & draw priority enums
* Move process profile name & draw priority enums to appropriate files
* Moved fpcNm_ enums from d/d_procname.h to f_pc/f_pc_name.h
* Moved fpcDwPi_ enums from d/d_priority.h to f_pc/f_pc_draw_priority.h
* ACTUALLY (whoops) stage merge
* Correct item mistranslation
Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
---------
Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
Diffstat (limited to 'src/d/d_s_play.cpp')
| -rw-r--r-- | src/d/d_s_play.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp index 4f3c6807f0..869f5499b1 100644 --- a/src/d/d_s_play.cpp +++ b/src/d/d_s_play.cpp @@ -95,7 +95,7 @@ u8 dScnPly_c::debugPause; #endif static const s16 T_JOINT_dylKeyTbl[1] = { - PROC_COW, + fpcNm_COW_e, }; static const char* T_JOINT_resName[1] = {"Always"}; @@ -461,10 +461,10 @@ static u32 l_usedMemoryBlockSize = 0xFFFFFFFF; static int checkObjectSize(void* i_process, void* i_data) { s16 profname = fpcM_GetProfName(i_process); - if (profname == PROC_BG) { + if (profname == fpcNm_BG_e) { fopAc_ac_c* actor = (fopAc_ac_c*)i_process; *((u32*)i_data) += ((l_usedMemoryBlockSize != 0 && actor->heap == NULL) ? 0 : actor->heap->getHeapSize()) + actor->base.base.profile->process_size; - } else if (profname == PROC_PLAY_SCENE || profname == PROC_ROOM_SCENE) { + } else if (profname == fpcNm_PLAY_SCENE_e || profname == fpcNm_ROOM_SCENE_e) { *((u32*)i_data) += ((base_process_class*)i_process)->profile->process_size; } else if (fopKyM_IsKy(i_process)) { *((u32*)i_data + 1) += ((base_process_class*)i_process)->profile->process_size; @@ -472,10 +472,10 @@ static int checkObjectSize(void* i_process, void* i_data) { fopAc_ac_c* actor = (fopAc_ac_c*)i_process; *((u32*)i_data + 1) += (actor->heap == NULL ? 0 : actor->heap->getHeapSize()) + actor->base.base.profile->process_size; - if (profname == PROC_ALINK) { + if (profname == fpcNm_ALINK_e) { daAlink_c* alink = (daAlink_c*)actor; *((u32*)i_data + 1) += alink->getOtherHeapSize(); - } else if (profname == PROC_MIDNA) { + } else if (profname == fpcNm_MIDNA_e) { daMidna_c* midna = (daMidna_c*)actor; *((u32*)i_data + 1) += midna->getOtherHeapSize(); } @@ -562,7 +562,7 @@ static int dScnPly_Draw(dScnPly_c* i_this) { } #endif - int rt = fopScnM_ChangeReq(i_this, PROC_PLAY_SCENE, l_wipeType[wipe], 5); + int rt = fopScnM_ChangeReq(i_this, fpcNm_PLAY_SCENE_e, l_wipeType[wipe], 5); int hour = dKy_getdaytime_hour(); BOOL isDaytime = (hour >= 6 && hour < 18) ? FALSE : TRUE; @@ -593,7 +593,7 @@ static int dScnPly_Draw(dScnPly_c* i_this) { && !fapGm_HIO_c::isCaptureScreen() #endif ) { - if (fpcM_GetName(i_this) == PROC_PLAY_SCENE) { + if (fpcM_GetName(i_this) == fpcNm_PLAY_SCENE_e) { dComIfGp_getVibration().Run(); } daSus_c::execute(); @@ -630,10 +630,10 @@ static int dScnPly_Draw(dScnPly_c* i_this) { spA = 7; } - fopScnM_ChangeReq(i_this, PROC_MENU_SCENE, spA, 5); + fopScnM_ChangeReq(i_this, fpcNm_MENU_SCENE_e, spA, 5); mDoAud_bgmStop(30); - if (fpcM_GetName(i_this) != PROC_PLAY_SCENE) { + if (fpcM_GetName(i_this) != fpcNm_PLAY_SCENE_e) { dComIfG_playerStatusD(); } } @@ -1010,7 +1010,7 @@ static BOOL heapSizeCheck() { #endif bool dScnPly_c::resetGame() { - if (fpcM_GetName(this) == PROC_OPENING_SCENE) { + if (fpcM_GetName(this) == fpcNm_OPENING_SCENE_e) { if (!dStage_roomControl_c::resetArchiveBank(0)) { return false; } @@ -1135,7 +1135,7 @@ static int phase_1(dScnPly_c* i_this) { dComIfGp_getStartStagePoint() == 3) { dComIfGs_onDarkClearLV(0); - execItemGet(fpcNm_ITEM_WEAR_KOKIRI); + execItemGet(dItemNo_WEAR_KOKIRI_e); } // Stage: Kakariko Village, Room: Kakariko Village else if (!strcmp(dComIfGp_getStartStageName(), "F_SP109") && @@ -1160,8 +1160,8 @@ static int phase_1(dScnPly_c* i_this) { if (!strcmp(dComIfGp_getStartStageName(), "F_SP104") && dComIfGp_getStartStageRoomNo() == 1 && dComIfGp_getStartStagePoint() == 23 && dComIfGp_getStartStageLayer() == 12) { - dComIfGs_onItemFirstBit(fpcNm_ITEM_HORSE_FLUTE); - dComIfGs_setItem(SLOT_21, fpcNm_ITEM_HORSE_FLUTE); + dComIfGs_onItemFirstBit(dItemNo_HORSE_FLUTE_e); + dComIfGs_setItem(SLOT_21, dItemNo_HORSE_FLUTE_e); } if ((u8)dKy_darkworld_stage_check(dComIfGp_getStartStageName(), @@ -1426,17 +1426,17 @@ static int phase_4(dScnPly_c* i_this) { JUT_ASSERT(2709, heap2 != NULL); dComIfGp_setMsgExpHeap(heap2); - if (fpcM_GetName(i_this) == PROC_OPENING_SCENE) { - fopAcM_create(PROC_TITLE, 0, NULL, -1, NULL, NULL, -1); + if (fpcM_GetName(i_this) == fpcNm_OPENING_SCENE_e) { + fopAcM_create(fpcNm_TITLE_e, 0, NULL, -1, NULL, NULL, -1); #if DEBUG g_playerKind = 0; #endif dComIfGs_init(); dComIfGs_setOptPointer(0); dComIfGs_setLife(12); - dMeter2Info_setCloth(fpcNm_ITEM_WEAR_KOKIRI, false); - dMeter2Info_setSword(fpcNm_ITEM_SWORD, false); - dMeter2Info_setShield(fpcNm_ITEM_HYLIA_SHIELD, false); + dMeter2Info_setCloth(dItemNo_WEAR_KOKIRI_e, false); + dMeter2Info_setSword(dItemNo_SWORD_e, false); + dMeter2Info_setShield(dItemNo_HYLIA_SHIELD_e, false); dComIfGs_onEventBit(0x0601); // Epona Tamed } @@ -1590,27 +1590,27 @@ static scene_method_class l_dScnPly_Method = { }; scene_process_profile_definition g_profile_PLAY_SCENE = { - fpcLy_ROOT_e, // mLayerID - 1, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_PLAY_SCENE, // mProcName - &g_fpcNd_Method.base, // sub_method - sizeof(dScnPly_c), // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopScn_Method.base, // sub_method - &l_dScnPly_Method, // mpMtd + /* Layer ID */ fpcLy_ROOT_e, + /* List ID */ 1, + /* List Prio */ fpcPi_CURRENT_e, + /* Proc Name */ fpcNm_PLAY_SCENE_e, + /* Proc SubMtd */ &g_fpcNd_Method.base, + /* Size */ sizeof(dScnPly_c), + /* Size Other */ 0, + /* Parameters */ 0, + /* Leaf SubMtd */ &g_fopScn_Method.base, + /* Scene SubMtd */ &l_dScnPly_Method, }; scene_process_profile_definition g_profile_OPENING_SCENE = { - fpcLy_ROOT_e, // mLayerID - 1, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_OPENING_SCENE, // mProcName - &g_fpcNd_Method.base, // sub_method - sizeof(dScnPly_c), // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopScn_Method.base, // sub_method - &l_dScnPly_Method, // mpMtd + /* Layer ID */ fpcLy_ROOT_e, + /* List ID */ 1, + /* List Prio */ fpcPi_CURRENT_e, + /* Proc Name */ fpcNm_OPENING_SCENE_e, + /* Proc SubMtd */ &g_fpcNd_Method.base, + /* Size */ sizeof(dScnPly_c), + /* Size Other */ 0, + /* Parameters */ 0, + /* Leaf SubMtd */ &g_fopScn_Method.base, + /* Scene SubMtd */ &l_dScnPly_Method, }; |
