Disappear drop type cleanup

This commit is contained in:
LagoLunatic
2025-05-09 16:34:02 -04:00
parent 95f230eb15
commit 36fec0f7fd
11 changed files with 20 additions and 23 deletions
+1 -1
View File
@@ -1468,7 +1468,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_kantera"),
ActorRel(NonMatching, "d_a_kn"),
ActorRel(NonMatching, "d_a_kokiie"),
ActorRel(NonMatching, "d_a_ks"), # code 100%, possible issue unique to this TU
ActorRel(Equivalent, "d_a_ks", extra_cflags=["-sym off"]), # weak func order
ActorRel(NonMatching, "d_a_kt"), # regalloc, weak func order
ActorRel(NonMatching, "d_a_mflft"),
ActorRel(NonMatching, "d_a_npc_cb1"),
+3 -3
View File
@@ -86,7 +86,7 @@ enum daItemAction_e {
};
enum daDisappearItemType_e {
daDisItem_NORMAL_e = 0,
daDisItem_IBALL_e = 0,
daDisItem_NONE1_e = 1,
daDisItem_HEART_CONTAINER_e = 2,
daDisItem_NONE3_e = 3,
@@ -94,7 +94,7 @@ enum daDisappearItemType_e {
daDisItem_HEART_e = 10,
daDisItem_MAGIC_e = 11,
daDisItem_ARROW_e = 12,
daDisItem_UNK13_e = 13,
daDisItem_NONE13_e = 13,
};
class l_HIO {
@@ -606,7 +606,7 @@ BOOL stealItem_CB(void* actor);
fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo);
fpc_ProcID fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_health = 0, u8 i_itemBitNo = -1);
fpc_ProcID fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_dropType, u8 i_itemBitNo = -1);
void fopAcM_setCarryNow(fopAc_ac_c* i_this, BOOL stageLayer);
void fopAcM_cancelCarryNow(fopAc_ac_c* i_this);
s32 fopAcM_otoCheck(fopAc_ac_c*, f32);
+1 -1
View File
@@ -917,7 +917,7 @@ static void action_itai_move(am_class* i_this) {
// fopAcM_seStart(i_this, JA_SE_LK_LAST_HIT, 0);
mDoAud_seStart(JA_SE_LK_LAST_HIT, &i_this->eyePos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this)));
fopAcM_createDisappear(i_this, &centerPos, 5);
fopAcM_createDisappear(i_this, &centerPos, 5, daDisItem_IBALL_e);
fopAcM_onActor(i_this);
fopAcM_delete(i_this);
break;
+1 -1
View File
@@ -934,7 +934,7 @@ static void action_itai(am2_class* i_this) {
dComIfGp_particle_set(dPa_name::ID_SCENE_81AF, &i_this->current.pos, &i_this->shape_angle);
dComIfGp_particle_set(dPa_name::ID_SCENE_81B0, &i_this->current.pos, &i_this->shape_angle);
fopAcM_seStart(i_this, JA_SE_CM_AM2_EXPLODE, 0);
fopAcM_createDisappear(i_this, &centerPos, 5);
fopAcM_createDisappear(i_this, &centerPos, 5, daDisItem_IBALL_e);
fopAcM_onActor(i_this);
fopAcM_delete(i_this);
break;
+3 -5
View File
@@ -2623,11 +2623,11 @@ static void fail(bk_class* i_this) {
case 1:
cXyz sp08 = i_this->current.pos;
sp08.y += 100.0f + l_bkHIO.m020;
u8 dropType = daDisItem_NORMAL_e;
u8 drop_type = daDisItem_IBALL_e;
if (i_this->m0300[2] >= 1000) {
dropType = daDisItem_NONE1_e;
drop_type = daDisItem_NONE1_e;
}
fopAcM_createDisappear(i_this, &sp08, 10, dropType, i_this->stealItemBitNo);
fopAcM_createDisappear(i_this, &sp08, 10, drop_type, i_this->stealItemBitNo);
if (i_this->mType == 10) {
i_this->m02DE = 1;
i_this->dr.m004 = -1;
@@ -3907,8 +3907,6 @@ static void demo_camera(bk_class* i_this) {
s8 r28 = true;
cXyz sp8C;
cXyz sp80;
cXyz sp44;
cXyz sp38;
camera_class* r3;
switch (i_this->m1234) {
case 0:
+2 -2
View File
@@ -27,7 +27,7 @@ static BOOL daDisappear_Execute(disappear_class* i_this) {
if (dropType == daDisItem_HEART_CONTAINER_e) {
fopAcM_createItemForBoss(&i_this->current.pos, 0, i_this->current.roomNo, &i_this->current.angle, NULL, 0);
}
else if (dropType >= daDisItem_HEART_e && dropType <= daDisItem_UNK13_e) {
else if (dropType >= daDisItem_HEART_e && dropType <= daDisItem_NONE13_e) {
// Special type for Keese (ki) spawned in the Puppet Ganon fight.
// This also seems to be used by several other enemies, such as Molgera's spawn.
static u32 ki_item_d[] = {
@@ -101,7 +101,7 @@ static cPhs_State daDisappear_Create(fopAc_ac_c* i_this) {
fopAcM_SetupActor(dis, disappear_class);
dis->health = fopAcM_GetParam(dis) & 0xFF;
dis->health = fopAcM_GetParam(dis) & 0xFF; // Drop type param is stored in health
f32 scaleMag = ((fopAcM_GetParam(dis) >> 8) & 0xFF) * 0.1f;
dis->mItemBitNo = (fopAcM_GetParam(dis) >> 0x10) & 0xFF;
+2 -2
View File
@@ -644,7 +644,7 @@ void dead_eff_set(ks_class* i_this, cXyz* i_pos) {
}
}
else {
drop_type = daDisItem_UNK13_e; // Might just be a void drop (ie. getting nothing)
drop_type = daDisItem_NONE13_e;
}
fopAcM_createDisappear(i_this, i_pos, 3, drop_type, 0xff);
@@ -1096,7 +1096,7 @@ void action_tubo_search(ks_class* i_this) {
i_this->mSph.OnAtVsBitSet(cCcD_AtSPrm_VsOther_e);
i_this->mSph.OffAtVsBitSet(cCcD_AtSPrm_VsPlayer_e);
i_this->mSph.OffAtVsBitSet(cCcD_AtSPrm_NoTgHitInfSet_e);
i_this->mSph.OffAtSPrmBit(cCcD_AtSPrm_NoTgHitInfSet_e);
i_this->mSph.OnAtSPrmBit(cCcD_AtSPrm_Set_e);
+1 -1
View File
@@ -800,7 +800,7 @@ void daRd_c::modeDeath() {
fopAcM_SetGroup(this, fopAc_ENV_e);
if (cLib_calcTimer(&mTimer1) == 0) {
fopAcM_createDisappear(this, &current.pos, 5);
fopAcM_createDisappear(this, &current.pos, 5, daDisItem_IBALL_e);
fopAcM_delete(this);
}
}
+4 -4
View File
@@ -4252,20 +4252,20 @@ BOOL daShip_c::execute() {
cyl->SetC(sp9C);
dComIfG_Ccsp()->Set(cyl);
if (dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)) {
cyl->SetTgGrp(cCcD_AtSPrm_VsPlayer_e);
cyl->SetTgGrp(cCcD_TgSPrm_IsPlayer_e);
}
else {
cyl->SetTgGrp(cCcD_AtSPrm_VsPlayer_e | cCcD_AtSPrm_VsOther_e);
cyl->SetTgGrp(cCcD_TgSPrm_IsPlayer_e | cCcD_TgSPrm_IsOther_e);
}
}
cMtx_multVec(mpHeadAnm->getModel()->getAnmMtx(8), &sph_offset, &sp9C);
if (dComIfGp_checkPlayerStatus0(0, daPyStts0_SHIP_RIDE_e)) {
mSph.SetTgGrp(cCcD_AtSPrm_VsPlayer_e);
mSph.SetTgGrp(cCcD_TgSPrm_IsPlayer_e);
}
else {
mSph.SetTgGrp(cCcD_AtSPrm_VsPlayer_e | cCcD_AtSPrm_VsOther_e);
mSph.SetTgGrp(cCcD_TgSPrm_IsPlayer_e | cCcD_TgSPrm_IsOther_e);
}
mSph.SetC(sp9C);
-1
View File
@@ -256,7 +256,6 @@ s32 JntHit_c::searchJntHitPosAngleOffset(cXyz* r18, csXyz* r28, cXyz* r29, csXyz
cXyz r1_11C;
cXyz r1_110;
cXyz r1_104;
cXyz r1_2C;
csXyz r1_24;
J3DModel* model = mpModel;
f32 f31 = 10000.0f;
+2 -2
View File
@@ -1273,8 +1273,8 @@ fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo) {
}
/* 80027A9C-80027B24 .text fopAcM_createDisappear__FP10fopAc_ac_cP4cXyzUcUcUc */
fpc_ProcID fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_health, u8 i_itemBitNo) {
u32 params = (i_itemBitNo & 0xFF) << 0x10 | (i_scale & 0xFF) << 0x08 | (i_health & 0xFF);
fpc_ProcID fopAcM_createDisappear(fopAc_ac_c* i_actor, cXyz* p_pos, u8 i_scale, u8 i_dropType, u8 i_itemBitNo) {
u32 params = (i_itemBitNo & 0xFF) << 0x10 | (i_scale & 0xFF) << 0x08 | (i_dropType & 0xFF);
fopAc_ac_c* disappear = (fopAc_ac_c*)fopAcM_fastCreate(PROC_DISAPPEAR, params, p_pos, fopAcM_GetRoomNo(i_actor), fopAcM_GetAngle_p(i_actor));
if (disappear) {
disappear->itemTableIdx = i_actor->itemTableIdx;