mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-18 21:18:23 -04:00
Process profiles and enums cleanup (#1031)
* Fix some profile comments * Add missing static for local visibility data * Move proc name and draw priority enums to f_pc * Add _e suffix to daObjBarrier_c proc enum * Change proc name enum format to match TP * Change draw prio enum format to match TP * Change ItemNo enum format, finish fixing item names * Revert static for cb1 hio * Clean up formatting of profile comments * Fix comment alignment
This commit is contained in:
+24
-26
@@ -15,8 +15,6 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include "d/d_meter.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_priority.h"
|
||||
#include "d/d_kankyo_wether.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_dvd_thread.h"
|
||||
@@ -742,7 +740,7 @@ void daAgb_c::resetCursor(bool param_0) {
|
||||
setFollowTarget(false);
|
||||
setTargetID(fpcM_ERROR_PROCESS_ID_e);
|
||||
|
||||
if (fopAcM_GetName(player_p) != PROC_NPC_KAM) {
|
||||
if (fopAcM_GetName(player_p) != fpcNm_NPC_KAM_e) {
|
||||
current.pos = player_p->current.pos;
|
||||
home.pos = player_p->current.pos;
|
||||
} else {
|
||||
@@ -932,9 +930,9 @@ void daAgb_c::GbaItemUse() {
|
||||
fopAc_ac_c* actor_p = fopAcM_SearchByID(getTargetID());
|
||||
|
||||
if (cM_rndF(5.0f) < 4.0) {
|
||||
field_0x640 = dItem_YELLOW_RUPEE_e;
|
||||
field_0x640 = dItemNo_YELLOW_RUPEE_e;
|
||||
} else {
|
||||
field_0x640 = dItem_RED_RUPEE_e;
|
||||
field_0x640 = dItemNo_RED_RUPEE_e;
|
||||
}
|
||||
|
||||
field_0x634 = actor_p->current.pos;
|
||||
@@ -942,7 +940,7 @@ void daAgb_c::GbaItemUse() {
|
||||
temp_r29 = 15;
|
||||
}
|
||||
|
||||
fopAcM_create(PROC_BOMB, daBomb_c::prm_make(daBomb_c::STATE_8, false, false), ¤t.pos);
|
||||
fopAcM_create(fpcNm_BOMB_e, daBomb_c::prm_make(daBomb_c::STATE_8, false, false), ¤t.pos);
|
||||
field_0x65c = 120;
|
||||
} else {
|
||||
temp_r29 = 0xe;
|
||||
@@ -953,7 +951,7 @@ void daAgb_c::GbaItemUse() {
|
||||
break;
|
||||
case 0x15:
|
||||
resetCursor(false);
|
||||
fopAcM_create(PROC_BOMB, daBomb_c::prm_make(daBomb_c::STATE_8, false, false), ¤t.pos);
|
||||
fopAcM_create(fpcNm_BOMB_e, daBomb_c::prm_make(daBomb_c::STATE_8, false, false), ¤t.pos);
|
||||
field_0x65c = 120;
|
||||
break;
|
||||
case 0x11:
|
||||
@@ -1026,16 +1024,16 @@ void daAgb_c::GbaItemUse() {
|
||||
field_0x65c = 30;
|
||||
break;
|
||||
case 7:
|
||||
if (dComIfGs_checkGetItem(dItem_BAIT_BAG_e)) {
|
||||
if (dComIfGs_checkGetItem(dItemNo_BAIT_BAG_e)) {
|
||||
if (dComIfGs_checkBaitItemEmpty()) {
|
||||
temp_r29 |= 0x1000000;
|
||||
}
|
||||
|
||||
if (dComIfGs_checkGetItem(dItem_BOMB_BAG_e) && dComIfGs_getBombNum() < dComIfGs_getBombMax()) {
|
||||
if (dComIfGs_checkGetItem(dItemNo_BOMB_BAG_e) && dComIfGs_getBombNum() < dComIfGs_getBombMax()) {
|
||||
temp_r29 |= 0x10000;
|
||||
}
|
||||
|
||||
if (dComIfGs_getItem(dInvSlot_BOW_e) != dItem_NONE_e && dComIfGs_getArrowNum() < dComIfGs_getArrowMax()) {
|
||||
if (dComIfGs_getItem(dInvSlot_BOW_e) != dItemNo_NONE_e && dComIfGs_getArrowNum() < dComIfGs_getArrowMax()) {
|
||||
temp_r29 |= 0x100;
|
||||
}
|
||||
}
|
||||
@@ -1096,7 +1094,7 @@ void daAgb_c::Shopping() {
|
||||
}
|
||||
} else {
|
||||
if (dComIfGs_checkBaitItemEmpty()) {
|
||||
dComIfGs_setBaitItem(dItem_BIRD_BAIT_5_e);
|
||||
dComIfGs_setBaitItem(dItemNo_BIRD_BAIT_5_e);
|
||||
} else {
|
||||
itemBuy.U8.field_0x1 = 2;
|
||||
return;
|
||||
@@ -1219,7 +1217,7 @@ void daAgb_c::FlagsSend(u32 stage_type) {
|
||||
mFlags.field_0xb_0 = 0;
|
||||
}
|
||||
mFlags.field_0x5_2 = field_0x675;
|
||||
mFlags.field_0x5_1 = dComIfGs_checkGetItem(COTTAGE_PAPER) != FALSE;
|
||||
mFlags.field_0x5_1 = dComIfGs_checkGetItem(dItemNo_CABANA_DEED_e) != FALSE;
|
||||
mDoGac_SendDataSet((u32*)&mFlags, 0xC, 9, 0);
|
||||
}
|
||||
|
||||
@@ -1399,7 +1397,7 @@ void daAgb_c::modeMove() {
|
||||
|
||||
if (field_0x66b == 0xE) {
|
||||
if (field_0x65c == 120) {
|
||||
fopAcM_create(PROC_BOMB, daBomb_c::prm_make(daBomb_c::STATE_8, false, false), ¤t.pos);
|
||||
fopAcM_create(fpcNm_BOMB_e, daBomb_c::prm_make(daBomb_c::STATE_8, false, false), ¤t.pos);
|
||||
} else if (field_0x65c == 0) {
|
||||
resetCursor(false);
|
||||
}
|
||||
@@ -1473,7 +1471,7 @@ void daAgb_c::modeMove() {
|
||||
mDoGac_SendDataSet((u32*)&mItemBuy, 4, 0xD, mItemBuy.U32);
|
||||
}
|
||||
|
||||
if ((g_mDoCPd_cpadInfo[mDoGaC_getPortNo()].mGamepadErrorFlags == 0 && fopAcM_GetName(player) != PROC_NPC_KAM) &&
|
||||
if ((g_mDoCPd_cpadInfo[mDoGaC_getPortNo()].mGamepadErrorFlags == 0 && fopAcM_GetName(player) != fpcNm_NPC_KAM_e) &&
|
||||
((isActive() && !field_0x675 && CPad_CHECK_TRIG_R(mDoGaC_getPortNo())) ||
|
||||
(mFlags.field_0x3_5 != 0 && (CPad_CHECK_TRIG_R(mDoGaC_getPortNo()) || CPad_CHECK_TRIG_A(mDoGaC_getPortNo())))))
|
||||
{
|
||||
@@ -1487,7 +1485,7 @@ void daAgb_c::modeMove() {
|
||||
if (attList) {
|
||||
fopAc_ac_c* r3 = attList->getActor();
|
||||
if (r3) {
|
||||
if (fopAcM_CheckStatusMap(r3, 0) && !fopAcM_CheckStatus(r3, fopAcStts_BOSS_e) && fopAcM_GetName(r3) != PROC_FGANON) {
|
||||
if (fopAcM_CheckStatusMap(r3, 0) && !fopAcM_CheckStatus(r3, fopAcStts_BOSS_e) && fopAcM_GetName(r3) != fpcNm_FGANON_e) {
|
||||
current.pos = r3->current.pos;
|
||||
home.pos = r3->current.pos;
|
||||
setTargetID(attList->getPid());
|
||||
@@ -1508,7 +1506,7 @@ void daAgb_c::modeMove() {
|
||||
}
|
||||
|
||||
if (getFollowTarget() == 0) {
|
||||
if (fopAcM_GetName(player) == PROC_NPC_KAM) {
|
||||
if (fopAcM_GetName(player) == fpcNm_NPC_KAM_e) {
|
||||
onFree();
|
||||
} else {
|
||||
current.pos = player->current.pos;
|
||||
@@ -1624,9 +1622,9 @@ static BOOL daAgb_Execute(daAgb_c* i_this) {
|
||||
} else {
|
||||
daPy_lk_c* player_p2 = daPy_getPlayerLinkActorClass();
|
||||
if ((dComIfGp_getPlayer(0) == player_p2 && !player->checkPlayerFly()) ||
|
||||
((fopAcM_GetName(player) == PROC_NPC_MD && !daNpc_Md_c::isFlying()) ||
|
||||
(fopAcM_GetName(player) == PROC_NPC_CB1 && !daNpc_Cb1_c::isFlying()) ||
|
||||
fopAcM_GetName(player) == PROC_NPC_OS))
|
||||
((fopAcM_GetName(player) == fpcNm_NPC_MD_e && !daNpc_Md_c::isFlying()) ||
|
||||
(fopAcM_GetName(player) == fpcNm_NPC_CB1_e && !daNpc_Cb1_c::isFlying()) ||
|
||||
fopAcM_GetName(player) == fpcNm_NPC_OS_e))
|
||||
{
|
||||
f32 speedF = fabs(player->speedF);
|
||||
|
||||
@@ -1824,18 +1822,18 @@ static actor_method_class l_daAgb_Method = {
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_AGB = {
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 0x0007,
|
||||
/* ListPrio */ fpcPi_CURRENT_e,
|
||||
/* ProcName */ PROC_AGB,
|
||||
/* Layer ID */ fpcLy_CURRENT_e,
|
||||
/* List ID */ 0x0007,
|
||||
/* List Prio */ fpcPi_CURRENT_e,
|
||||
/* Proc Name */ fpcNm_AGB_e,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
||||
/* Size */ sizeof(daAgb_c),
|
||||
/* SizeOther */ 0,
|
||||
/* Size Other */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ PRIO_AGB,
|
||||
/* Draw Prio */ fpcDwPi_AGB_e,
|
||||
/* Actor SubMtd */ &l_daAgb_Method,
|
||||
/* Status */ fopAcStts_UNK4000_e | fopAcStts_NOPAUSE_e | fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
/* Cull Type */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user