mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-18 13:13:29 -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:
+25
-27
@@ -5,8 +5,6 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
#include "d/actor/d_a_fganon.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_priority.h"
|
||||
#include "JSystem/JUtility/JUTReport.h"
|
||||
#include "d/actor/d_a_boko.h"
|
||||
#include "d/actor/d_a_mant.h"
|
||||
@@ -23,7 +21,7 @@
|
||||
|
||||
fganon_class* master;
|
||||
u8 hio_set;
|
||||
daFganon_HIO_c l_HIO;
|
||||
static daFganon_HIO_c l_HIO;
|
||||
|
||||
/* 000000EC-000001A0 .text __ct__14daFganon_HIO_cFv */
|
||||
daFganon_HIO_c::daFganon_HIO_c() {
|
||||
@@ -572,7 +570,7 @@ void tama_set(fganon_class* i_this) {
|
||||
void mahou_set(fganon_class* i_this) {
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
fopAcM_create(PROC_FGMAHOU, i, &i_this->m664, fopAcM_GetRoomNo(a_this));
|
||||
fopAcM_create(fpcNm_FGMAHOU_e, i, &i_this->m664, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
i_this->m670 = 0;
|
||||
}
|
||||
@@ -699,7 +697,7 @@ void spinattack2(fganon_class* i_this) {
|
||||
i_this->mMode = 1;
|
||||
if (i_this->m68F == 0) {
|
||||
for (int i = 1; i < 5; i++) {
|
||||
fopAcM_create(PROC_FGANON, (i * 16) | 3, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
fopAcM_create(fpcNm_FGANON_e, (i * 16) | 3, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1033,7 +1031,7 @@ void fail(fganon_class* i_this) {
|
||||
kieru_brk(i_this, 2);
|
||||
i_this->m3A4[0] = 10;
|
||||
i_this->mMode = 4;
|
||||
i_this->mBokoID = fopAcM_create(PROC_BOKO, daBoko_c::Type_PGANON_SWORD_e, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
i_this->mBokoID = fopAcM_create(fpcNm_BOKO_e, daBoko_c::Type_PGANON_SWORD_e, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1065,12 +1063,12 @@ void standby(fganon_class* i_this) {
|
||||
switch(i_this->mMode) {
|
||||
case -1: {
|
||||
if (i_this->m2BC == 2) {
|
||||
if (!dComIfGs_checkGetItem(dItem_LIGHT_ARROW_e)) {
|
||||
if (!dComIfGs_checkGetItem(dItemNo_LIGHT_ARROW_e)) {
|
||||
a_this->current.pos.y = -20000.0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ((i_this->m2BC == 1) && dComIfGs_checkGetItem(dItem_LIGHT_ARROW_e)) {
|
||||
else if ((i_this->m2BC == 1) && dComIfGs_checkGetItem(dItemNo_LIGHT_ARROW_e)) {
|
||||
a_this->current.pos.y = -20000.0f;
|
||||
break;
|
||||
}
|
||||
@@ -1273,7 +1271,7 @@ void last_end(fganon_class* i_this) {
|
||||
case 4: {
|
||||
if (i_this->m3A4[1] <= 4) {
|
||||
if (i_this->m3A4[1] == 4) {
|
||||
i_this->mBokoID = fopAcM_create(PROC_BOKO, daBoko_c::Type_PGANON_SWORD_e, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
i_this->mBokoID = fopAcM_create(fpcNm_BOKO_e, daBoko_c::Type_PGANON_SWORD_e, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
daBoko_c* boko = (daBoko_c*)fopAcM_SearchByID(i_this->mBokoID);
|
||||
if (boko != NULL) {
|
||||
@@ -1396,7 +1394,7 @@ void damage_check(fganon_class* i_this) {
|
||||
|
||||
return;
|
||||
}
|
||||
if (atInfo.mpActor && (fopAcM_GetName(atInfo.mpActor) == PROC_FGMAHOU)) {
|
||||
if (atInfo.mpActor && (fopAcM_GetName(atInfo.mpActor) == fpcNm_FGMAHOU_e)) {
|
||||
i_this->m670++;
|
||||
|
||||
anm_init(i_this, FGANON_BCK_DAMAGE1, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f, -1);
|
||||
@@ -1457,9 +1455,9 @@ void damage_check(fganon_class* i_this) {
|
||||
pPos = i_this->mCyl.GetTgHitPosP();
|
||||
atInfo.pParticlePos = pPos;
|
||||
atInfo.mpActor = at_power_check(&atInfo);
|
||||
if((atInfo.mpObj != NULL) && (atInfo.mpObj->ChkAtType(AT_TYPE_SWORD)) && (dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_1_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_3_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_2_e)) {
|
||||
if((atInfo.mpObj != NULL) && (atInfo.mpObj->ChkAtType(AT_TYPE_SWORD)) && (dComIfGs_getSelectEquip(0) == dItemNo_MASTER_SWORD_1_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItemNo_MASTER_SWORD_3_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItemNo_MASTER_SWORD_2_e)) {
|
||||
atInfo.mpActor = cc_at_check(a_this, &atInfo);
|
||||
if (atInfo.mbDead) {
|
||||
dComIfGp_particle_set(dPa_name::ID_AK_JN_CRITICALHITFLASH, &a_this->eyePos, NULL);
|
||||
@@ -2204,9 +2202,9 @@ void energy_ball_move(fganon_class* i_this) {
|
||||
atInfo.mpObj = NULL;
|
||||
}
|
||||
if ((atInfo.mpObj && atInfo.mResultingAttackType == 1 && atInfo.mpObj->ChkAtType(AT_TYPE_SWORD) &&
|
||||
(dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_1_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_3_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItem_MASTER_SWORD_2_e)) ||
|
||||
(dComIfGs_getSelectEquip(0) == dItemNo_MASTER_SWORD_1_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItemNo_MASTER_SWORD_3_e ||
|
||||
dComIfGs_getSelectEquip(0) == dItemNo_MASTER_SWORD_2_e)) ||
|
||||
bVar3)
|
||||
{
|
||||
local_5c = a_this->eyePos - i_this->m3E0;
|
||||
@@ -2340,7 +2338,7 @@ void energy_ball_move(fganon_class* i_this) {
|
||||
|
||||
if (i_this->mBallAtSph.ChkAtHit() != 0) {
|
||||
atInfo.mpActor = i_this->mBallAtSph.GetAtHitObj()->GetAc();
|
||||
if ((atInfo.mpActor && (fopAcM_GetName(atInfo.mpActor) == PROC_PLAYER)) && (i_this->mAction != 22)) {
|
||||
if ((atInfo.mpActor && (fopAcM_GetName(atInfo.mpActor) == fpcNm_PLAYER_e)) && (i_this->mAction != 22)) {
|
||||
i_this->m68B = 1;
|
||||
i_this->mAction = 5;
|
||||
i_this->mMode = 1;
|
||||
@@ -2361,7 +2359,7 @@ void energy_ball_move(fganon_class* i_this) {
|
||||
void* mahou_se_set(void* i_act, void* i_other) {
|
||||
fganon_class* i_this = (fganon_class*)i_act;
|
||||
fopAc_ac_c* a_this = &i_this->actor;
|
||||
if ((fopAc_IsActor(i_this)) && fopAcM_GetName(a_this) == PROC_FGMAHOU) {
|
||||
if ((fopAc_IsActor(i_this)) && fopAcM_GetName(a_this) == fpcNm_FGMAHOU_e) {
|
||||
if (a_this->health == 0) {
|
||||
fopAcM_seStartCurrent(a_this, JA_SE_OBJ_PG_EBALL_FLY_L, 0);
|
||||
}
|
||||
@@ -2744,7 +2742,7 @@ static cPhs_State daFganon_Create(fopAc_ac_c* a_this) {
|
||||
|
||||
if ((i_this->mSwitchNo != 0xFF) && (dComIfGs_isSwitch(i_this->mSwitchNo, dComIfGp_roomControl_getStayNo()) != 0)) {
|
||||
if (((fopAcM_GetParam(a_this) & 0xF) == 2) && !(dComIfGs_isEventBit(dSv_event_flag_c::UNK_3A08))) { // Probably a flag to do with beating FF1 so PG spawns?
|
||||
fopAcM_create(PROC_BOKO, daBoko_c::Type_PGANON_SWORD_e, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
fopAcM_create(fpcNm_BOKO_e, daBoko_c::Type_PGANON_SWORD_e, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -2947,7 +2945,7 @@ static cPhs_State daFganon_Create(fopAc_ac_c* a_this) {
|
||||
deru_brk(i_this);
|
||||
}
|
||||
e_this->initBt(REG8_F(8) + 300.0f, 300.0f);
|
||||
i_this->mCapeID = fopAcM_create(PROC_MANT, 1, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
i_this->mCapeID = fopAcM_create(fpcNm_MANT_e, 1, &a_this->current.pos, fopAcM_GetRoomNo(a_this));
|
||||
daFganon_Execute(i_this);
|
||||
}
|
||||
return res2;
|
||||
@@ -2963,18 +2961,18 @@ static actor_method_class l_daFganon_Method = {
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_FGANON = {
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 0x0007,
|
||||
/* ListPrio */ fpcPi_CURRENT_e,
|
||||
/* ProcName */ PROC_FGANON,
|
||||
/* Layer ID */ fpcLy_CURRENT_e,
|
||||
/* List ID */ 0x0007,
|
||||
/* List Prio */ fpcPi_CURRENT_e,
|
||||
/* Proc Name */ fpcNm_FGANON_e,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
||||
/* Size */ sizeof(fganon_class),
|
||||
/* SizeOther */ 0,
|
||||
/* Size Other */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ PRIO_FGANON,
|
||||
/* Draw Prio */ fpcDwPi_FGANON_e,
|
||||
/* Actor SubMtd */ &l_daFganon_Method,
|
||||
/* Status */ fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ENEMY_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
/* Cull Type */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user